# US 2019/0171522 A1 · Data storage device, host device for data storage device operations, and data writing method

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

- Number: US 2019/0171522 A1
- Document ID: US20190171522A1
- Status: Published application
- Kind: A1
- Application number: 16/170,249
- Filed: 2018-10-25
- Published: 2019-06-06
- Earliest claimed: 2017-12-06
- Assignees: Silicon Motion, Inc.
- Applicants: Silicon Motion, Inc.
- Inventors: Ming-Hung CHANG; Kuo-Yuan HSU
- Web page: https://patentgrep.com/patent/US20190171522A1

## CPC

- G06F 11/1076: {Parity data used in redundant arrays of independent storages, e.g. in RAID systems}
- G06F 3/061: {Improving I/O performance}
- G06F 3/0656: {Data buffering arrangements}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0688: {Non-volatile semiconductor memory arrays}
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 2212/1016: Performance improvement
- G06F 2212/1032: Reliability improvement, data loss prevention, degraded operation etc
- G06F 2212/262: configured as RAID
- 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

A data storage device with fault-tolerant design. The data storage device has a RAID (Redundant Array of Independent Disks) engine that generates RAID checking code for user data requested in a write command. The user data is programmed to a non-volatile memory according to a target physical address indicated in the write command. The RAID checking code is programmed to the non-volatile memory according to a reserved physical address. The user data and the RAID checking code are programmed to a stripe of pages within a stripe of blocks.

## Claims

### Claim 1

A data storage device, comprising:
a non-volatile memory; and
a microcontroller, including a redundant array of independent disks (RAID) engine that encodes user data to generate RAID checking code,
wherein:
the user data is indicated by a write command;
the microcontroller programs the user data to the non-volatile memory according to a target physical address indicated by the write command, and programs the RAID checking code to the non-volatile memory according to a reserved physical address; and
the user data and the RAID checking code are programmed to a stripe of pages of a stripe of blocks.

### Claim 2 (depends on 1)

The data storage device as claimed in claim 1, wherein the write command is requested by a host.

### Claim 3 (depends on 1)

The data storage device as claimed in claim 1, wherein the reserved physical address is determined based on a RAID encoding initialization command from a host.

### Claim 4 (depends on 1)

The data storage device as claimed in claim 1, wherein the microcontroller programs the RAID checking code to the non-volatile memory according to the reserved physical address in response to a RAID checking code programming command.

### Claim 5 (depends on 1)

The data storage device as claimed in claim 1, wherein the microcontroller further comprises a RAID checking code buffer for temporary storage of the RAID checking code.

### Claim 6 (depends on 1)

The data storage device as claimed in claim 1, wherein the user data is accumulated to be programmed to the non-volatile memory with the RAID checking code.

### Claim 7 (depends on 1)

The data storage device as claimed in claim 1, wherein the user data and the RAID checking code are sequentially programmed to the non-volatile memory.

### Claim 8 (depends on 1)

The data storage device as claimed in claim 1, wherein the microcontroller checks whether number of available logical unit numbers (LUNs) is a preset value and, if yes, the microcontroller programs the RAID checking code to the non-volatile memory according to the reserved physical address.

### Claim 9

A host device controlling operations of a data storage device, wherein:
the host device operates the data storage device to store user data according to a target physical address and stores redundant array of independent disks (RAID) checking code according to a reserved physical address; and
based on a block status table, the host device determines a logical unit number (LUN) to set the reserved physical address.

### Claim 10 (depends on 9)

The host device as claimed in claim 9, further performing a function calculation to determine the LUN of the reserved physical address.

### Claim 11 (depends on 9)

The host device as claimed in claim 9, further recording the target physical address of the user data in a logical-to-physical mapping table L2P.

### Claim 12 (depends on 9)

The host device as claimed in claim 9, further recording a logical address of the RAID checking code to a physical-to-logical mapping table P2L.

### Claim 13 (depends on 12)

The host device as claimed in claim 12, wherein the logical address is indicated by a block stripe number or a page stripe number.

### Claim 14 (depends on 9)

The host device as claimed in claim 9, outputting a write command to the data storage device with the user data and the target physical address indicated by the write command.

### Claim 15 (depends on 9)

The host device as claimed in claim 9 with the RAID checking code generated by the data storage device.

### Claim 16 (depends on 9)

The host device as claimed in claim 9, outputting a RAID checking code programming command to operate the data storage device to store the RAID checking code according to the reserved physical address.

### Claim 17 (depends on 9)

The host device as claimed in claim 9, wherein the block status table is provided by the data storage device.

### Claim 18 (depends on 9)

The host device as claimed in claim 9, maintaining the block status table.

### Claim 19

A data writing method, comprising:
receiving a write command;
generating redundant array of independent disks (RAID) checking code for user data indicated by the write command;
programming the user data to a non-volatile memory according to a target physical address indicated by the write command;
receiving a RAID checking code programming command; and
in response to the RAID checking code programming command, programming the RAID checking code to the non-volatile memory according to a reserved physical address,
wherein the user data and the RAID checking code are programmed to a stripe of pages of a stripe of blocks.

### Claim 20 (depends on 19)

The data writing method as claimed in claim 19, wherein the reserved physical address is determined based on a RAID encoding initialization command.

### Claim 21 (depends on 19)

The data writing method as claimed in claim 19, wherein the user data is accumulated to be programmed to the non-volatile memory with the RAID checking code.

### Claim 22 (depends on 19)

The data writing method as claimed in claim 19, wherein the user data and the RAID checking code are sequentially programmed to the non-volatile memory in separated time points.

### Claim 23 (depends on 19)

The data writing method as claimed in claim 19, further comprising:
checking whether the number of available logical unit numbers (LUNs) is a preset value and, if yes, programming the RAID checking code to the non-volatile memory according to the reserved physical address.

### Claim 24 (depends on 23)

The data writing method as claimed in claim 23, wherein:
the number of available LUNs is indicated by a RAID encoding initialization command.

### Claim 25 (depends on 19)

The data writing method as claimed in claim 19, further comprising:
outputting a block status table in response to an identification command.
