# US 2017/0255636 A1 · Method and system for storing metadata of log-structured file system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0255636 A1
- Document ID: US20170255636A1
- Status: Published application
- Kind: A1
- Application number: 15/252,675
- Filed: 2016-08-31
- Published: 2017-09-07
- Earliest claimed: 2016-03-02
- Assignees: Electronics and Telecommunications Research Institute
- Applicants: Electronics and Telecommunications Research Institute
- Inventors: Han Sung CHUN
- Web page: https://patentgrep.com/patent/US20170255636A1

## CPC

- G06F 16/122: {using management policies (point-in-time backing up or restoration of persistent data G06F11/1446; file migration policies for HSM systems G06F16/185)}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0608: {Saving storage space on storage systems}
- G06F 3/061: {Improving I/O performance}
- G06F 3/0631: {by allocating resources to storage systems}
- G06F 3/064: {Management of blocks}
- G06F 3/0643: {Management of files}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 16/1847: {specifically adapted to static storage, e.g. adapted to flash memory or SSD}
- G06F 3/0641: {De-duplication techniques}
- G06F 2212/1016: Performance improvement
- G06F 2212/214: Solid state disk
- G06F 2212/7202: Allocation control and policies
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F 2212/7207: management of metadata or control data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, system and computer-readable recording medium for storing metadata of a log-structured file system. The method includes receiving a block management request signal including information about a block number and indicating whether it is an allocation request or a deallocation request for a block, calculating a segment number to which the block belongs with reference to the block number, obtaining a metadata segment usage (MSU) item corresponding to the segment number, wherein the metadata segment usage (MSU) item includes information about a segment number and a number of valid blocks, and increasing the number of valid blocks of the metadata segment usage (MSU) item by one when the block management request signal corresponds to the allocation request, and decreasing the number of valid blocks of the metadata segment usage (MSU) by one item when the block management request signal corresponds to the deallocation request.

## Claims

### Claim 1

A method of storing metadata of a log-structured file system, the method comprising:
receiving a block management request signal including information about a block number and indicating whether it is an allocation request or a deallocation request for a block;
calculating a segment number to which the block belongs with reference to the. block number;
obtaining a metadata segment usage (MSU) item corresponding to the segment number, wherein the metadata segment usage (MSU) item includes in ion nation about a segment number and a number of valid blocks; and
increasing the number of valid blocks of the metadata segment usage (MSU) item by one when the block management request signal corresponds to the allocation request, and decreasing the number of valid blocks of the: metadata segment usage (MSU) item by one when the block management request signal corresponds to the deallocation request.

### Claim 2 (depends on 1)

The method of claim 1, wherein the segment number is calculated by dividing the block number by a number of blocks included in a single segment.

### Claim 3 (depends on 1)

The method of claim 1, wherein the metadata segment usage (MSU) item corresponding to the segment number is obtained, by searching a metadata segment usage (MSU) list.

### Claim 4 (depends on 3)

The method of claim 3, wherein a new metadata segment usage (MSU) item corresponding to the segment number is generated and added to the metadata segment usage (MSU) list when the metadata segment usage (MSU) item corresponding to the segment number does not exist in the metadata segment usage (MSU) list.

### Claim 5 (depends on 4)

The method of claim 4, wherein a segment number of the new metadata segment usage (MSU) item is set let the segment number and the number of valid blocks is set to 0 (zero).

### Claim 6 (depends on 3)

The method of claim 3, further comprising removing the metadata segment usage (MSU) item from the metadata segment usage (MSU) list when the number of valid blocks is determined as 0.

### Claim 7 (depends on 3)

The method of claim 3, further comprising, when M metadata segment usage items constitute the metadata segment usage (MSU) list and N segments are used to store a metadata file, performing a block cleaning operation when M is greater than N times K, where K is a predetermined coefficient.

### Claim 8

A system for storing metadata of a log-structured file system, the system comprising:
a data input/output module transferring a block allocation request or a block deallocation request when receiving a data write request or a metadata write request;
a space management module processing the block allocation or deallocation request after determining whether the block allocation or deallocation request is made in response to the data write request or the metadata write request when receiving the block allocation or deallocation request from the data input/output module; and
a metadata segment usage processing module updating segment information corresponding to a metadata file whenever the space management module processes allocation or deallocation of a block in response to the metadata write request.

### Claim 9 (depends on 8)

The system of claim 8, wherein the data input/output module transfers a segment summary item including an inode number and an inode block number when transferring the block allocation request to the space management module, and transfers a number of a block Jo deal locale when transferring the block deallocation request.

### Claim 10 (depends on 9)

The system of claim 9, wherein the space management module determines whether the block allocation or deallocation request is made in response to the data write request or the metadata write request with reference to the inode number of the segment summary from the data input/output module.

### Claim 11 (depends on 10)

The system of claim 10, wherein the space management module allocates a block in a segment for a general file when the inode number is for a data file when processing the allocation of the block, and allocates a block in a segment for a metadata file when the inode number is for the metadata file.

### Claim 12 (depends on 11)

The system of claim 11, wherein the space management module is configured to:
increase a number of valid blocks of the segment by one when allocating the block in the segment for the general file, and
transfer a number of the block in the segment for the metadata file and information indicating that the block is allocated to the metadata segment usage processing module when allocating the block in the segment for the metadata file.

### Claim 13 (depends on 10)

The system of claim 10, wherein the space management module is configured to:
decrease a number of valid blocks of the segment to which a block to deallocate belongs by one when the inode number is for the data file when processing the allocation of the block, and
transfer a number of a deallocated block and information indicating that the block in the segment for the metadata file is deallocated to the metadata segment usage processing module when the inode number is for the metadata file.
