Storage system garbage collection and defragmentation
AssigneeCohesity, Inc.
InventorsAnubhav Gupta, Anirvan Duttagupta
Life of this patent
Estimating the term…
Abstract
Metadata of each file of a group of files of a storage and chunk file metadata are analyzed to identify one or more file segment data chunks that are not referenced by the group of files of the storage. Fragmented chunk files to be combined together are identified based at least in part on the one or more identified file segment data chunks. The chunk file metadata is updated with an update that concurrently reflects the removal of at least a portion of the one or more file segment data chunks that are not referenced by the group of files and the combination of the identified fragmented chunk files.
Claims19
A system, comprising:
- a processor configured to:
- scan a plurality of tree data structures corresponding to a plurality of files of a storage to identify a corresponding number of references associated with file segment data chunks included in the plurality of files, wherein the plurality of tree data structures store corresponding metadata for the plurality of files;
- analyze the plurality of scanned tree data structures corresponding to the plurality of files and chunk file metadata, wherein to analyze the plurality of scanned tree data structures corresponding to the plurality of files and the chunk file metadata, the processor is configured to:
- identify one or more file segment data chunks that are not referenced by the plurality of files of the storage based on an analysis of the corresponding scanned tree data structure associated with each file of the plurality of files, wherein the one or more file segment data chunk are identified as the one or more file segment data chunks that are not referenced by the plurality of files of the storage based on a corresponding reference count, wherein the corresponding reference count indicates a number of tree data structures that reference a file segment data chunk;
- and
- identify fragmented chunk files to be combined together based at least in part on the one or more identified file segment data chunks, wherein the fragmented chunk files are identified based on an amount of unreferenced data chunks included in a chunk file;
- combine file segment data chunks that are referenced by a group of files of the identified fragmented chunk files into one or more combined chunk files;
- and
- update the chunk file metadata with an update that concurrently reflects a removal of at least a portion of the one or more file segment data chunks that are not referenced by the group of files and the combination of the identified fragmented chunk files;
- and
- a memory coupled to the processor and configured to provide the processor with instructions.
A method, comprising:
- scanning a plurality of tree data structures corresponding to a plurality of files of a storage to identify a corresponding number of references associated with file segment data chunks included in the plurality of files, wherein the plurality of tree data structures store corresponding metadata for the plurality of files;
- analyzing the plurality of scanned tree data structures corresponding to the plurality of files and chunk file metadata, wherein analyzing the plurality of scanned tree data structures corresponding to the plurality of files and the chunk file metadata comprises:
- identifying one or more file segment data chunks that are not referenced by the plurality of files of the storage based on an analysis of the corresponding scanned tree data structure associated with each file of the plurality of files, wherein the one or more file segment data chunk are identified as the one or more file segment data chunks that are not referenced by the plurality of files of the storage based on a corresponding reference count, wherein the corresponding reference count indicates a number of tree data structures that reference a file segment data chunk;
- and
- identifying fragmented chunk files to be combined together based at least in part on the one or more identified file segment data chunks, wherein the fragmented chunk files are identified based an amount of unreferenced data chunks included in a chunk file;
- combining file segment data chunks that are referenced by a group of files of the identified fragmented chunk files into one or more combined chunk files;
- and
- updating the chunk file metadata with an update that concurrently reflects a removal of at least a portion of the one or more file segment data chunks that are not referenced by the group of files and the combination of the identified fragmented chunk files.
A computer program product, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for:
- scanning a plurality of tree data structures corresponding to a plurality of files of a storage to identify a corresponding number of references associated with file segment data chunks included in the plurality of files, wherein the plurality of tree data structures store corresponding metadata for the plurality of files;
- analyzing the plurality of scanned tree data structures corresponding to the plurality of files and chunk file metadata, wherein analyzing the plurality of scanned tree data structures corresponding to the plurality of files and the chunk file metadata comprises:
- identifying one or more file segment data chunks that are not referenced by the plurality of files of the storage based on an analysis of the corresponding scanned tree data structure associated with each file of the plurality of files, wherein the one or more file segment data chunk are identified as the one or more file segment data chunks that are not referenced by the plurality of files of the storage based on a corresponding reference count, wherein the corresponding reference count indicates a number of tree data structures that reference a file segment data chunk;
- and
- identifying fragmented chunk files to be combined together based at least in part on the one or more identified file segment data chunks, wherein the fragmented chunk files are identified based on an amount of unreferenced data chunks included in a chunk file;
- combining file segment data chunks that are referenced by a group of files of the identified fragmented chunk files into one or more combined chunk files;
- and
- updating the chunk file metadata with an update that concurrently reflects a removal of at least a portion of the one or more file segment data chunks that are not referenced by the group of files and the combination of the identified fragmented chunk files.
Dependencies are inferred from the claim text.