Delegated reference count base file versioning
First Claim
1. A method of operating a network file server having a network adapter coupling the network file server to a data network of client computers, data storage storing files, and a data processor coupled to the data storage and the network adapter for access of the client computers to the files stored in the data storage, the files in the data storage being organized as a hierarchy of file system blocks including inodes, indirect blocks, and data blocks, the files stored in the data storage including a production file having a first data block in the hierarchy of file system blocks, the first data block being a child of the production file inode in the hierarchy of file system blocks, said method comprising:
- storing in the data storage a reference count for the first data block, and storing in the data storage a delegated reference count for the parent-child relationship of the production file inode and the first data block;
the data processor creating in the data storage a snapshot copy of the production file by allocating a snapshot copy inode and sharing the first data block between the production file inode and the snapshot copy inode so that the first data block becomes a child of the snapshot copy inode, and splitting the delegated reference count between the parent-child relationship of the production file inode and the first data block and the parent-child relationship of the snapshot copy inode and the first data block; and
the data processor responding to a request from one of the client computers for writing data to the production file at an offset encompassed by the first data block by comparing the delegated reference count for the parent-child relationship of the production file inode and the first data block to the reference count for the first data block, and upon finding that the comparison indicates that the first data block is a shared block, allocating a second data block, writing to the second data block and decrementing the reference count for the first data block by the delegated reference count for the parent-child relationship of the production file inode and the first data block and linking the second data block to the production file inode in place of the first data block so that the second data block becomes a child of the production file inode and the first data block is no longer a child of the production file inode.
9 Assignments
0 Petitions
Accused Products
Abstract
A snapshot copy facility maintains information indicating block ownership and sharing between successive versions by delegating block reference counts to parent-child relationships between the file system blocks, as indicated by block pointers in inodes and indirect blocks. When a child block becomes shared between a parent block of the production file and a parent block of a snapshot copy, the delegated reference count is split among the parent blocks. This method is compatible with a conventional data de-duplication facility, and avoids a need to update block reference counts in block metadata of child blocks of a shared indirect block upon splitting the shared indirect block when writing to a production file.
-
Citations
20 Claims
-
1. A method of operating a network file server having a network adapter coupling the network file server to a data network of client computers, data storage storing files, and a data processor coupled to the data storage and the network adapter for access of the client computers to the files stored in the data storage, the files in the data storage being organized as a hierarchy of file system blocks including inodes, indirect blocks, and data blocks, the files stored in the data storage including a production file having a first data block in the hierarchy of file system blocks, the first data block being a child of the production file inode in the hierarchy of file system blocks, said method comprising:
-
storing in the data storage a reference count for the first data block, and storing in the data storage a delegated reference count for the parent-child relationship of the production file inode and the first data block; the data processor creating in the data storage a snapshot copy of the production file by allocating a snapshot copy inode and sharing the first data block between the production file inode and the snapshot copy inode so that the first data block becomes a child of the snapshot copy inode, and splitting the delegated reference count between the parent-child relationship of the production file inode and the first data block and the parent-child relationship of the snapshot copy inode and the first data block; and the data processor responding to a request from one of the client computers for writing data to the production file at an offset encompassed by the first data block by comparing the delegated reference count for the parent-child relationship of the production file inode and the first data block to the reference count for the first data block, and upon finding that the comparison indicates that the first data block is a shared block, allocating a second data block, writing to the second data block and decrementing the reference count for the first data block by the delegated reference count for the parent-child relationship of the production file inode and the first data block and linking the second data block to the production file inode in place of the first data block so that the second data block becomes a child of the production file inode and the first data block is no longer a child of the production file inode. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method of operating a network file server having a network adapter coupling the network file server to a data network of client computers;
- data storage storing files, and a data processor coupled to the data storage and the network adapter for access of the client computers to the files stored in the data storage, the files in the data storage being organized as a hierarchy of file system blocks including inodes, indirect blocks, and data blocks, the files stored in the data storage including a production file having a first indirect block in the hierarchy of file system blocks, the first indirect block being a child of the production file inode in the hierarchy of file system blocks, said method comprising;
storing in the data storage a reference count for the first indirect block, and storing in the data storage a delegated reference count for the parent-child relationship of the production file inode and the first indirect block, the data processor creating in the data storage a snapshot copy of the production file by allocating a snapshot copy inode and sharing the first indirect block between the production file inode and the snapshot copy inode so that the first indirect block becomes a child of the snapshot copy inode, and splitting the delegated reference count between the parent-child relationship of the production file inode and the first indirect block and the parent-child relationship of the snapshot copy inode and the first indirect block by setting a delegated reference count for the parent-child relationship of the snapshot copy inode and the first indirect block to a value less than the delegated reference count for the parent-child relationship of the production file mode and the first indirect block and decrementing the delegated reference count for the parent-child relationship of the production file inode and the first indirect block by said value; the data processor responding to a request from one of the client computers for writing data to the production file at an offset encompassed by the first indirect block by comparing the delegated reference count for the parent-child relationship of the production file inode and the first indirect block to the reference count for the first indirect block, and upon finding that the comparison indicates that the first indirect block is a shared block, allocating a second indirect block and copying content of the first indirect block to the second indirect block and decrementing the reference count for the first indirect block by the delegated reference count for the parent-child relationship of the production file inode and the first indirect block and linking the second indirect block to the production file inode in place of the first indirect block so that the second indirect block becomes a child of the production file inode and the first indirect block is no longer a child of the production file inode, and writing the data to the production file at the offset encompassed by the first indirect block. - View Dependent Claims (10, 11)
- data storage storing files, and a data processor coupled to the data storage and the network adapter for access of the client computers to the files stored in the data storage, the files in the data storage being organized as a hierarchy of file system blocks including inodes, indirect blocks, and data blocks, the files stored in the data storage including a production file having a first indirect block in the hierarchy of file system blocks, the first indirect block being a child of the production file inode in the hierarchy of file system blocks, said method comprising;
-
12. A network file server comprising:
-
a network adapter for coupling the network file server to a data network of client computers; data storage storing files; and a data processor coupled to the data storage and the network adapter for access of the client computers to the files stored in the data storage; the files in the data storage being organized as a hierarchy of file system blocks including inodes, indirect blocks, and data blocks, the files stored in the data storage including a production file having a first data block in the hierarchy of file system blocks, the first data block being a child of the production file inode in the hierarchy of file system blocks, and the data storage storing a reference count for the first data block, and the data storage storing a delegated reference count for the parent-child relationship of the production file inode and the first data block; the data processor being programmed with a snapshot copy facility, the snapshot copy facility being executable by the data processor to create in the data storage a snapshot copy of the production file by allocating a snapshot copy inode and sharing the first data block between the production file inode and the snapshot copy inode so that the first data block becomes a child of the snapshot copy inode, and splitting the delegated reference count between the parent-child relationship of the production file inode and the first data block and the parent-child relationship of the snapshot copy inode and the first data block; and the snapshot copy facility being executable by the data processor to respond to a request from one of the client computers for writing data to the production file at an offset encompassed by the first data block by comparing the delegated reference count for the parent-child relationship of the production file inode and the first data block to the reference count for the first data block, and upon finding that the comparison indicates that the first data block is a shared block, allocating a second data block, writing to the second data block and decrementing the reference count for the first data block by the delegated reference count for the parent-child relationship of the production file inode and the first data block and linking the second data block to the production file inode in place of the first data block so that the second data block becomes a child of the production file inode and the first data block is no longer a child of the production file inode. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20)
-
Specification