# US 2015/0106336 A1 · Addressing Cross-Allocated Blocks in a File System

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2015/0106336 A1
- Document ID: US20150106336A1
- Status: Published application
- Kind: A1
- Application number: 14/570,281
- Filed: 2014-12-15
- Published: 2015-04-16
- Earliest claimed: 2011-11-03
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Kalyan C. Gunda; Srikanth Srinivasan
- Web page: https://patentgrep.com/patent/US20150106336A1

## CPC

- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 11/1435: {using file system or storage system metadata}
- G06F 11/1453: {using de-duplication of the data}
- G06F 16/128: {Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion (error detection or correction of the data by redundancy in operations or in hardware G06F11/14, G06F11/16)}
- G06F 16/1727: {Details of free space management performed by the file system (saving storage space on storage systems G06F3/0608; management of blocks in storage devices G06F3/064)}
- G06F 16/182: Distributed file systems
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## 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.

## Claims

### Claim 1

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.

### Claim 2 (depends on 1)

The method of claim 1, wherein the user defined repair process is marking all of the set of cross-allocated blocks as free.

### Claim 3 (depends on 1)

The method of claim 1, wherein the user defined repair process is marking all but one of the set of cross-allocated blocks as free.

### Claim at position 4

4-5. (canceled)

### Claim 6 (depends on 1)

The method of claim 1, wherein, prior to identifying the file system blocks associated with the inode, the inode is locked to ensure that no modifications are made to the inode or the inode's block allocation while the identification is being performed.

### Claim 7 (depends on 1)

The method of claim 1, wherein the snapshot is a point-in-time copy of a file system state of the mounted file system.

### Claim 8

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.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein the user defined repair process is marking all of the set of cross-allocated blocks as free.

### Claim 10 (depends on 8)

The computer program product of claim 8, wherein the user defined repair process is marking all but one of the set of cross-allocated blocks as free.

### Claim at position 10

11-12. (canceled)

### Claim 13 (depends on 8)

The computer program product of claim 8, wherein, prior to identifying the file system blocks associated with the inode, the computer readable program causes the computing device to lock the inode to ensure that no modifications are made to the inode or the inode's block allocation while the identification is being performed.

### Claim 14 (depends on 8)

The computer program product of claim 8, wherein the snapshot is a point-in-time copy of a file system state of the mounted file system.

### Claim 15

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.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the user defined repair process is marking all of the set of cross-allocated blocks as free.

### Claim 17 (depends on 15)

The apparatus of claim 15, wherein the user defined repair process is marking all but one of the set of cross-allocated blocks as free.

### Claim at position 16

18-19. (canceled)

### Claim 20 (depends on 15)

The apparatus of claim 15, wherein, prior to identifying the file system blocks associated with the inode, the instructions causes the processor to lock the inode to ensure that no modifications are made to the inode or the inode's block allocation while the identification is being performed.

### Claim 21 (depends on 15)

The apparatus of claim 15, wherein the snapshot is a point-in-time copy of a file system state of the mounted file system.
