US 11,954,332 B2
Data processing method, controller, storage device, and storage system
Liming Wu, Chengdu (CN); Guoxia Liu, Chengdu (CN); Jizhuo Tang, Chengdu (CN); and Po Zhang, Chengdu (CN)
Assigned to Huawei Technologies Co., Ltd., Shenzhen (CN)
Filed by Huawei Technologies Co., Ltd., Shenzhen (CN)
Filed on Jun. 14, 2021, as Appl. No. 17/347,041.
Application 17/347,041 is a continuation of application No. PCT/CN2019/081221, filed on Apr. 3, 2019.
Claims priority of application No. 201811538076.4 (CN), filed on Dec. 16, 2018; and application No. 201811571773.X (CN), filed on Dec. 21, 2018.
Prior Publication US 2021/0303173 A1, Sep. 30, 2021
Int. Cl. G06F 3/06 (2006.01)
CPC G06F 3/0611 (2013.01) [G06F 3/064 (2013.01); G06F 3/0659 (2013.01); G06F 3/0673 (2013.01)] 13 Claims
OG exemplary drawing
 
1. A data processing method, the method comprising:
adding, by a controller, an execution time to an IO request, wherein the execution time is used to instruct a storage device to complete the IO request before the execution time expires; and
sending, by the controller, the IO request to the storage device;
executing, by the storage device, the IO request based on the execution time of the IO request;
determining, by the controller, a type of the IO request;
wherein there are three types of the IO requests: a first type is an IO request generated externally by the server including the following types of an IO request generated by responding to an operation of a user by a host and an IO request corresponding to a value-added service of the server including snapshooting, cloning, replication being active-active and backup; a second type is an IO request correspond to a key service in the server including reading and writing of metadata; and a third type is an IO request corresponding to an array background task including cache brushing, hard disk reconstruction, and garbage collection; and
determining, by the controller, the execution time of the IO request based on the type of the IO request, wherein the storage device comprises a plurality of storage areas, each storage area comprises at least one storage block, the IO request is a write request, and the determining a storage block accessed by the IO request comprises:
selecting, by the storage device, a storage area in which no erase operation is performed from the plurality of storage areas; and
determining, by the storage device and based on the selected storage area, the storage block accessed by the IO request, and
wherein each storage block comprises a plurality of sub-blocks, each sub-block is a minimum unit on which the erase operation is performed, each storage area supports a read+write mode and a read+erase mode, and when the storage area is used to write data, the storage area is set to the read+write mode; when the storage area is used to perform the erase operation, the storage area is set to the read+erase mode; and the selecting a storage area in which no erase operation is performed from the plurality of storage areas comprises:
selecting a storage area in the read+write mode from the plurality of storage areas;
determining whether a quantity of idle sub-blocks in the selected storage area is less than a threshold; and
when the quantity of idle sub-blocks in the selected storage area is not less than the threshold, using the selected storage area in the read+write mode as the storage area in which no erase operation is performed.