# US 2021/0334209 A1 · Method and apparatus and computer program product for managing data storage

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

- Number: US 2021/0334209 A1
- Document ID: US20210334209A1
- Status: Published application
- Kind: A1
- Application number: 17/160,850
- Filed: 2021-01-28
- Published: 2021-10-28
- Earliest claimed: 2020-04-27
- Assignees: Silicon Motion, Inc.
- Applicants: Silicon Motion, Inc.
- Inventors: Kuan-Yu KE
- Web page: https://patentgrep.com/patent/US20210334209A1

## CPC

- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 12/10: Address translation
- G06F 2212/1016: Performance improvement
- G06F 2212/1041: Resource optimization
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/657: Virtual address space management
- G06F 2212/7201: Logical to physical mapping or translation of blocks or pages
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F 2212/7208: Multiple device management, e.g. distributing data over multiple flash devices
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The invention relates to a method, a non-transitory computer program product, and an apparatus for managing data storage. The method performed by a flash controller includes: obtaining information indicating a subregion to be activated, where the subregion is associated with a logical block address (LBA) range; triggering a garbage collection (GC) process being performed in background to migrate user data of all the or a portion of the LBA range associated with the subregion to continuous physical addresses in a flash device; and updating content of a plurality of entries associated with the subregion according to migration results, where each entry includes information indicating which physical address that user data of a corresponding logical address is physically stored in the flash device.

## Claims

### Claim 1

A method for managing data storage, performed by a flash controller, comprising:
obtaining information indicating a subregion to be activated, wherein the subregion is associated with a logical block address (LBA) range;
triggering a garbage collection (GC) process being performed in background to migrate user data of all the or a portion of the LBA range associated with the subregion to continuous physical addresses in a flash device; and
updating content of a plurality of entries associated with the subregion according to migration results, wherein each entry comprises information indicating which physical address that user data of a corresponding logical address is physically stored in the flash device.

### Claim 2 (depends on 1)

The method of claim 1, wherein each entry comprises continuity information describing continuous physical addresses that user data of a specified LBA range after a corresponding LBA is actually stored in the flash device.

### Claim 3 (depends on 1)

The method of claim 1, comprising:
obtaining the information indicating the subregion to be activated from a first read command issued by a host side, wherein the first read command requests the flash controller to provide the entries associated with the subregion.

### Claim 4 (depends on 3)

The method of claim 3, comprising:
sending a response to the host side, which suggests the host side to update the entries associated with the subregion, after the GC process has been performed completely;
receiving a second read command from the host side, wherein the second read command requests the flash controller to provide the entries associated with the subregion;
reading a plurality of updated entries associated with the subregion; and
sending the updated entries associated with the subregion to the host.

### Claim 5 (depends on 3)

The method of claim 3, comprising:
updating a first variable to record information indicating that the GC process associated with the subregion is being performed when the GC process being performed in background is triggered; and
updating the first variable to record information indicating that the GC process associated with the subregion has been performed completely after the GC process has been performed completely.

### Claim 6 (depends on 5)

The method of claim 5, comprising:
receiving a third read command from the host side, wherein the third read command comprises an LBA, a transfer length and an entry;
determining which subregion belongs to the entry carried in the third read command according to the LBA and the transfer length carried in the third read command; and
sending a response to the host side, which suggests the host side to update a plurality of entries of the belonged subregion, when a second variable associated with the belonged subregion records information indicating that a GC process associated with the belonged subregion is being performed or has been performed completely.

### Claim 7 (depends on 1)

The method of claim 1, comprising:
determining the subregion to be activated actively.

### Claim 8

A non-transitory computer program product for managing data storage when executed by a processing unit of a flash controller, the non-transitory computer program product comprising program code to:
obtain information indicating a subregion to be activated, wherein the subregion is associated with a logical block address (LBA) range;
trigger a garbage collection (GC) process being performed in background to migrate user data of all the or a portion of the LBA range associated with the subregion to continuous physical addresses in a flash device; and
update content of a plurality of entries associated with the subregion according to migration results, wherein each entry comprises information indicating which physical address that user data of a corresponding logical address is physically stored in the flash device.

