# US 2017/0285953 A1 · Data Storage Device and Data Maintenance Method thereof

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

- Number: US 2017/0285953 A1
- Document ID: US20170285953A1
- Status: Published application
- Kind: A1
- Application number: 15/436,918
- Filed: 2017-02-20
- Published: 2017-10-05
- Earliest claimed: 2016-03-31
- Assignees: Silicon Motion, Inc.
- Applicants: Silicon Motion, Inc.
- Inventors: Yu-Wei FAN
- Web page: https://patentgrep.com/patent/US20170285953A1

## CPC

- G06F 3/064: {Management of blocks}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0619: {in relation to data integrity, e.g. data losses, bit errors}
- G06F 3/0647: {Migration mechanisms}
- G06F 3/065: {Replication mechanisms}
- 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: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present invention provides a data storage device including a flash memory and a controller. The flash memory has a plurality of first type spare blocks and a plurality of second type spare blocks, wherein the second type spare blocks are capable to store more data volume than the first type spare blocks. The controller writes data into the first type spare blocks, defines the first type spare blocks as first type data blocks if stored with data. When a predetermined condition is satisfied, the controller starts to move/copy valid data of a plurality of oldest first type data blocks into one of the second type spare blocks.

## Claims

### Claim 1

A data storage device, comprising:
a flash memory, having a plurality of first type spare blocks and a plurality of second type spare blocks, wherein the second type spare blocks are capable to store more data volume than the first type spare blocks; and
a controller, writing data into the first type spare blocks in response to a write command, defining the first type spare blocks as a plurality of first type data blocks if stored with data, wherein when a predetermined condition is satisfied, the controller starts to move/copy valid data of a plurality of oldest first type data blocks into one of the second type spare blocks, wherein a plurality of logical addresses of the valid data are mapped to the oldest first type data blocks.

### Claim 2 (depends on 1)

A data storage device as claimed in claim 1, wherein the second type spare block is defined as a second type data block when the move/copy is done, and the logical addresses of the valid data are not mapped to the oldest first type of data blocks but the second type data block.

### Claim 3 (depends on 1)

A data storage device as claimed in claim 1, wherein when a number of first type spare blocks is less than a predetermined amount, the predetermined condition is satisfied.

### Claim 4 (depends on 1)

A data storage device as claimed in claim 1, wherein when the predetermined condition is not satisfied, the controller continuously writes data into the first type spare blocks in response to the write command.

### Claim 5 (depends on 1)

A data storage device as claimed in claim 1, wherein the first type spare blocks are first type blocks that do not have valid data, the first type data blocks are first type blocks that have valid data, and the second type spare blocks are second type blocks that do not have valid data.

### Claim 6 (depends on 1)

A data storage device as claimed in claim 1, wherein the first type spare blocks are SLC spare blocks, the first type data blocks are SLC data blocks and the second type spare blocks are TLC spare blocks.

### Claim 7 (depends on 1)

A data storage device as claimed in claim 1, wherein the first type spare blocks are simulated by the second type spare blocks.

### Claim 8 (depends on 1)

A data storage device as claimed in claim 1, wherein the first type spare blocks and the second type spare blocks are different types of data blocks.

### Claim 9

A data storage device, comprising:
a flash memory, having a plurality of SLC-spare blocks, a plurality of SLC-data blocks and a plurality of TLC-spare blocks; and
a controller, writing data into the SLC-spare blocks in response to a write command arranged to write the data into the flash memory, wherein the controller writes a first part of the data into a first group SLC-spare blocks comprising three of the SLC-spare blocks when a predetermined condition is satisfied, and before writing other parts of the data into the other SLC-spare blocks, the controller selects a second group SLC-data blocks comprising three of the SLC-data blocks which have the oldest valid data from the SLC-data blocks, and moves/copies the data stored in the second group SLC-data blocks into one of the TLC-spare blocks to release the second group SLC-data blocks.

### Claim 10 (depends on 9)

A data storage device claimed as claim 9, wherein after the first SLC-data blocks are released, the controller maps at least one logic address of the first part of the data to the first group SLC-spare blocks, and defines the first group SLC-spare blocks as three of the SLC-data blocks.

### Claim 11 (depends on 10)

A data storage device claimed as claim 10, wherein the controller writes a second part of the data into a third group SLC-spare blocks comprising three of the SLC-spare blocks after the first group SLC-spare blocks are defined as three of the SLC-data blocks, and the controller further selects fourth group SLC-data blocks comprising three of the SLC-data blocks which have the oldest valid data from the SLC-data blocks and moves/copies the data stored in the third group SLC-data blocks into one of the TLC-spare blocks to release the fourth group SLC-data blocks before the remaining of the data are written into the other SLC-spare blocks.

### Claim 12 (depends on 9)

A data storage device claimed as claim 9, wherein before any of the SLC-spare blocks is written, the controller determines whether the number of SLC-spare blocks is less than a predetermined amount, and when the number of SLC-spare blocks is less than the predetermined amount, the predetermined condition is satisfied.

### Claim 13 (depends on 9)

