Method and apparatus for compressing metadata in a file system

US10901949B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10901949-B2
Application numberUS-201715628563-A
CountryUS
Kind codeB2
Filing dateJun 20, 2017
Priority dateJun 21, 2016
Publication dateJan 26, 2021
Grant dateJan 26, 2021

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Embodiments of the present disclosure relate to a method and an apparatus for compressing metadata in a file system. The method comprises, in response to receiving a first request for writing first data to a file, determining whether the first request is for an initial write to a storage area associated with a second indirect block in the first group of indirect blocks, the first group of indirect blocks at least including a first indirect block and the second indirect block. The method further comprises, in response to the initial write, allocating a first group of data blocks for writing the first data on a storage device. In addition, the method further comprises compressing the first group of indirect blocks by encoding a first group of storage addresses corresponding to the first group of data blocks into the first indirect block.

First claim

Opening claim text (preview).

We claim: 1. A method for compressing metadata in a file system, the metadata comprising a first group of indirect blocks, the method comprising: in response to receiving a first request for writing first data to a file, wherein the first request includes a first offset indicating a start location in the file to which the first data is to be written and a first length of the first data, determining, based on the first offset and the first length, whether the first request is for an initial write to a storage area associated with a second indirect block in the first group of indirect blocks, the first group of indirect blocks at least including a first indirect block and the second indirect block, and wherein the first indirect block includes a first area for compressing continuous storage addresses, the first area including a plurality of first sub-areas, each of the plurality of first sub-areas corresponding to a same number of data blocks; in response to the initial write, allocating a first group of data blocks for writing the first data on a storage device; compressing the first group of indirect blocks by encoding a first group of storage addresses corresponding to the first group of data blocks into the first indirect block, wherein compressing the first group of indirect blocks causes the first indirect block to store encodings of storage addresses corresponding to data blocks on the storage device that are allocated for writing data to storage areas of the file associated with multiple ones of the indirect blocks in the first group of indirect blocks; and wherein encoding the first group of storage addresses includes: determining, based on the first offset and the first length, at least one first sub-area associated with the first group of data blocks, the at least one first sub-area being included in the plurality of first sub-areas in the first indirect block, wherein the at least one first sub-area includes a first field indicating a storage address of a starting data block in the same number of data blocks and a first bitmap indicating whether a respective storage address of each of the same number of data blocks is valid, encoding the first group of storage addresses into the at least one first sub-area, determining, based on the second indirect block, the first indirect block in the first group of indirect blocks, updating the first field based on the first group of storage addresses, and in response to determining that part of the first group of storage addresses are discontinuous, setting at least one bit corresponding to the part of the first group of storage addresses in the first bitmap to be invalid. 2. The method of claim 1 , wherein determining whether the first request is for an initial write to a storage area associated with a second indirect block further comprises: determining, based on the first offset and the first length, a first intermediate indirect block associated with the first data, the first intermediate indirect block recording at least one address of the first group of indirect blocks; determining, based on the first offset and the first length, that the first data is to be written to the storage area associated with the second indirect block; and in response to determining that an address of the second indirect block as recorded in the first intermediate indirect block is invalid, determining that the first request is for the initial write to the storage area. 3. The method of claim 1 , wherein the first indirect block further includes a second area for recording discontinuous storage addresses, and encoding the first group of storage addresses further comprises: recording the part of the first group of storage addresses in the second area. 4. The method of claim 2 , further comprising: after performing the initial write, updating, in the first intermediate indirect block, the address of the second indirect block with an address of the first indirect block such that the second indirect block points to the first indirect block. 5. The method of claim 1 , further comprising: in response to determining that space occupied in the first indirect block exceeds a predefined threshold, dividing the first group of indirect blocks into at least two groups of indirect blocks, the at least two groups of indirect blocks including a second group of indirect blocks and a third group of indirect blocks, the second group of indirect blocks including the first indirect block and the third group of indirect blocks at least including a third indirect block; and encoding a storage address as encoded in the first indirect block into the third indirect block, the storage address being associated with one of the third group of indirect blocks. 6. The method of claim 5 , further comprising: in response to receiving a second request for reading second data from a file, determining whether the second data is to be read from a storage area associated with a fifth indirect block in a fourth group of indirect blocks at least including a fourth indirect block and the fifth indirect block; and in response to determining that the second data is to be read from the storage area, determining from the fourth indirect block a second group of storage addresses of a second group of data blocks for storing the second data. 7. The method of claim 6 , wherein the second request includes a second offset indicating a start location in the file to which the second data is written, and a second length of the second data, and the determining whether the second data is to be read from a storage area associated with a fifth indirect block comprises: determining, based on the second offset and the second length, a second intermediate indirect block associated with the second data, the second intermediate indirect block recording at least one address of the fourth group of indirect blocks; and determining, based on the second offset and the second length, that the second data is to be read from the storage area associated with the fifth indirect block. 8. The method of claim 6 , wherein the determining a second group of storage addresses comprises: determining, based on the fifth indirect block, the fourth indirect block in the fourth group of indirect blocks. 9. The method of claim 7 , wherein the fourth indirect block includes a third area for compressing continuous storage addresses, the third area including a plurality of third sub-areas, each of the plurality of third sub-areas corresponding to a same number of data blocks, and the determining a second group of storage addresses comprises: determining, based on the second offset and the second length, at least one third sub-area associated with the second group of data blocks, the at least one third sub-area being included in the plurality of third sub-areas; and determining the second group of storage addresses from the at least one third sub-area. 10. The method of claim 9 , wherein the at least one third sub-area includes a second field indicating a storage address of a start data block in the same number of data blocks and a second bitmap indicating whether a respective storage address of each of the same number of data blocks is valid, and the determining the second group of storage addresses from the at least one third sub-area comprises: determining, based on the second field and a valid bit contained in the second bitmap, a first storage address corresponding to the valid bit in the second group of storage addresses. 11. The method of claim 10 , wherein the fourth indirect block further includes a fourth area for recording discontinuous storage addresses, and the determining a second group of storage addresses comprises:

Assignees

Inventors

Classifications

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10901949B2 cover?
Embodiments of the present disclosure relate to a method and an apparatus for compressing metadata in a file system. The method comprises, in response to receiving a first request for writing first data to a file, determining whether the first request is for an initial write to a storage area associated with a second indirect block in the first group of indirect blocks, the first group of indir…
Who is the assignee on this patent?
Emc Ip Holding Co Llc
What technology area does this patent fall under?
Primary CPC classification G06F16/1744. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Jan 26 2021 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).