Mechanism for replicating and maintaining files in a space-efficient manner
First Claim
1. A computer-implemented method for modifying a current file associated with a file name comprising:
- receiving a request to modify said current file;
creating a new file, wherein said new file is a replica of said current file and wherein said new file is associated with a file descriptor;
modifying said new file in response to said request to modify said current file, wherein said new file is only accessible by an entity that sent said request to modify said current file;
linking said file descriptor to said file name, such that said new file replaces said current file;
wherein;
said current file is associated with a plurality of data blocks;
based on creating said new file, said new file is associated with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks;
modifying said new file in response to said request to modify said current file further comprises;
associating at least one additional data block with said new file in place of at least one original data block of said plurality of data blocks, wherein;
said at least one additional data block is not associated with said current file; and
the content of said at least one additional data block is based on said request to modify said current file; and
as a result of linking said file descriptor to said file name, said file descriptor is associated with said at least one additional data block and with said plurality of data blocks excluding said at least one original data block.
0 Assignments
0 Petitions
Accused Products
Abstract
A mechanism for replicating and maintaining files in a space-efficient manner is disclosed. In one embodiment, a current file is replicated by associating the data blocks of the current file with both the current file and a new file. The new file and the current files are separate and distinct from each other. Data blocks remain shared until the content of one file is modified. Only the data blocks affected by the modification are duplicated. The two files share the unchanged data blocks, but both files are each associated with additional data blocks that reflect the modification. Reference values are used to track how many files are associated with each data block. In another embodiment, a file descriptor is linked to a filename at the request of a user or application. The present invention avoids needless duplication of the same data blocks among copies of a file.
-
Citations
12 Claims
-
1. A computer-implemented method for modifying a current file associated with a file name comprising:
-
receiving a request to modify said current file; creating a new file, wherein said new file is a replica of said current file and wherein said new file is associated with a file descriptor; modifying said new file in response to said request to modify said current file, wherein said new file is only accessible by an entity that sent said request to modify said current file; linking said file descriptor to said file name, such that said new file replaces said current file; wherein; said current file is associated with a plurality of data blocks; based on creating said new file, said new file is associated with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks; modifying said new file in response to said request to modify said current file further comprises; associating at least one additional data block with said new file in place of at least one original data block of said plurality of data blocks, wherein; said at least one additional data block is not associated with said current file; and the content of said at least one additional data block is based on said request to modify said current file; and as a result of linking said file descriptor to said file name, said file descriptor is associated with said at least one additional data block and with said plurality of data blocks excluding said at least one original data block. - View Dependent Claims (2, 3, 4)
-
-
5. An apparatus for modifying a current file associated with a file name comprising:
-
a mechanism for receiving a request to modify said current file; a mechanism for creating a new file, wherein said new file is a replica of said current file and wherein said new file is associated with a file descriptor; a mechanism for modifying said new file in response to said request to modify said current file, wherein said new file is only accessible by an entity that sent said request to modify said current file; a mechanism for linking said file descriptor to said file name, such that said new file replaces said current file; wherein; said current file is associated with a plurality of data blocks; based on creating said new file, said new file is associated with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks; the mechanism for modifying said new file in response to said request to modify said current file further comprises; a mechanism for associating at least one additional data block with said new file in place of at least one original data block of said plurality of data blocks, wherein; said at least one additional data block is not associated with said current file; and the content of said at least one additional data block is based on said request to modify said current file; and as a result of linking said file descriptor to said file name, said file descriptor is associated with said at least one additional data block and with said plurality of data blocks excluding said at least one original data block. - View Dependent Claims (6, 7, 8)
-
-
9. A computer-readable medium having stored thereon instructions which, when executed by one or more processors, cause the one or more processors to modify a current file associated with a file name, said computer-readable medium comprising:
-
instructions for causing one or more processors to receive a request to modify said current file; instructions for causing one or more processors to create a new file, wherein said new file is a replica of said current file and wherein said new file is associated with a file descriptor; instructions for causing one or more processors to modify said new file in response to said request to modify said current file, wherein said new file is only accessible by an entity that sent said request to modify said current file; instructions for causing one or more processors to link said file descriptor to said file name, such that said new file replaces said current file; wherein; said current file is associated with a plurality of data blocks; based on creating said new file, said new file is associated with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks; the instructions for modifying said new file in response to said request to modify said current file further comprises; instructions for associating at least one additional data block with said new file in place of at least one original data block of said plurality of data blocks, wherein; said at least one additional data block is not associated with said current file; and the content of said at least one additional data block is based on said request to modify said current file; and as a result of linking said file descriptor to said file name, said file descriptor is associated with said at least one additional data block and with said plurality of data blocks excluding said at least one original data block. - View Dependent Claims (10, 11, 12)
-
Specification