A data storage device claimed as claim 9, wherein when the predetermined condition is not satisfied, the controller continuously writes the data into the SLC-spare blocks.

### Claim 14 (depends on 9)

A data storage device claimed as claim 9, wherein the SLC-spare blocks are SLC blocks that do not have valid data, the SLC-data blocks are SLC blocks that have valid data, and the TLC-spare blocks are TLC blocks that do not have valid data.

### Claim 15

A data maintenance method, applied to a data storage device having a flash memory, wherein the flash memory has a plurality of first type spare blocks and a plurality of second type spare blocks, and the second type spare blocks are capable to store more data volume than the first type spare blocks, the data maintenance method comprising:
writing data into the first type spare blocks in response to a write command;
defining the first type spare blocks as a plurality of first type data blocks if stored with data;
determining whether a predetermined condition is satisfied; and
when the predetermined condition is satisfied, starting to move/copy valid data of a plurality of oldest first type data blocks into one of the second type spare blocks, wherein a plurality of logical addresses of the valid data are mapped to the oldest first type data blocks.

### Claim 16 (depends on 15)

The data maintenance method as claimed in claim 15, wherein the second type spare block is defined as a second type data block when the move/copy is done, and the logical addresses of the valid data are not mapped to the oldest first type of data blocks but the second type data block.

### Claim 17 (depends on 15)

The data maintenance method as claimed in claim 15, wherein when a number of first type spare blocks is less than a predetermined amount, the predetermined condition is satisfied.

### Claim 18 (depends on 15)

The data maintenance method as claimed in claim 15, further comprising continuously writing data into the first type spare blocks in response to the write command when the predetermined condition is not satisfied.

### Claim 19 (depends on 15)

The data maintenance method as claimed in claim 15, wherein the first type spare blocks are first type blocks that do not have valid data, the first type data blocks are first type blocks that have valid data, and the second type spare blocks are second type blocks that do not have valid data.

### Claim 20 (depends on 15)

The data maintenance method as claimed in claim 15, wherein the first type spare blocks are SLC spare blocks, the first type data blocks are SLC data blocks and the second type spare blocks are TLC spare blocks.

### Claim 21 (depends on 15)

The data maintenance method as claimed in claim 15, wherein the first type spare blocks are simulated by the second type spare blocks.

### Claim 22 (depends on 15)

The data maintenance method as claimed in claim 15, wherein the first type spare blocks and the second type spare blocks are different types of data blocks.

### Claim 23

A data maintenance method, applied to a data storage device having a flash memory, wherein the flash memory has a plurality of SLC-spare blocks, a plurality of SLC-data blocks and a plurality of TLC-spare blocks, the data maintenance method comprising:
receiving a write command arranged to write data into the flash memory; and
writing the data into the SLC-spare blocks in response to the write command, wherein when a predetermined condition is satisfied, the step of writing the data into the SLC-spare blocks further comprises:
writing a first part of the data into a first group SLC-spare blocks comprising three of the SLC-spare blocks; and
before writing the remaining of the data into the other SLC-spare blocks, selecting a second group SLC-data blocks comprising there of the SLC-data blocks which have the oldest valid data from the SLC-data blocks, and moving/coping the data stored in the second group SLC-data blocks into one of the TLC-spare blocks to release the second group SLC-data blocks.

### Claim 24 (depends on 23)

The data maintenance method as claimed in claim 23, wherein when the predetermined condition is satisfied, the step of writing the data into the SLC-spare blocks further comprises:
after the second group SLC-data blocks are released, mapping at least one logic address of the first part to the first group SLC-spare blocks, and defining the first group SLC-spare blocks as new SLC-data blocks.

### Claim 25 (depends on 24)

The data maintenance method as claimed in claim 24, when the predetermined condition is satisfied, the step of writing the data into the SLC-spare blocks further comprises:
after defining the first group SLC-spare blocks as three of the SLC-data blocks, writing a second part of the data into third group SLC-spare blocks comprising three of the SLC-spare blocks; and
before the remaining of the data are written into the other SLC-spare blocks, selecting fourth group SLC-data blocks comprising three of the SLC-data blocks which have the oldest valid data from the SLC-data blocks and moving/coping the data stored in the fourth group SLC-data blocks into one of the TLC-spare blocks to release the fourth group SLC-data blocks.

### Claim 26 (depends on 23)

The data maintenance method as claimed in claim 23, further comprising before any of the SLC-spare blocks is written, determining whether the number of SLC-spare blocks is less than a predetermined amount, wherein when the number of SLC-spare blocks is less than the predetermined amount the predetermined condition is satisfied.

### Claim 27 (depends on 23)

The data maintenance method as claimed in claim 23, wherein when the predetermined condition is not satisfied, the step of writing the data into the SLC-spare blocks further comprises continuously writing the data into the SLC-spare blocks.

### Claim 28 (depends on 23)

The data maintenance method as claimed in claim 23, wherein the SLC-spare blocks are SLC blocks that do not have valid data, the SLC-data blocks are SLC blocks that have valid data, and the TLC-spare blocks are TLC blocks that do not have valid data.