### Claim 9 (depends on 8)

The non-transitory computer program product of claim 8, wherein each entry comprises continuity information describing continuous physical addresses that user data of a specified LBA range after a corresponding LBA is actually stored in the flash device.

### Claim 10 (depends on 8)

The non-transitory computer program product of claim 8, comprising program code to:
obtain the information indicating the subregion to be activated from a first read command issued by a host side, wherein the first read command requests the flash controller to provide the entries associated with the subregion.

### Claim 11 (depends on 10)

The non-transitory computer program product of claim 10, comprising program code to:
send a response to the host side, which suggests the host side to update the entries associated with the subregion, after the GC process has been performed completely;
receive a second read command from the host side, wherein the second read command requests the flash controller to provide the entries associated with the subregion;
read a plurality of updated entries associated with the subregion; and
send the updated entries associated with the subregion to the host.

### Claim 12 (depends on 10)

The non-transitory computer program product of claim 10, comprising program code to:
update a first variable to record information indicating that the GC process associated with the subregion is being performed when the GC process being performed in background is triggered;
update the first variable to record information indicating that the GC process associated with the subregion has been performed completely after the GC process has been performed completely;
receive a third read command from the host side, wherein the third read command comprises an LBA, a transfer length and an entry;
determine which subregion belongs to the entry carried in the third read command according to the LBA and the transfer length carried in the third read command; and
send a response to the host side, which suggests the host side to update a plurality of entries of the belonged subregion, when a second variable associated with the belonged subregion records information indicating that a GC process associated with the belonged subregion is being performed or has been performed completely.

### Claim 13 (depends on 8)

The non-transitory computer program product of claim 8, comprising program code to:
determine the subregion to be activated actively.

### Claim 14

An apparatus for managing data storage, comprising:
a flash interface (I/F), coupled to a flash device; and
a processing unit, coupled to the flash I/F, arranged operably to obtain information indicating a subregion to be activated, wherein the subregion is associated with a logical block address (LBA) range; trigger a garbage collection (GC) process being performed in background to drive the flash I/F to migrate user data of all the or a portion of the LBA range associated with the subregion to continuous physical addresses in the flash device; and update content of a plurality of entries associated with the subregion according to migration results, wherein each entry comprises information indicating which physical address that user data of a corresponding logical address is physically stored in the flash device.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein each entry comprises continuity information describing continuous physical addresses that user data of a specified LBA range after a corresponding LBA is actually stored in the flash device.

### Claim 16 (depends on 14)

The apparatus of claim 14, comprising:
a host I/F, coupled to a host side and the processing unit,
wherein the processing unit is arranged operably to obtain the information indicating the subregion to be activated from a first read command issued by a host side through the host I/F, wherein the first read command requests the flash controller to provide the entries associated with the subregion.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein the processing unit is arranged operably to send a response to the host side, which suggests the host side to update the entries associated with the subregion, through the host I/F after the GC process has been performed completely; receive a second read command from the host side through the host I/F, wherein the second read command requests the flash controller to provide the entries associated with the subregion; read a plurality of updated entries associated with the subregion; and send the updated entries associated with the subregion to the host.

### Claim 18 (depends on 16)

The apparatus of claim 16, comprising:
a random access memory, coupled to the processing unit, arranged operably to store a first variable,
wherein the processing unit is arranged operably to update a first variable to record information indicating that the GC process associated with the subregion is being performed when the GC process being performed in background is triggered; and update the first variable to record information indicating that the GC process associated with the subregion has been performed completely after the GC process has been performed completely.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein the processing unit is arranged operably to receive a third read command from the host side through the host I/F, wherein the third read command comprises an LBA, a transfer length and an entry; determine which subregion belongs to the entry carried in the third read command according to the LBA and the transfer length carried in the third read command; and send a response to the host side, which suggests the host side to update a plurality of entries of the belonged subregion, through the host I/F when a second variable associated with the belonged subregion records information indicating that a GC process associated with the belonged subregion is being performed or has been performed completely.

### Claim 20 (depends on 14)

The apparatus of claim 14, wherein the processing unit is arranged operably to determine the subregion to be activated actively.
