Patent ID: 8250035
Filing Date: 2012-08-21
Classification: G06F

Abstract:
1. A method for use in a computer system comprising at least one file system that stores a plurality of files in a plurality of data blocks allocated to the at least one file system, each of the plurality of files comprising at least one of the plurality of data blocks allocated to the at least one file system, the at least one file system comprising a production file and a point-in-time copy of the production file created by copying the production file at a point in time after creation of the at least one production file; the method comprising: maintaining a reference count for at least some of the data blocks, each reference count for a corresponding data block providing an indication of a number of files that share the corresponding data block; in response to a request to create a branch file from the point-in-time copy of the production file, creating the branch file by creating a writable copy of the point-in-time copy of the production file, wherein the point-in-time copy comprises at least one data block shared with the production file using an indirect association, wherein the branch file includes the indirect association with the at least one data block, and wherein the indirect association includes a pointer to an indirect block, the indirect block including a pointer that points directly to the at least one data block; deferring updating of the reference count for the at least one data block to reflect that the at least one data block is shared by the branch file and the point-in-time copy via the indirect association, wherein the branch file includes at least one indicator that indicates whether the indirect block is writeable and whether a reference count for the indirect block is updated; updating the reference count for the at least one data block to count each pointer that points directly to the at least one data block; using the reference count for the at least one data block to determine if the point-in-time copy is the only file using the at least one data block; and when it is determined that the point-in-time copy is the only file using the at least one data block, freeing the at least one data block.