IP Library Granted Patent US 11,243,701
Granted Patent B2
US 11,243,701 · App. 16/914,375 · Granted Feb 8, 2022

Data write method and solid-state drive array

Inventors: Dengben Wu (Hangzhou, CN); Xiaoxin Xu (Hangzhou, CN); Junjie Wang (Hangzhou, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
G06F3/064G06F3/0619G06F3/0629G06F3/0659G06F3/0688
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,243,701
App. No.
16/914,375
Granted
Feb 8, 2022
Kind
B2
Abstract

The present invention provides a data write method and a solid-state drive array. The solid-state drive array is based on a RAID system and includes n solid-state drives. Before to-be-written data is written into the solid-state drive array, the to-be-written data is divided into n data blocks that are in a one-to-one correspondence with the n solid-state drives. After the n data blocks are all stored into the corresponding solid-state drives, FTL update of the n data blocks is performed, to complete write of the to-be-written data. If the solid-state drive array is powered off during storage of the n data blocks, because FTL update of the data blocks is not performed, all the n data blocks fail to be written into the solid-state drive array, thereby ensuring atomicity of write operations of the n data blocks.

Claims (72)

1. A data write method, wherein the method is applied to a solid-state drive array, and the method comprises:

obtaining, by a controller of the solid-state drive array, to-be-written data, wherein the to-be-written data comprises n data blocks;

generating, by the controller, n write commands, wherein the n write commands are in a one-to-one correspondence with the n data blocks;

sending, by the controller, the n write commands to n solid-state drives in the solid-state drive array, respectively, wherein the n write commands are in a one-to-one correspondence with the n solid-state drives, and each write command is used to request a corresponding solid-state drive to store a data block corresponding to the write command;

determining, by the controller, whether n write success responses corresponding to the n write commands are received; and

triggering, by the controller, flash translation layer (FTL) update of the n data blocks when the n write success responses corresponding to the n write commands are received, wherein FTL update of each data block comprises: establishing, in an FTL list, a mapping relationship between a logical address of each data block and a current physical address of the data block,

wherein if the controller determines that the n write success responses corresponding to the n write commands are received, before the triggering, by the controller, FTL update of the n data blocks, the method further comprises:

generating, by the controller, n write logs, and storing the n write logs into a non-volatile memory, wherein the n write logs are in a one-to-one correspondence with the n data blocks, and each write log records index information of a corresponding data block,

wherein the method further comprises:

after the solid-state drive array and/or the controller are/is powered on again, determining, by the controller, a status of a write log stored in the non-volatile memory; and if the write log stored in the non-volatile memory of the controller is in a second state, re-triggering FTL update based on the write log stored in the non-volatile memory of the controller,

the re-triggering, by the controller, FTL update based on the write log in the non-volatile memory of the controller comprises:

obtaining, by the controller, index information in each write log in the non-volatile memory; obtaining, based on the index information in each write log, a cached mapping relationship between a logical address and a current physical address of a data block corresponding to each write log; and establishing, in the global FTL list, the mapping relationship between the logical address and the current physical address of the data block corresponding to each write log; or

obtaining, by the controller, index information in each write log in the non-volatile memory, and sending the obtained index information in each write log to a corresponding solid-state drive, so that the corresponding solid-state drive obtains, based on the obtained index information, a cached mapping relationship between a logical address and a current physical address of a data block corresponding to each write log, and establishes, in an FTL list of a current node, the mapping relationship between the logical address and the current physical address of the data block corresponding to each write log.

2. The method according to claim 1 , wherein each solid-state drive in the solid-state drive array maintains an FTL list of a current node, and the FTL list of the current node of each solid-state drive is used to record a mapping relationship between a logical address and a physical address of a data block stored in the solid-state drive; and

the triggering, by the controller, FTL update of the n data blocks specifically comprises:

generating, by the controller, n update commands, wherein the n update commands are in a one-to-one correspondence with the n data blocks; and

sending, by the controller, the n update commands to the n solid-state drives, respectively, wherein each update command is used to request a corresponding solid-state drive to perform FTL update of a corresponding data block.

3. The method according to claim 2 , wherein the method further comprises:

receiving, by the controller, an update success message sent by any one of the n solid-state drives, and deleting, by the controller, a write log of a data block corresponding to the solid-state drive that sends the update success message.

4. The method according to claim 1 , wherein the controller maintains a global FTL list, and the global FTL list is used to record a mapping relationship between a logical address and a physical address of a data block stored in the solid-state drive array; and

the triggering, by the controller, FTL update of the n data blocks comprises:

establishing, by the controller in the global FTL list based on a cached mapping relationship between a logical address and a current physical address to which each of the n data blocks is stored, the mapping relationship between the logical address of each of the n data blocks and the current physical address of each of the n data blocks.

5. The method according to claim 4 , wherein

after completing FTL update of a data block, the controller deletes a write log corresponding to the data block on which FTL update is completed.

6. The method according to claim 1 , wherein the method further comprises:

after the solid-state drive array and/or the controller are/is powered on again, determining, by the controller, a status of a write log stored in the non-volatile memory; and if the write log stored in the non-volatile memory of the controller is in a first state, re-initiating, by the controller, a write operation of the to-be-written data.

7. The method according to claim 1 , wherein the method further comprises:

determining, by the controller, whether FTL update of a data block is completed, and deleting a write log corresponding to a data block on which FTL update is completed.

8. A solid-state drive array controller, wherein the controller comprises a processor and a memory, and the processor is configured to execute a computer instruction stored in the memory to implement the following method:

obtaining to-be-written data, wherein the to-be-written data comprises n data blocks;

generating wherein the n write commands are in a one-to-one correspondence with the n data blocks;

sending the n write commands to n solid-state drives in the solid-state drive array, respectively, wherein the n write commands are in a one-to-one correspondence with the n solid-state drives, and each write command is used to request a corresponding solid-state drive to store a data block corresponding to the write command;

determining whether n write success responses corresponding to the n write commands are received; and

triggering FTL update of the n data blocks when the n write success responses corresponding to the n write commands are received, wherein FTL update of each data block comprises: establishing, in an FTL list, a mapping relationship between a logical address of each data block and a current physical address of the data block,

wherein if the controller determines that the n write success responses corresponding to the n write commands are received, before the triggering, by the controller, FTL update of the n data blocks, the method further comprises:

generating, by the controller, n write logs, and storing the n write logs into a non-volatile memory, wherein the n write logs are in a one-to-one correspondence with the n data blocks, and each write log records index information of a corresponding data block,

wherein the method further comprises:

after the solid-state drive array and/or the controller are/is powered on again, determining, by the controller, a status of a write log stored in the non-volatile memory; and if the write log stored in the non-volatile memory of the controller is in a second state, re-triggering FTL update based on the write log stored in the non-volatile memory of the controller,

the re-triggering, by the controller, FTL update based on the write log in the non-volatile memory of the controller comprises:

obtaining, by the controller, index information in each write log in the non-volatile memory; obtaining, based on the index information in each write log, a cached mapping relationship between a logical address and a current physical address of a data block corresponding to each write log; and establishing, in the global FTL list, the mapping relationship between the logical address and the current physical address of the data block corresponding to each write log; or

obtaining, by the controller, index information in each write log in the non-volatile memory, and sending the obtained index information in each write log to a corresponding solid-state drive, so that the corresponding solid-state drive obtains, based on the obtained index information, a cached mapping relationship between a logical address and a current physical address of a data block corresponding to each write log, and establishes, in an FTL list of a current node, the mapping relationship between the logical address and the current physical address of the data block corresponding to each write log.

9. A solid-state drive array, wherein the solid-state drive array comprises a controller and n solid-state drives;

the controller is configured to:

obtain to-be-written data, wherein the to-be-written data comprises n data blocks;

generate n write commands, wherein the n write commands are in a one-to-one correspondence with the n data blocks; and

send the n write commands to the n solid-state drives, respectively, wherein the n write commands are in a one-to-one correspondence with the n solid-state drives;

each of the n solid-state drives is configured to:

store, based on a corresponding write command, a data block corresponding to the write command; and

after storing the data block corresponding to the write command, send a write success response to the controller; and

the controller is further configured to:

determine whether n write success responses corresponding to the n write commands are received; and

trigger FTL update of the n data blocks when the n write success responses corresponding to the n write commands are received, wherein FTL update of each data block comprises: establishing, in an FTL list, a mapping relationship between a logical address of each data block and a current physical address of the data block,

wherein if the controller determines that the n write success responses corresponding to the n write commands are received, before the triggering, by the controller, FTL update of the n data blocks, the method further comprises:

generating, by the controller, n write logs, and storing the n write logs into a non-volatile memory, wherein the n write logs are in a one-to-one correspondence with the n data blocks, and each write log records index information of a corresponding data block,

wherein the method further comprises:

after the solid-state drive array and/or the controller are/is powered on again, determining, by the controller, a status of a write log stored in the non-volatile memory; and if the write log stored in the non-volatile memory of the controller is in a second state, re-triggering FTL update based on the write log stored in the non-volatile memory of the controller,

the re-triggering, by the controller, FTL update based on the write log in the non-volatile memory of the controller comprises:

obtaining, by the controller, index information in each write log in the non-volatile memory; obtaining, based on the index information in each write log, a cached mapping relationship between a logical address and a current physical address of a data block corresponding to each write log; and establishing, in the global FTL list, the mapping relationship between the logical address and the current physical address of the data block corresponding to each write log; or

obtaining, by the controller, index information in each write log in the non-volatile memory, and sending the obtained index information in each write log to a corresponding solid-state drive, so that the corresponding solid-state drive obtains, based on the obtained index information, a cached mapping relationship between a logical address and a current physical address of a data block corresponding to each write log, and establishes, in an FTL list of a current node, the mapping relationship between the logical address and the current physical address of the data block corresponding to each write log.

10. A non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores a computer instruction, and the computer instruction is executed by a solid-state drive array controller cause the solid-state drive array to perform the following method:

obtaining to-be-written data, wherein the to-be-written data comprises n data blocks;

generating wherein the n write commands are in a one-to-one correspondence with the n data blocks;

sending the n write commands to n solid-state drives in the solid-state drive array, respectively, wherein the n write commands are in a one-to-one correspondence with the n solid-state drives, and each write command is used to request a corresponding solid-state drive to store a data block corresponding to the write command;

determining whether n write success responses corresponding to the n write commands are received; and

triggering FTL update of the n data blocks when the n write success responses corresponding to the n write commands are received, wherein FTL update of each data block comprises: establishing, in an FTL list, a mapping relationship between a logical address of each data block and a current physical address of the data block,

wherein if the controller determines that the n write success responses corresponding to the n write commands are received, before the triggering, by the controller, FTL update of the n data blocks, the method further comprises:

generating, by the controller, n write logs, and storing the n write logs into a non-volatile memory, wherein the n write logs are in a one-to-one correspondence with the n data blocks, and each write log records index information of a corresponding data block,

wherein the method further comprises:

after the solid-state drive array and/or the controller are/is powered on again, determining, by the controller, a status of a write log stored in the non-volatile memory; and if the write log stored in the non-volatile memory of the controller is in a second state, re-triggering FTL update based on the write log stored in the non-volatile memory of the controller,

the re-triggering, by the controller, FTL update based on the write log in the non-volatile memory of the controller comprises:

obtaining, by the controller, index information in each write log in the non-volatile memory; obtaining, based on the index information in each write log, a cached mapping relationship between a logical address and a current physical address of a data block corresponding to each write log; and establishing, in the global FTL list, the mapping relationship between the logical address and the current physical address of the data block corresponding to each write log; or

obtaining, by the controller, index information in each write log in the non-volatile memory, and sending the obtained index information in each write log to a corresponding solid-state drive, so that the corresponding solid-state drive obtains, based on the obtained index information, a cached mapping relationship between a logical address and a current physical address of a data block corresponding to each write log, and establishes, in an FTL list of a current node, the mapping relationship between the logical address and the current physical address of the data block corresponding to each write log.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 22, 2021
From: WU, DENGBEN; XU, XIAOXIN; WANG, JUNJIE
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 055347/0332 →
Continuity (2)
Continuation PCTCN2017119390 · Dec 28, 2017
Related Publication 20200326855A1 · Oct 15, 2020