Mechanism for replicating and maintaining files in a spaced-efficient manner
First Claim
1. A computer-implemented method comprising:
- receiving a request to replicate a current file, wherein said current file is a specific file within a file system that comprises a plurality of files, and wherein said current file has a current identifier and a plurality of data blocks associated therewith;
in response to said request, creating a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith; and
associating said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file without duplicating any of said plurality of data blocks;
wherein said current file is replicated without taking a snapshot of said entire file system.
2 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.
49 Citations
51 Claims
-
1. A computer-implemented method comprising:
-
receiving a request to replicate a current file, wherein said current file is a specific file within a file system that comprises a plurality of files, and wherein said current file has a current identifier and a plurality of data blocks associated therewith;
in response to said request, creating a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith; and
associating said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file without duplicating any of said plurality of data blocks;
wherein said current file is replicated without taking a snapshot of said entire file system. - View Dependent Claims (2, 3)
-
-
4. A computer-implemented method for replicating a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said method comprising:
-
receiving a request to replicate said current file;
in response to said request, creating a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
associating said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
receiving a request to modify said new file; and
in response to said request to modify said new file, modifying said new file without modifying said current file. - View Dependent Claims (5, 6, 7)
determining at least one of said plurality of data blocks to be a selected data block to be modified;
storing the contents of said selected data block into an additional data block;
modifying said additional data block; and
associating said new file with said additional data block.
-
-
6. The method of claim 5, wherein modifying said new file further comprises:
de-associating said new file with said selected data block.
-
7. The method of claim 6, wherein said current file continues to be associated with said selected data block, and wherein said current file is not associated with said additional data block.
-
8. A computer-implemented method for replicating a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said method comprising:
-
receiving a request to replicate said current file;
in response to said request, creating a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
associating said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
receiving a request to modify said current file; and
in response to said request to modify said current file, modifying said current file without modifying said new file. - View Dependent Claims (9, 10, 11)
determining at least one of said plurality of data blocks to be a selected data block to be modified;
storing the contents of said selected data block into an additional data block;
modifying said additional data block; and
associating said current file with said additional data block.
-
-
10. The method of claim 9, wherein modifying said current file further comprises:
de-associating said current file with said selected data block.
-
11. The method of claim 10, wherein said selected data block continues to be associated with said new file, and wherein said additional data block is not associated with said new file.
-
12. A computer-implemented method for replicating a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said method comprising:
-
receiving a request to replicate said current file;
in response to said request, creating a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
associating said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
wherein said new identifier comprises a file descriptor, and wherein said method further comprises;
linking, in response to a request from an entity, said file descriptor to a new file name.
-
-
13. A computer-implemented method for replicating a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said method comprising:
-
receiving a request to replicate said current file;
in response to said request, creating a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
associating said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
wherein each of said plurality of data blocks has a reference value associated therewith, and wherein said method further comprises;
updating the reference value of each of said plurality of data blocks to indicate that said new file and said current file are associated with said plurality of data blocks. - View Dependent Claims (14)
releasing each of said plurality of data blocks when each of said reference values indicates that there are no files associated with said plurality of data blocks.
-
-
15. A computer-implemented method for replicating a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said method comprising:
-
receiving a request to replicate said current file;
in response to said request, creating a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
associating said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
receiving a request to modify said new file;
modifying said new file in response to said request to modify said new file, wherein said new file is only accessible by an entity that sent said request to modify said new file; and
upon completion of said modifying of said new file, associating said new file with said current identifier, such that said new file replaces said current file. - View Dependent Claims (16, 17)
linking, in response to a request from an entity, said file descriptor to said filename.
-
-
18. An apparatus comprising:
-
a mechanism for receiving a request to replicate a current file, wherein said current file is a specific file within a file system that comprises a plurality of files, and wherein said current file has a current identifier and a plurality of data blocks associated therewith;
a mechanism for creating, in response to said request, a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith; and
a mechanism for associating said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file without duplicating any of said plurality of data blocks;
wherein said current file is replicated without taking a snapshot of said entire file system. - View Dependent Claims (19, 20)
-
-
21. An apparatus for replicating a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said apparatus comprising:
-
a mechanism for receiving a request to replicate said current file;
a mechanism for creating, in response to said request, a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
a mechanism for associating said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
a mechanism for receiving a request to modify said new file; and
a mechanism for modifying said new file, in response to said request to modify said new file, without modifying said current file. - View Dependent Claims (22, 23, 24)
a mechanism for determining at least one of said plurality of data blocks to be a selected data block to be modified;
a mechanism for storing the contents of said selected data block into an additional data block;
a mechanism for modifying said additional data block; and
a mechanism for associating said new file with said additional data block.
-
-
23. The apparatus of claim 22, wherein said mechanism for modifying said new file further comprises:
a mechanism for de-associating said new file with said selected data block.
-
24. The apparatus of claim 23, wherein said current file continues to be associated with said selected data block, and wherein said current file is not associated with said additional data block.
-
25. An apparatus for replicating a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said apparatus comprising:
-
a mechanism for receiving a request to replicate said current file;
a mechanism for creating, in response to said request, a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
a mechanism for associating said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
a mechanism for receiving a request to modify said current file; and
a mechanism for modifying said current file, in response to said request to modify said current file, without modifying said new file. - View Dependent Claims (26, 27, 28)
a mechanism for determining at least one of said plurality of data blocks to be a selected data block to be modified;
a mechanism for storing the contents of said selected data block into an additional data block;
a mechanism for modifying said additional data block; and
a mechanism for associating said current file with said additional data block.
-
-
27. The apparatus of claim 26, wherein said mechanism for modifying said current file further comprises:
a mechanism for de-associating said current file with said selected data block.
-
28. The apparatus of claim 27, wherein said selected data block continues to be associated with said new file, and wherein said additional data block is not associated with said new file.
-
29. An apparatus for replicating a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said apparatus comprising:
-
a mechanism for receiving a request to replicate said current file;
a mechanism for creating, in response to said request, a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
a mechanism for associating said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
wherein said new identifier comprises a file descriptor, and wherein said apparatus further comprises;
a mechanism for linking, in response to a request from an entity, said file descriptor to a new file name.
-
-
30. An apparatus for replicating a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said apparatus comprising:
-
a mechanism for receiving a request to replicate said current file;
a mechanism for creating, in response to said request, a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
a mechanism for associating said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
wherein each of said plurality of data blocks has a reference value associated therewith, and wherein said apparatus further comprises;
a mechanism for updating the reference value of each of said plurality of data blocks to indicate that said new file and said current file are associated with said plurality of data blocks. - View Dependent Claims (31)
a mechanism for releasing each of said plurality of data blocks when each of said reference values indicates that there are no files associated with said plurality of data blocks.
-
-
32. An apparatus for replicating a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said apparatus comprising:
-
a mechanism for receiving a request to replicate said current file;
a mechanism for creating, in response to said request, a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
a mechanism for associating said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
a mechanism for receiving a request to modify said new file;
a mechanism for modifying said new file in response to said request to modify said new file, wherein said new file is only accessible by an entity that sent said request to modify said new file; and
a mechanism for associating said new file with said current identifier upon completion of said modifying of said new file, such that said new file replaces said current file. - View Dependent Claims (33, 34)
a mechanism for linking, in response to a request from an entity, said file descriptor to said filename.
-
-
35. A computer-readable medium comprising:
-
instructions for causing one or more processors to receive a request to replicate a current file, wherein said current file is a specific file within a file system that comprises a plurality of files, and wherein said current file has a current identifier and a plurality of data blocks associated therewith;
instructions for causing one or more processors to create, in response to said request, a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith; and
instructions for causing one or more processors to associate said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file without duplicating any of said plurality of data blocks;
wherein said current file is replicated without taking a snapshot of said entire file system. - View Dependent Claims (36, 37)
-
-
38. A computer-readable medium having stored thereon instructions which, when executed by one or more processors, cause the one or more processors to replicate a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said computer-readable medium comprising:
-
instructions for causing one or more processors to receive a request to replicate said current file;
instructions for causing one or more processors to create, in response to said request, a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
instructions for causing one or more processors to associate said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
instructions for causing one or more processors to receive a request to modify said new file; and
instructions for causing one or more processors to modify said new file, in response to said request to modify said new file, without modifying said current file. - View Dependent Claims (39, 40, 41)
instructions for causing one or more processors to determine at least one of said plurality of data blocks to be a selected data block to be modified;
instructions for causing one or more processors to store the contents of said selected data block into an additional data block;
instructions for causing one or more processors to modify said additional data block; and
instructions for causing one or more processors to associate said new file with said additional data block.
-
-
40. The computer-readable medium of claim 39, wherein the instructions for causing one or more processors to modify said new file further comprise:
instructions for causing one or more processors to de-associate said new file with said selected data block.
-
41. The computer-readable medium of claim 40, wherein said current file continues to be associated with said selected data block, and wherein said current file is not associated with said additional data block.
-
42. A computer-readable medium having stored thereon instructions which, when executed by one or more processors, cause the one or more processors to replicate a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said computer-readable medium comprising:
-
instructions for causing one or more processors to receive a request to replicate said current file;
instructions for causing one or more processors to create, in response to said request, a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
instructions for causing one or more processors to associate said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
instructions for causing one or more processors to receive a request to modify said current file; and
instructions for causing one or more processors to modify said current file, in response to said request to modify said current file, without modifying said new file. - View Dependent Claims (43, 44, 45)
instructions for causing one or more processors to determine at least one of said plurality of data blocks to be a selected data block to be modified;
instructions for causing one or more processors to store the contents of said selected data block into an additional data block;
instructions for causing one or more processors to modify said additional data block; and
instructions for causing one or more processors to associate said current file with said additional data block.
-
-
44. The computer-readable medium of claim 43, wherein the instructions for causing one or more processors to modify said current file further comprise:
instructions for causing one or more processors to de-associate said current file with said selected data block.
-
45. The computer-readable medium of claim 44, wherein said selected data block continues to be associated with said new file, and wherein said additional data block is not associated with said new file.
-
46. A computer-readable medium having stored thereon instructions which, when executed by one or more processors, cause the one or more processors to replicate a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said computer-readable medium comprising:
-
instructions for causing one or more processors to receive a request to replicate said current file;
instructions for causing one or more processors to create, in response to said request, a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
instructions for causing one or more processors to associate said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
wherein said new identifier comprises a file descriptor, and wherein said computer-readable medium further comprises;
instructions for causing one or more processors to link, in response to a request from an entity, said file descriptor to a new file name.
-
-
47. A computer-readable medium having stored thereon instructions which, when executed by one or more processors, cause the one or more processors to replicate a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said computer-readable medium comprising:
-
instructions for causing one or more processors to receive a request to replicate said current file;
instructions for causing one or more processors to create, in response to said request, a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
instructions for causing one or more processors to associate said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
wherein each of said plurality of data blocks has a reference value associated therewith, and wherein said computer-readable medium further comprises;
instructions for causing one or more processors to update the reference value of each of said plurality of data blocks to indicate that said new file and said current file are associated with said plurality of data blocks. - View Dependent Claims (48)
instructions for causing one or more processors to release each of said plurality of data blocks when each of said reference values indicates that there are no files associated with said plurality of data blocks.
-
-
49. A computer-readable medium having stored thereon instructions which, when executed by one or more processors, cause the one or more processors to replicate a current file, said current file having a current identifier and a plurality of data blocks associated therewith, said computer-readable medium comprising:
-
instructions for causing one or more processors to receive a request to replicate said current file;
instructions for causing one or more processors to create, in response to said request, a new file that is separate and distinct from said current file, said new file having a new identifier associated therewith;
instructions for causing one or more processors to associate said new file with said plurality of data blocks such that both said current file and said new file are associated with said plurality of data blocks, thereby rendering said new file a replica of said current file;
instructions for causing one or more processors to receive a request to modify said new file;
instructions for causing one or more processors to modify said new file in response to said request to modify said new file, wherein said new file is only accessible by an entity that sent said request to modify said new file; and
instructions for causing one or more processors to associate said new file with said current identifier upon completion of said modifying of said new file, such that said new file replaces said current file. - View Dependent Claims (50, 51)
instructions for causing one or more processors to link, in response to a request from an entity, said file descriptor to said filename.
-
Specification