Patent ID: 8606755

Claim:
A method, comprising: maintaining, by a computational device, logical mirroring of a first file system with a second file system; satisfying a first set of input/output (I/O) requests from the first file system while the second file system is undergoing defragmentation; and satisfying a second set of I/O requests from the second file system while the first file system is undergoing defragmentation, wherein the first file system and the second file system correspond to a primary file system and a secondary file system, wherein I/O requests are satisfied from the primary file system and defragmentation is performed on the secondary file system, and wherein: while satisfying the first set of I/O requests from the first file system while the second file system is undergoing defragmentation, the first file system is the primary file system and the second file system is the secondary file system; and while satisfying the second set of I/O requests from the second file system while the first file system is undergoing defragmentation, the first file system is the secondary file system and the second file system is the primary file system, the method further comprising: receiving, a write request; determining that the primary file system and the secondary file system are switching states with each other; in response to determining that the primary file system and the secondary file system are switching states with each other, waiting for satisfying the write request until the primary file system and the secondary file system have completed switching states with each other.