CPC G06F 11/1453 (2013.01) [G06F 11/1458 (2013.01); G06F 2201/84 (2013.01)] | 19 Claims |
1. A non-transitory machine-readable storage medium comprising instructions that upon execution cause a system to:
maintain mapping metadata for data in storage, the data divided into chunks, the mapping metadata comprising chunk entries mapping chunk identifiers of the chunks to storage locations, wherein the chunk identifiers are monotonically increasing as chunks are created, and the chunks are immutable;
update an epoch in response to triggering a creation of a snapshot of the data, the snapshot comprising a point-in-time representation of data, wherein multiple snapshots share references to at least one chunk;
in response to a deletion of a first chunk, update a first chunk entry for the first chunk to include a creation epoch identifier and a deletion epoch identifier for the first chunk, the first chunk entry being part of the chunk entries in the mapping metadata, the creation epoch identifier identifying an epoch in which the first chunk was created, and the deletion epoch identifier identifying an epoch in which the first chunk was deleted, wherein each epoch comprises a range of chunk identifiers; and
in response to a deletion of a first snapshot of the multiple snapshots, wherein the first snapshot is associated with a first epoch that is preceded by a predecessor epoch, identify chunk entries to remove, based on respective creation and deletion epoch identifiers, by traversing exclusively a subset of chunk entries having chunk identifiers in a traversal range starting after an end of a range of chunk identifiers of the predecessor epoch and ending at an end of a range of chunk identifiers of the first epoch.
|