摘要 |
A mechanism is provided for cross-allocated block repair in a mounted file system. A set of cross-allocated blocks are identified from a plurality of blocks within an inode of the mounted file system, using a block bitmap where each cross-allocated block is associated with a corresponding bit in a designated state. The set of cross-allocated blocks are repaired 628 using a user-defined repair process, which may be marking all such blocks as free. One or more of the set of cross-allocated blocks are then deallocated 630 based on the results of the repair process. This means that data corruption can be detected and fixed without taking the file system offline. The bitmap may be populated by capturing a snapshot 606 of the file system, scanning an inode range 608 and identifying blocks associated with each inode in the range 614, determining whether a block has previously been marked as allocated 616, and, if so, placing the bit associated with the block in the block bitmap in the designated state 618. |