Fast storage writes
First Claim
Patent Images
1. A method for updating an index, comprising:
- receiving an indication of one or more changes to be made to data associated with corresponding portions of an index tree;
in response to receipt of the indication, acquiring a top-level lock on a first index tree root associated with the index tree;
identifying a new location associated with a set of contiguous unused blocks from a data structure configured to store data indicating contiguous unused space associated with a storage medium, wherein the set of contiguous unused blocks is associated with an amount sufficient to support a contiguous write;
writing the one or more changes to the data to the storage medium prior to updating one or more file name index entries associated with the portions of the index tree corresponding to the changed data, wherein writing the one or more changes includes copying at least the portions of the index tree associated with the changes to be made to the set of contiguous unused blocks associated with the new location on the storage medium and writing the one or more changes to at least a copy of the portions of the index tree at the new location;
updating the data structure configured to store data indicating contiguous unused space associated with the storage medium;
updating the one or more file name index entries;
releasing the top-level lock on the first index tree root; and
writing a second index tree root over the first index tree root, wherein writing the second index tree root includes updating a version number associated with the index tree and the second index tree root is written over the first index tree root subsequent to the one or more file name index entries being updated.
2 Assignments
0 Petitions
Accused Products
Abstract
Updating an index is disclosed. An indication of one or more changes to be made to data is received. The one or more changes are written to a storage medium prior to updating one or more file name index entries. One or more file name index entries are updated prior to writing a new index tree root. A new index tree root is written.
-
Citations
17 Claims
-
1. A method for updating an index, comprising:
-
receiving an indication of one or more changes to be made to data associated with corresponding portions of an index tree; in response to receipt of the indication, acquiring a top-level lock on a first index tree root associated with the index tree; identifying a new location associated with a set of contiguous unused blocks from a data structure configured to store data indicating contiguous unused space associated with a storage medium, wherein the set of contiguous unused blocks is associated with an amount sufficient to support a contiguous write; writing the one or more changes to the data to the storage medium prior to updating one or more file name index entries associated with the portions of the index tree corresponding to the changed data, wherein writing the one or more changes includes copying at least the portions of the index tree associated with the changes to be made to the set of contiguous unused blocks associated with the new location on the storage medium and writing the one or more changes to at least a copy of the portions of the index tree at the new location; updating the data structure configured to store data indicating contiguous unused space associated with the storage medium; updating the one or more file name index entries; releasing the top-level lock on the first index tree root; and writing a second index tree root over the first index tree root, wherein writing the second index tree root includes updating a version number associated with the index tree and the second index tree root is written over the first index tree root subsequent to the one or more file name index entries being updated. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A system for updating an index, comprising:
-
a processor; and a memory coupled with the processor, wherein the memory is configured to provide the processor with instructions which when executed cause the processor to; receive an indication of one or more changes to be made to data associated with corresponding portions of an index tree; in response to receipt of the indication, acquire a top-level lock on a first index tree root associated with the index tree; identify a new location associated with a set of contiguous unused blocks from a data structure configured to store data indicating contiguous unused space associated with a storage medium, wherein the set of contiguous unused blocks is associated with an amount sufficient to support a contiguous write; write the one or more changes to the storage medium prior to updating one or more file name index entries associated with the portions of the index tree corresponding to the changed data, wherein writing the one or more changes includes copying at least the portions of the index tree associated with the changes to be made to the set of contiguous unused blocks associated with the new location on the storage medium and writing the one or more changes to at least a copy of the portions of the index tree at the new location; update the data structure configured to store data indicating contiguous unused space associated with the storage medium; update the one or more file name index entries; release the top-level lock on the first index tree root; and write a second index tree root over the first index tree root, wherein writing the second index tree root includes updating a version number associated with the index tree and the second index tree root is written over the first index tree root subsequent to the one or more file name index entries being updated. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A computer program product for updating an index, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for:
-
receiving an indication of one or more changes to be made to data associated with corresponding portions of an index tree; in response to receipt of the indication, acquiring a top-level lock on a first index tree root associated with the index tree; identifying a new location associated with a set of contiguous unused blocks from a data structure configured to store data indicating contiguous unused space associated with a storage medium, wherein the set of contiguous unused blocks is associated with an amount sufficient to support a contiguous write; writing the one or more changes to the data to the storage medium prior to updating one or more file name index entries associated with the portions of the index tree corresponding to the changed data, wherein writing the one or more changes includes copying at least the portions of the index tree associated with the changes to be made to the set of contiguous unused blocks associated with the new location on the storage medium and writing the one or more changes to at least a copy of the portions of the index tree at the new location; updating the data structure configured to store data indicating contiguous unused space associated with the storage medium; updating the one or more file name index entries; releasing the top-level lock on the first index tree root; and writing a second index tree root over the first index tree root, wherein writing the second index tree root includes updating a version number associated with the index tree and the second index tree root is written over the first index tree root subsequent to the one or more file name index entries being updated. - View Dependent Claims (16, 17)
-
Specification