Deduplicated file system
AssigneeRed Hat, Inc.
InventorJames Paul Schneider
Life of this patent
Estimating the term…
Abstract
An apparatus and a method for maintaining a file system is described. An allocation module receives a request from a kernel module to allocate a block of the file system to a file. The allocation module examines an other block of the file system to determine whether the other block contain a same data as the block. The allocation module also determines an external reference count of the other block containing the same data. The other block is then allocated to the file and the external reference count is updated accordingly.
Claims20
A method comprising:
- receiving a request for allocating a first block of a file system to a file;
- computing a first hash value by hashing the first block with a first hashing procedure;
- computing a second hash value by hashing the first block with a second hashing procedure;
- determining, by the processing device, whether a block number of the first block existing within a tree structure matches with the second hash value;
- in response to the determination that the block number of the first block matches with the second hash value, allocating, by the processing device, the first block to the file and updating, by the processing device, an external reference count of the first block;
- and
- in response to the determination that the block number of the first block does not match with the second hash value, allocating, by the processing device, a second block that is previously unallocated, wherein the second block is different from the first block.
A non-transitory computer-readable storage medium comprising data that, when accessed by a processing device cause the processing device to:
- receive a request for allocating a first block of a file system to a file;
- compute a first hash value by hashing the first block with a first hashing procedure;
- compute a second hash value by hashing the first block with a second hashing procedure;
- determine, by the processing device, whether a block number of the first block existing within a tree structure matches with the second hash value;
- in response to the determination that the block number of the first block matches with the second hash value, allocate, by the processing device, the first block to the file and update, by the processing device, an external reference count of the first block;
- and
- in response to the determination that the block number of the first block does not match with the second hash value, allocate, by the processing device, a second block that is previously unallocated, wherein the second block is different from the first block.
A system comprising:
- a memory;
- a processing device, operatively coupled to the memory to:
- receive a request for allocating a first block of a file system to a file;
- compute a first hash value by hashing the first block with a first hashing procedure;
- compute a second hash value by hashing the first block with a second hashing procedure;
- determine whether a block number of the first block existing within a tree structure matches with the second hash value;
- in response to the determination that the block number of the first block matches with the second hash value, allocate the first block to the file and update, by the processing device, an external reference count of the first block;
- and
- in response to the determination that the block number of the first block does not match with the second hash value, allocate a second block that is previously unallocated, wherein the second block is different from the first block.
Dependencies are inferred from the claim text.