Addressing Cross-Allocated Blocks in a File System
AssigneeInternational Business Machines Corporation
InventorsKalyan C. Gunda, Srikanth Srinivasan
Life of this patent
Estimating the term…
Abstract
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, based on a corresponding bit associated with each cross-allocated block in a duplicated block information bitmap being in a first identified state. The set of cross-allocated blocks are repaired using a user-defined repair process. Then one or more of the set of cross-allocated blocks are deallocated based on results of the user-defined repair process.
Claims18
A method, in a data processing system, for cross-allocated block repair in a mounted file system, the method comprising:
- identifying, by a processor in the data processing system, a set of cross-allocated blocks from a plurality of blocks within an inode of the mounted file system, based on a corresponding bit associated with each cross-allocated block in a duplicated block information bitmap being in a first identified state, wherein the duplicated block information bitmap is populated by the method comprising:
- capturing, by the processor, a snapshot of the mounted file system;
- scanning, by the processor, an entire inode range of the snapshot;
- for each inode in the inode range, identifying, by the processor, file system blocks associated with the inode;
- responsive to identifying each file system block associated with the inode, determining, by the processor whether a corresponding bit in an allocation information bitmap is in a second identified state;
- responsive to the corresponding bit in the allocation information bitmap being in the second identified state, updating, by the processor, the corresponding bit in the duplicated block information bitmap to the first identified state;
- and
- responsive to the corresponding bit in the allocation information bitmap failing to be in the second identified state, updating, by the processor, the corresponding bit in the allocation information bitmap to the second identified state;
- repairing, by the processor, the set of cross-allocated blocks using a user-defined repair process;
- and
- deallocating, by the processor, one or more of the set of cross-allocated blocks based on results of the user-defined repair process.
4-5. (canceled)
A computer program product comprising a non-transitory computer readable storage medium having a computer readable program stored therein, wherein the computer readable program, when executed on a computing device, causes the computing device to:
- identify a set of cross-allocated blocks from a plurality of blocks within an inode of the mounted file system, based on a corresponding bit associated with each cross-allocated block in a duplicated block information bitmap being in a first identified state, wherein the computer readable program populates the duplicated block information bitmap by causing the computing device to:
- capture a snapshot of the mounted file system;
- scan an entire inode range of the snapshot;
- for each inode in the inode range, identify file system blocks associated with the inode;
- responsive to identifying each file system block associated with the inode, determine whether a corresponding bit in an allocation information bitmap is in a second identified state;
- responsive to the corresponding bit in the allocation information bitmap being in the second identified state, update the corresponding bit in the duplicated block information bitmap to the first identified state;
- and
- responsive to the corresponding bit in the allocation information bitmap failing to be in the second identified state, update the corresponding bit in the allocation information bitmap to the second identified state;
- repair the set of cross-allocated blocks using a user-defined repair process;
- and
- deallocate one or more of the set of cross-allocated blocks based on results of the user-defined repair process.
11-12. (canceled)
An apparatus, comprising:
- a processor;
- and
- a memory coupled to the processor, wherein the memory comprises instructions which, when executed by the processor, cause the processor to:
- identify a set of cross-allocated blocks from a plurality of blocks within an inode of the mounted file system, based on a corresponding bit associated with each cross-allocated block in a duplicated block information bitmap being in a first identified state, wherein the instructions populate the duplicated block information bitmap by causing the processor to:
- capture a snapshot of the mounted file system;
- scan an entire inode range of the snapshot;
- for each inode in the inode range, identify file system blocks associated with the inode;
- responsive to identifying each file system block associated with the inode, determine whether a corresponding bit in an allocation information bitmap is in a second identified state;
- responsive to the corresponding bit in the allocation information bitmap being in the second identified state, update the corresponding bit in the duplicated block information bitmap to the first identified state;
- and
- responsive to the corresponding bit in the allocation information bitmap failing to be in the second identified state, update the corresponding bit in the allocation information bitmap to the second identified state;
- repair the set of cross-allocated blocks using a user-defined repair process;
- and
- deallocate one or more of the set of cross-allocated blocks based on results of the user-defined repair process.
18-19. (canceled)
Dependencies are inferred from the claim text.