# US 2008/0288546 A1 · Method and system for handling reallocated 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 2008/0288546 A1
- Document ID: US20080288546A1
- Status: Published application
- Kind: A1
- Application number: 11/749,614
- Filed: 2007-05-16
- Published: 2008-11-20
- Earliest claimed: 2007-05-16
- Assignees: International Business Machines Corporation
- Inventors: JANET ELIZABETH ADKINS; Joon Chang
- Web page: https://patentgrep.com/patent/US20080288546A1

## CPC

- 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: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system for managing a file system. In response to a user selecting an image of the file system to perform a rollback operation, each data block in the file system that is owned by the image is searched for. Then, it is determined whether a data block owned by the image is marked in a first map and a second map. In response to determining that the data block owned by the image is marked in the first map and the second map, the data block is marked in a third map. In response to determining that the data block owned by the image is marked in the third map, a new data block is allocated in the file system. Subsequently, data from the data block owned by the image is copied to the new data block in the file system prior to performing the rollback operation to avoid a collision that causes data corruption.

## Claims

### Claim 1

A computer implemented method for managing a file system, the computer implemented method comprising:
responsive to a user selecting an image of the file system to perform a rollback operation, searching for each data block in the file system that is owned by the image;
determining if a data block owned by the image is marked in a first map and a second map;
responsive to determining that the data block owned by the image is marked in the first map and the second map, marking the data block in a third map;
responsive to determining that the data block owned by the image is marked in the third map, allocating a new data block in the file system; and
copying data from the data block owned by the image to the new data block in the file system prior to performing the rollback operation to avoid a collision that causes data corruption.

### Claim 2 (depends on 1)

The computer implemented method of claim 1, further comprising:
updating a fourth map corresponding to the image to point to the new data block in the file system and a location for the new data block.

### Claim 3 (depends on 1)

The computer implemented method of claim 1, further comprising:
initializing the first map, the second map, and the third map in memory;
marking data blocks owned by the image in the first map; and
marking copy on delete data blocks in the second map.

### Claim 4 (depends on 1)

The computer implemented method of claim 1, wherein the rollback operation restores the file system back to a previous point in time that corresponds to the image.

### Claim 5 (depends on 1)

The computer implemented method of claim 1, wherein the image is a point in time snapshot image of the file system.

### Claim 6 (depends on 3)

The computer implemented method of claim 3, wherein the searching, determining, marking, allocating, copying, updating, and initializing steps are performed by a file system controller.

### Claim 7 (depends on 1)

The computer implemented method of claim 1, wherein the user is a system administrator.

### Claim 8 (depends on 1)

The computer implemented method of claim 1, wherein the first map is a snapshot owned data block bitmap, the second map is a copy on delete data block bitmap, and the third map is a collision bitmap.

### Claim 9 (depends on 8)

The computer implemented method of claim 8, wherein the collision bitmap identifies impending collisions in the file system prior to performance of the rollback operation.

### Claim 10 (depends on 2)

The computer implemented method of claim 2, wherein the fourth map is a snapshot map.

### Claim 11 (depends on 10)

The computer implemented method of claim 10, wherein the snapshot map includes an entry for each data block in the file system.

### Claim 12 (depends on 11)

The computer implemented method of claim 11, wherein the entry for each data block includes multiple bits that are marked to indicate whether the data block has been copied, deleted, or newly allocated and an address of a location where the data block is stored in the file system.

### Claim 13 (depends on 1)

The computer implemented method of claim 1, wherein the data block is one of a plurality of data blocks in the file system.

### Claim 14

A data processing system for managing a file system, comprising:
a bus system;
a storage device connected to the bus system, wherein the storage device includes a set of instructions; and
a processing unit connected to the bus system, wherein the processing unit executes the set of instructions to search for each data block in the file system that is owned by an image of the file system in response to a user selecting the image to perform a rollback operation, determine if a data block owned by the image is marked in a first map and a second map, mark the data block in a third map in response to determining that the data block owned by the image is marked in the first map and the second map, allocate a new data block in the file system in response to determining that the data block owned by the image is marked in the third map, and copy data from the data block owned by the image to the new data block in the file system prior to performing the rollback operation to avoid a collision that causes data corruption.

### Claim 15 (depends on 14)

The data processing system of claim 14, wherein the processing unit executes a further set of instructions to update a fourth map corresponding to the image to point to the new data block in the file system and a location for the new data block.

### Claim 16

A computer program product for managing a file system, the computer program product comprising:
a computer usable medium having computer usable program code embodied therein, the computer usable medium comprising:
computer usable program code configured to search for each data block in the file system that is owned by an image of the file system in response to a user selecting the image to perform a rollback operation;
computer usable program code configured to determine if a data block owned by the image is marked in a first map and a second map;
computer usable program code configured to mark the data block in a third map in response to determining that the data block owned by the image is marked in the first map and the second map;
computer usable program code configured to allocate a new data block in the file system in response to determining that the data block owned by the image is marked in the third map; and
computer usable program code configured to copy data from the data block owned by the image to the new data block in the file system prior to performing the rollback operation to avoid a collision that causes data corruption.

### Claim 17 (depends on 16)

The computer program product of claim 16, further comprising:
computer usable program code configured to update a fourth map corresponding to the image to point to the new data block in the file system and a location for the new data block.

### Claim 18 (depends on 16)

The computer program product of claim 16, further comprising:
computer usable program code configured to initialize the first map, the second map, and the third map in memory;
computer usable program code configured to mark data blocks owned by the image in the first map; and
computer usable program code configured to mark copy on delete data blocks in the second map.

### Claim 19 (depends on 16)

The computer program product of claim 16, wherein the first map is a snapshot owned data block bitmap, the second map is a copy on delete data block bitmap, and the third map is a collision bitmap.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein the collision bitmap identifies impending collisions in the file system prior to performance of the rollback operation.
