A method, apparatus, and storage medium for managing a data storage array
By determining the risk level of data blocks based on current and historical uncorrectable information, selective data storage is achieved, solving the reliability and capacity loss problems of NAND Flash chips and improving the reliability of data storage and the lifespan of equipment.
Patent Information
- Application Number
- CN202080092988.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-31
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2040-03-31
AI Technical Summary
In the existing technology, the data storage array of NAND Flash chips suffers from defects that lead to decreased reliability and functionality, resulting in data loss and device capacity loss. In addition, the number of redundant blocks is limited, which affects the lifespan of SSD devices.
By determining the risk level based on the current and historical uncorrectable information of data blocks, selective data storage management can be implemented to reduce the probability of data loss and improve data storage reliability.
By quantifying the risk level management of data blocks, unnecessary equipment capacity loss can be reduced, and the reliability of data storage and equipment lifespan can be improved.
Smart Images

Figure CN114930299B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular, to a method and device for managing a data storage array and a storage medium. BACKGROUND
[0002] A NAND Flash chip is mainly composed of a data storage array and a peripheral circuit region. As shown in FIG. 1, in the manufacturing process of a NAND Flash, different process steps can introduce defects in the data storage array and the peripheral circuit region. Meanwhile, with repeated erasing and writing of the NAND Flash, the data storage array can also generate defects. The existence of defects can affect the reliability and function of the NAND Flash chip, such as causing data loss. Figure 1 The smallest unit of NAND Flash data storage is a page, a certain number of consecutive pages form a data block, a certain number of data blocks form a physical plane, and different physical planes form an overall storage array, as shown in FIG. 2.
[0003] Figure 2 The data block is the smallest unit of NAND Flash erasing operation, and in general cases, the data block is taken as the basic unit of data management.
[0004] For a solid state drive (SSD) device using a NAND Flash, when a data block is repeatedly lost due to defects, the entire data block is marked as a bad block and discarded, i.e., no subsequent data storage is performed. Due to the existence of redundant blocks, if a certain data becomes an uncorrectable code (UNC), the position of the UNC can still be recovered by using other data within the strip. However, the number of redundant blocks is limited, and when the number of discarded blocks reaches a certain number, the service life of the SSD device is also at the end. Meanwhile, the discarding of bad blocks also causes a loss of internal capacity of the SSD device, resulting in a loss of cost.
[0005] In the prior art, when data read from a data block is found to have uncorrectable code (UNC) after error checking and error correction code (ECC) processing, the data block is directly marked as a bad block and discarded. SUMMARY
[0006] The embodiments of the present application provide a method and device for managing a data storage array and a storage medium, which can manage the data storage array based on the risk level of a data block, thereby improving the reliability of data storage.
[0007] A first aspect of the embodiments of the present application provides a method for managing a data storage array, comprising: reading data stored in a first data block in the data storage array; obtaining current uncorrectable error information of the first data block when it is detected that data of a first page of the first data block is uncorrectable, wherein the first data block comprises N pages, the first page is any one of the N pages, and N is an integer greater than 1; determining a risk level of the first data block according to historical uncorrectable error information of the first data block and the current uncorrectable error information of the first data block; and managing the data storage array according to the risk level of the first data block.
[0008] In the embodiments of the present application, the risk level of the data block is determined based on the current uncorrectable error information and the historical uncorrectable error information of the data block, and then the data storage array is managed according to the risk level of the data block. The risk level is determined based on the current uncorrectable error information and the historical uncorrectable error information of the data block. Compared with the method of deleting the data block when data uncorrectable error occurs in the prior art, the management of the data block is more objective, and unnecessary device capacity loss is reduced.
[0009] The historical uncorrectable error information comprises a total number corresponding to the number of times of data uncorrectable error occurring in the history, the current uncorrectable error information comprises a number corresponding to the number of times of data uncorrectable error occurring at present, and the risk level of the first data block is determined according to the total number corresponding to the number of times of data uncorrectable error occurring in the history and the number corresponding to the number of times of data uncorrectable error occurring at present.
[0010] Optionally, the historical uncorrectable error information of the first data block comprises a total number corresponding to the number of times of data uncorrectable error occurring in the history, the current uncorrectable error information of the first data block comprises a number corresponding to the number of times of data uncorrectable error occurring at present, and the risk level of the first data block is determined according to the historical uncorrectable error information of the first data block and the current uncorrectable error information of the first data block, comprising: obtaining a total number corresponding to the number of times of data uncorrectable error occurring in the first data block according to the total number corresponding to the number of times of data uncorrectable error occurring in the history and the number corresponding to the number of times of data uncorrectable error occurring at present; and when the total number corresponding to the number of times of data uncorrectable error occurring in the first data block is higher than a first preset threshold, it is determined that the risk level of the first data block is higher than a reference level, wherein the reference level is set according to a threshold of the risk level corresponding to the data block when the data block is eliminated.
[0011] When the data of the first page of the first data block is uncorrectable, the number of times of erasing and writing corresponding to the current occurrence of uncorrectable data of the first data block is obtained; and the risk level of the first data block is determined according to the total number of times of erasing and writing corresponding to the historical occurrence of uncorrectable data of the first data block and the number of times of erasing and writing corresponding to the current occurrence of uncorrectable data of the first data block. By using this method, the risk level of the data block is determined based on the current uncorrectable data information and the historical uncorrectable data information of the data block, and the data storage array is managed, so that selective storage is performed according to the risk level of the data block when data is stored, the probability of data loss is reduced, and the reliability of data storage is improved.
[0012] Optionally, when the total number of times of erasing and writing corresponding to the occurrence of uncorrectable data in the first data block is higher than the second preset threshold and is not higher than the first preset threshold, the historical uncorrectable data information of the first data block further includes the number of times of erasing and writing corresponding to the first occurrence of uncorrectable data, the current uncorrectable data information further includes the number of times of erasing and writing corresponding to the current occurrence of uncorrectable data, and the risk level of the first data block is determined according to the historical uncorrectable data information of the first data block and the current uncorrectable data information of the first data block, including: determining whether the difference between the number of times of erasing and writing corresponding to the current occurrence of uncorrectable data in the first data block and the number of times of erasing and writing corresponding to the first occurrence of uncorrectable data in the first data block is less than a third preset threshold; and if the difference is less than the third preset threshold, determining that the risk level of the first data block is higher than the reference level.
[0013] When the data of the first page of the first data block is uncorrectable, the number of times of erasing and writing corresponding to the current occurrence of uncorrectable data of the first data block is obtained; and the risk level of the first data block is determined according to the total number of times of erasing and writing corresponding to the historical occurrence of uncorrectable data of the first data block, the number of times of erasing and writing corresponding to the first occurrence of uncorrectable data, and the number of times of erasing and writing corresponding to the current occurrence of uncorrectable data of the first data block. By using this method, when the total number of times of erasing and writing corresponding to the occurrence of uncorrectable data in the data block is higher than the second preset threshold and is not higher than the first preset threshold, it is determined that the risk level of the first data block is higher than the reference level by determining that the difference between the number of times of erasing and writing corresponding to the current occurrence of uncorrectable data in the first data block and the number of times of erasing and writing corresponding to the first occurrence of uncorrectable data in the first data block is less than a third preset threshold. By determining the risk level of the data block, the data block is managed, the probability of data loss is reduced, and the reliability of data storage is improved.
[0014] Optionally, when the total number of the number of times of uncorrectable erasing of data in the first data block is higher than the fourth preset threshold and is not higher than the second preset threshold, the determining of the risk level of the first data block according to the historical uncorrectable information of the first data block and the current uncorrectable information of the first data block comprises: confirming whether the difference between the number of times of current uncorrectable erasing of data in the first data block and the number of times of first uncorrectable erasing of data in the first data block exceeds a fifth preset threshold, wherein the fifth preset threshold is greater than the third preset threshold; if the difference exceeds the fifth preset threshold, confirming that the risk level of the first data block is lower than the reference level.
[0015] Through the embodiments of the present application, when the data of the first page of the first data block is uncorrectable, the number of times of current uncorrectable erasing of data of the first data block is obtained; the risk level of the first data block is determined according to the total number of the number of times of historical uncorrectable erasing of data of the first data block, the number of times of first uncorrectable erasing of data, the number of times of current uncorrectable erasing of data of the first data block, and the number corresponding to the number of times of current uncorrectable erasing of data. By using this means, when the total number of the number of times of uncorrectable erasing of data in the first data block is higher than the fourth preset threshold and is not higher than the second preset threshold, it is confirmed that the difference between the number of times of current uncorrectable erasing of data in the first data block and the number of times of first uncorrectable erasing of data in the first data block exceeds the fifth preset threshold, and it is confirmed that the risk level of the first data block is lower than the reference level. By determining the risk level of the data block, the management of the data block is further performed, the probability of data loss is reduced, and the reliability of data storage is further improved.
[0016] Optionally, the historical uncorrectable information of the first data block comprises a historical maximum erasing operation time, the current uncorrectable information of the first data block comprises a current erasing operation time, and the determining of the risk level of the first data block according to the historical uncorrectable information of the first data block and the current uncorrectable information of the first data block comprises: determining the maximum value of the historical maximum erasing operation time and the current erasing operation time as the maximum erasing operation time of the first data block; when the maximum erasing operation time of the first data block is higher than a first preset threshold, confirming that the risk level of the first data block is higher than the reference level. The first preset threshold can be a threshold different from the first preset threshold.
[0017] According to the embodiment of the present application, when the data of the first page of the first data block is not correctable, the current erasing operation time of the first data block is obtained; and the risk level of the first data block is determined according to the historical maximum erasing operation time of the first data block and the current erasing operation time of the first data block. By using this method, the risk level of the data block is determined based on the current uncorrectable information and the historical uncorrectable information of the data block, so that selective storage can be performed according to the risk level of the data block when data storage is performed, the probability of data loss is reduced, and the reliability of data storage is improved.
[0018] Optionally, the historical uncorrectable information of the first data block includes a historical minimum programming operation time, the current uncorrectable information of the first data block includes a current minimum programming operation time, and the risk level of the first data block is determined according to the historical uncorrectable information of the first data block and the current uncorrectable information of the first data block, including: determining the minimum value of the historical minimum programming operation time and the current minimum programming operation time as the minimum programming operation time of the first data block; and when the minimum programming operation time of the first data block is less than a first preset threshold, it is determined that the risk level of the first data block is higher than a reference level.
[0019] According to the embodiment of the present application, when the data of the first page of the first data block is not correctable, the current minimum programming operation time of the first data block is obtained; and the risk level of the first data block is determined according to the historical minimum programming operation time of the first data block and the current minimum programming operation time of the first data block. By using this method, the risk level of the data block is determined based on the current uncorrectable information and the historical uncorrectable information of the data block, so that selective storage can be performed according to the risk level of the data block when data storage is performed, the probability of data loss is reduced, and the reliability of data storage is improved.
[0020] Further, the current uncorrectable information of the first data block is obtained by detecting the other N-1 pages except the first page in the first data block respectively.
[0021] In the embodiment of the present application, the current uncorrectable information of the first data block also includes information obtained by detecting the other N-1 pages except the first page respectively. By using this method, the information acquisition is more comprehensive, which helps to determine the risk level of the data block based on more comprehensive information, and improves the reliability of determining the risk level of the data block.
[0022] Optionally, the historical non-correctable information of the first data block comprises a maximum number and a minimum number of page numbers in which data is historically non-correctable, the current non-correctable information of the first data block comprises a maximum number and a minimum number of page numbers in which data is currently non-correctable, and the determining of the risk level of the first data block according to the historical non-correctable information and the current non-correctable information of the first data block comprises: determining a maximum value of the maximum number of page numbers in which data is currently non-correctable and the maximum number of page numbers in which data is historically non-correctable as the maximum number of page numbers in which data of the first data block is non-correctable; determining a minimum value of the minimum number of page numbers in which data is currently non-correctable and the minimum number of page numbers in which data is historically non-correctable as the minimum number of page numbers in which data of the first data block is non-correctable; obtaining a difference between the maximum number and the minimum number of page numbers in which data of the first data block is non-correctable; and determining that the risk level of the first data block is higher than a reference level when the difference exceeds a first preset threshold.
[0023] According to the embodiment of the present application, when data of the first page of the first data block is non-correctable, each page of the first data block except the first page is detected to obtain the maximum number and the minimum number of page numbers in which data of the first data block is currently non-correctable, and the risk level of the first data block is determined according to the maximum number and the minimum number of page numbers in which data is historically non-correctable and the maximum number and the minimum number of page numbers in which data is currently non-correctable. By using this method, the risk level of the data block is determined based on the current non-correctable information and the historical non-correctable information of the data block, so that selective storage can be performed according to the risk level of the data block when data is stored, the probability of data loss is reduced, and the reliability of data storage is improved.
[0024] Optionally, the historical uncorrectable information of the first data block includes the maximum data retention time and the total number of pages where uncorrectable data occurred in the past. The current uncorrectable information of the first data block includes the data retention time where uncorrectable data occurs currently, the number of erase / write cycles where uncorrectable data occurs currently, and the total number of pages where uncorrectable data occurs currently. Determining the risk level of the first data block based on its historical and current uncorrectable information includes: storing the data with the maximum historical uncorrectable data retention time and the current uncorrectable data... The maximum value of the retention time is determined as the maximum data retention time for data that cannot be corrected in the first data block; the total number of pages with data that cannot be corrected in the first data block is obtained based on the total number of pages with data that cannot be corrected in the past and the total number of pages with data that cannot be corrected in the present; when the maximum data retention time for data that cannot be corrected in the first data block is lower than a first preset threshold, and the number of erase / write operations for data that cannot be corrected in the first data block is lower than a second preset threshold, and the total number of pages with data that cannot be corrected in the first data block is greater than a third preset threshold, then the risk level of the first data block is confirmed to be higher than the reference level.
[0025] In this embodiment, when the data on the first page of a first data block is uncorrectable, each page in the first data block (excluding the first page) is individually inspected to obtain the current data retention time, the number of erase / write operations, and the total number of pages currently experiencing uncorrectable data errors. Based on the historical maximum data retention time, the historical total number of pages experiencing uncorrectable data errors, and the current maximum data retention time, the number of erase / write operations, and the current total number of pages experiencing uncorrectable data errors, the risk level of the first data block is determined. This method, which determines the risk level of a data block based on its current and historical uncorrectable data information, allows for selective storage based on the risk level of the data block during data storage, reducing the probability of data loss and thus improving data storage reliability.
[0026] As a possible implementation, managing the first data block according to its risk level includes: if the risk level of the first data block is higher than a reference level, then deleting the first data block from the data storage array.
[0027] As a possible implementation, if the risk level of the first data block is not higher than the reference level, then the first data block in the data storage array is used for data storage.
[0028] The step of using the first data block in the data storage array for data storage may include: confirming whether the risk level of the first data block is lower than a first preset level, the first preset level being set according to a threshold of data importance level; if the risk level of the first data block is lower than the first preset level, then storing the first data in the first data block, wherein the first data is important data. In other words, when the risk level of the first data block is not higher than the reference level, different types of data can be stored based on the obtained risk level of the data block. For example, data blocks with a high risk level but lower than the reference level are used to store general data; data blocks with a risk level lower than the first preset level are used to store important data.
[0029] In this embodiment of the application, by quantifying the risk of data blocks, selective storage based on the risk level of data blocks can be achieved during data storage, reducing the probability of data loss and thus improving the reliability of data storage.
[0030] A second aspect of this application provides an apparatus for managing a data storage array, comprising: a reading module for reading data stored in a first data block in the data storage array; an acquisition module for acquiring current uncorrectable information of the first data block when it is detected that the data of the first page of the first data block is uncorrectable, wherein the first data block includes N pages, the first page is any one of the N pages, and N is an integer greater than 1; a determination module for determining the risk level of the first data block based on the historical uncorrectable information and the current uncorrectable information of the first data block; and a management module for managing the data storage array according to the risk level of the first data block.
[0031] Optionally, the historical uncorrectable error information of the first data block includes the total number of historical uncorrectable data erase / write events, and the current uncorrectable error information of the first data block includes the current number of current uncorrectable data erase / write events. The determining module is specifically used to: obtain the total number of uncorrectable data erase / write events in the first data block based on the total number of historical uncorrectable data erase / write events and the current number of current uncorrectable data erase / write events; when the total number of uncorrectable data erase / write events in the first data block is higher than a first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level.
[0032] Optionally, the historical uncorrectable error information of the first data block includes the total number of historical uncorrectable data erase / write events and the first occurrence of uncorrectable data erase / write events. The current uncorrectable error information of the first data block includes the current number of uncorrectable data erase / write events. The determining module is specifically used to: obtain the total number of uncorrectable data erase / write events in the first data block based on the current number of uncorrectable data erase / write events and the total number of historical uncorrectable data erase / write events; when the total number of uncorrectable data erase / write events in the first data block is higher than a second preset threshold but not higher than a first preset threshold, and the difference between the current uncorrectable data erase / write events and the first occurrence of uncorrectable data erase / write events in the first data block is less than a third preset threshold, then the risk level of the first data block is confirmed to be higher than the reference level.
[0033] Optionally, the historical uncorrectable error information of the first data block includes the total number of historical uncorrectable data erase / write events and the first occurrence of uncorrectable data erase / write events. The current uncorrectable error information of the first data block includes the current occurrence of uncorrectable data erase / write events and the number of events corresponding to the current occurrence of uncorrectable data erase / write events. The determining module is specifically used to: obtain the total number of events corresponding to uncorrectable data erase / write events in the first data block based on the number of events corresponding to the current occurrence of uncorrectable data erase / write events and the total number of historical uncorrectable data erase / write events; when the difference between the current occurrence of uncorrectable data erase / write events and the first occurrence of uncorrectable data erase / write events in the first data block exceeds a fourth preset threshold, and the total number of events corresponding to uncorrectable data erase / write events in the first data block is higher than a fifth preset threshold but not higher than a second preset threshold, then the risk level of the first data block is confirmed to be lower than the reference level.
[0034] Optionally, the historical uncorrectable information of the first data block includes the historical maximum erase operation time, and the current uncorrectable information of the first data block includes the current erase operation time. The determining module is specifically used to: determine the maximum value of the historical maximum erase operation time and the current erase operation time as the maximum erase operation time of the first data block; when the maximum erase operation time of the first data block is higher than a first preset threshold, then confirm that the risk level of the first data block is higher than the reference level.
[0035] Optionally, the historical uncorrectable information of the first data block includes the historical minimum programming operation time, and the current uncorrectable information of the first data block includes the current minimum programming operation time. The determining module is specifically used to: determine the minimum value of the historical minimum programming operation time and the current minimum programming operation time as the minimum programming operation time of the first data block; when the minimum programming operation time of the first data block is less than a first preset threshold, then confirm that the risk level of the first data block is higher than the reference level.
[0036] Furthermore, the acquisition module is specifically used to: detect the other N-1 pages in the first data block, excluding the first page, to obtain the current uncorrectable information of the first data block.
[0037] Optionally, the historical uncorrectable error information of the first data block includes the maximum and minimum page numbers where uncorrectable errors occurred historically, and the current uncorrectable error information of the first data block includes the maximum and minimum page numbers where uncorrectable errors currently occur. The determining module is specifically configured to: determine the maximum value between the current maximum page number where uncorrectable errors occur and the historical maximum page number where uncorrectable errors occur as the maximum page number where uncorrectable errors occur in the first data block; determine the minimum value between the current minimum page number where uncorrectable errors occur and the historical minimum page number where uncorrectable errors occur as the minimum page number where uncorrectable errors occur in the first data block; obtain the difference between the maximum and minimum page numbers where uncorrectable errors occur in the first data block; and when the difference exceeds a first preset threshold, confirm that the risk level of the first data block is higher than the reference level.
[0038] Optionally, the historical uncorrectable error information of the first data block includes the maximum data retention time and the total number of pages in the history of uncorrectable data. The current uncorrectable error information of the first data block includes the current data retention time, the number of erase / write operations, and the total number of pages in the current history of uncorrectable data. The determining module is specifically used to: determine the maximum value of the historical maximum data retention time and the current data retention time as the maximum data retention time in the first data block; obtain the total number of pages in the first data block that are subject to uncorrectable data based on the total number of pages in the history of uncorrectable data and the current total number of pages in the current history of uncorrectable data; and confirm that the risk level of the first data block is higher than the reference level when the maximum data retention time in the first data block is lower than a first preset threshold, the number of erase / write operations in the first data block is lower than a second preset threshold, and the total number of pages in the first data block is greater than a third preset threshold.
[0039] As a possible implementation, the management module is specifically used to: delete the first data block in the data storage array if the risk level of the first data block is higher than the reference level.
[0040] As a possible implementation, the management module is specifically used to: if the risk level of the first data block is not higher than the reference level, then use the first data block in the data storage array for data storage.
[0041] A third aspect of this application provides an apparatus for managing data blocks, including a processor and a NAND Flash management module. The processor is configured to read data stored in a first data block in a data storage array. The NAND Flash management module is configured to obtain current uncorrectable information of the first data block when the data on the first page of the first data block is uncorrectable. The first data block includes N pages, and the first page is any one of the N pages, where N is an integer greater than 1. The NAND Flash management module is further configured to determine the risk level of the first data block based on its historical uncorrectable information and current uncorrectable information. The processor is further configured to manage the first data block according to its risk level.
[0042] The historical uncorrectable error information includes the total number of historical uncorrectable data erase / write cycles, and the current uncorrectable error information includes the number of current uncorrectable data erase / write cycles. The risk level of the first data block is determined based on the total number of historical uncorrectable data erase / write cycles and the number of current uncorrectable data erase / write cycles.
[0043] Specifically, the NAND Flash management module is used to: obtain the total number of times data cannot be corrected during erasure and rewriting in the first data block based on the total number of times historical data cannot be corrected during erasure and rewriting and the current number of times data cannot be corrected during erasure and rewriting; when the total number of times data cannot be corrected during erasure and rewriting in the first data block is higher than a first preset threshold, the risk level of the first data block is confirmed to be higher than a reference level, wherein the reference level is set based on the threshold of the risk level corresponding to the data block when it is eliminated.
[0044] Furthermore, when the total number of uncorrectable erase / write events in the first data block is higher than the second preset threshold but not higher than the first preset threshold, the historical uncorrectable information of the first data block also includes the first occurrence of uncorrectable erase / write events, and the current uncorrectable information also includes the current occurrence of uncorrectable erase / write events. The NAND Flash management module is specifically used to: confirm whether the difference between the current occurrence of uncorrectable erase / write events in the first data block and the first occurrence of uncorrectable erase / write events in the first data block is less than the third preset threshold; if it is less than the third preset threshold, then confirm that the risk level of the first data block is higher than the reference level.
[0045] Furthermore, when the total number of erase / write operations corresponding to uncorrectable data errors in the first data block is higher than the fourth preset threshold but not higher than the second preset threshold, the NAND Flash management module is specifically used to: confirm whether the difference between the current number of erase / write operations corresponding to uncorrectable data errors in the first data block and the first time uncorrectable data errors occurred in the first data block exceeds the fifth preset threshold, wherein the fifth preset threshold is greater than the third preset threshold; if it exceeds the fifth preset threshold, then confirm that the risk level of the first data block is lower than the reference level.
[0046] As another implementation, the historical uncorrectable error information includes the historical maximum erase operation time, and the current uncorrectable error information includes the current erase operation time. The NAND Flash management module is specifically used to: determine the maximum value of the historical maximum erase operation time and the current erase operation time as the maximum erase operation time of the first data block; when the maximum erase operation time of the first data block is higher than a first preset threshold, it is confirmed that the risk level of the first data block is higher than the reference level.
[0047] As another implementation, the historical uncorrectable error information includes the historical minimum programming operation time, and the current uncorrectable error information includes the current minimum programming operation time. The NAND Flash management module is specifically used to: determine the minimum value of the historical minimum programming operation time and the current minimum programming operation time as the minimum programming operation time of the first data block; when the minimum programming operation time of the first data block is less than a first preset threshold, then confirm that the risk level of the first data block is higher than the reference level.
[0048] In another implementation, the processor is further configured to: detect the other N-1 pages in the first data block, excluding the first page, to obtain the current uncorrectable information of the first data block.
[0049] Further, the historical uncorrectable error information includes the maximum and minimum page numbers where data cannot be corrected in the past, and the current uncorrectable error information includes the maximum and minimum page numbers where data cannot be corrected currently. The NAND Flash management module is specifically used to: determine the maximum value between the current maximum page number and the historical maximum page number as the maximum page number where data cannot be corrected in the first data block; determine the minimum value between the current minimum page number and the historical minimum page number as the minimum page number where data cannot be corrected in the first data block; obtain the difference between the maximum and minimum page numbers where data cannot be corrected in the first data block; and when the difference exceeds a first preset threshold, confirm that the risk level of the first data block is higher than a reference level, where the reference level is set based on the threshold of the risk level corresponding to the data block's elimination.
[0050] As another implementation, the historical uncorrectable error information includes the maximum data retention time and the total number of pages in the history of uncorrectable data. The current uncorrectable error information includes the current data retention time, the number of erase / write operations, and the total number of pages in the current data. Specifically, the NAND Flash management module is used to: determine the maximum value between the historical maximum data retention time and the current data retention time as the maximum data retention time for uncorrectable data in the first data block; obtain the total number of pages in the first data block that are subject to uncorrectable data based on the total number of pages in the history of uncorrectable data and the current total number of pages in the current data block; when the maximum data retention time for uncorrectable data in the first data block is lower than a first preset threshold, the number of erase / write operations for uncorrectable data in the first data block is lower than a second preset threshold, and the total number of pages in the first data block that are subject to uncorrectable data is greater than a third preset threshold, then the risk level of the first data block is confirmed to be higher than a reference level, where the reference level is set based on the threshold of the risk level corresponding to the data block at the time of data block obsolescence.
[0051] Specifically, the processor is used to: delete the first data block from the data storage array if the risk level of the first data block is higher than the reference level.
[0052] The processor is further configured to: if the risk level of the first data block is not higher than the reference level, then use the first data block in the data storage array for data storage.
[0053] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that is executed by a processor to implement the method. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments or background art of this application, the accompanying drawings involved in the embodiments or background art of this application will be briefly described below.
[0055] Figure 1 This is a schematic diagram of the structure of a NAND Flash chip in the prior art;
[0056] Figure 2 This is a schematic diagram of the data storage array structure of a NAND Flash chip in the prior art;
[0057] Figure 3 A flowchart illustrating a method for managing a data storage array provided in an embodiment of this application;
[0058] Figure 4 A flowchart illustrating a method for managing a data storage array provided in an embodiment of this application;
[0059] Figure 5 A flowchart illustrating a method for managing a data storage array provided in an embodiment of this application;
[0060] Figure 6 A flowchart illustrating a method for managing a data storage array provided in an embodiment of this application;
[0061] Figure 7 This application provides a schematic diagram of the structure of a system for managing a data storage array.
[0062] Figure 8 This is a schematic diagram of the structure of a Block hierarchical module provided in an embodiment of this application. Detailed Implementation
[0063] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0064] In existing technologies, when data read from a data block is found to contain uncorrectable codewords (UNC) after error checking and correction coding (ECC) processing, the block is directly marked as a bad block and discarded.
[0065] However, the inability to decode data in a single read can have several causes. For example, a page might be susceptible to errors due to data retention time (DR) and read disturbance frequency (RD). In such cases, after data recovery via the SSD or a Redundant Array of Independent Disks (RAID), the block does not need to be discarded since it is internally defective. Alternatively, when the internal defect of a block is weak, it may probabilistically produce undefined blocks (UNCs). Due to RAID protection, this block can avoid prematurely being marked as a bad block and resulting in device capacity loss.
[0066] Therefore, this application provides a method, apparatus, and storage medium for managing a data storage array, including: reading data stored in a first data block in the data storage array; when it is detected that the data on the first page of the first data block is uncorrectable, obtaining the current uncorrectable information of the first data block, wherein the first data block includes N pages, the first page is any one of the N pages, and N is an integer greater than 1; determining the risk level of the first data block based on the historical uncorrectable information and the current uncorrectable information of the first data block; and managing the data storage array according to the risk level of the first data block. In this application embodiment, the risk level of the data block is determined based on the current uncorrectable information and historical uncorrectable information of the data block, and then the data storage array is managed according to the risk level of the data block. The risk level is determined based on the current uncorrectable information and historical uncorrectable information of the data block. Compared with the prior art method of deleting the data block when data becomes uncorrectable, this solution provides more objective management of data blocks and reduces unnecessary loss of device capacity.
[0067] On the other hand, when managing the data storage array, this solution quantifies the risk of data blocks, enabling selective storage based on the risk level of data blocks during data storage, reducing the probability of data loss, and thus improving the reliability of data storage.
[0068] Reference Figure 3 The image shows a method for managing a data storage array according to an embodiment of this application. The method includes steps 301-304, as detailed below:
[0069] 301. Read the data stored in the first data block of the data storage array;
[0070] When a read data request is received from the host, the SSD device can perform a read operation on the data stored on the NAND Flash chip. This first data block can be any data block from the aforementioned data storage array.
[0071] 302. When it is detected that the data of the first page of the first data block is uncorrectable, obtain the current uncorrectable information of the first data block, wherein the first data block includes N pages, the first page is any one of the N pages, and N is an integer greater than 1;
[0072] The NAND Flash chip contains multiple data blocks, and each data block contains multiple pages. When the SSD device performs a read operation on the first page of the first data block, and detects that the data on the first page is uncorrectable, the SSD device obtains the current uncorrectable information for the first data block.
[0073] The data on the first page is considered uncorrectable if, when reading data stored on that page, the total number of flipped bits exceeds a preset number. For example, if the data stored on that page is 010101…, and when 101010… is read back, and the total number of erroneous bits exceeds the preset number, then the data on that page is considered uncorrectable.
[0074] The above is only one way to explain the uncorrectable data, and this solution does not limit the specific implementation of the uncorrectable data.
[0075] The currently uncorrectable error information for the first data block mentioned above may include the page number where the data is currently uncorrectable. The N pages of the data block correspond one-to-one with N different page numbers, such as page numbers from 1 to N. The page number where the data is currently uncorrectable is the page number corresponding to the page where the data is currently uncorrectable.
[0076] The current uncorrectable error information for the first data block may also include the number of erase / write operations that have resulted in the current uncorrectable data error. Specifically, when all pages in a data block are filled with data, an erase operation is required to rewrite the data block before data can be written again. The aforementioned number of erase / write operations that have resulted in the current uncorrectable data error corresponds to the number of erase / write operations for the data block that is currently experiencing this issue. For example, if a data block read operation is currently in progress, and the data block has undergone 50 erase / write operations before an uncorrectable data error occurs, then the corresponding number of erase / write operations for the current uncorrectable data error is 50.
[0077] The current uncorrectable error information of the first data block may further include the number of erase / write operations corresponding to the current occurrence of uncorrectable data. For example, if a data block read operation is currently being performed, and the data block has undergone 50 erase / write operations before an uncorrectable data error occurs, then the number of erase / write operations corresponding to the current occurrence of uncorrectable data is 1. If no uncorrectable data error occurs, then the number of erase / write operations corresponding to the current occurrence of uncorrectable data is 0. In this embodiment, based on the current occurrence of uncorrectable data, the number of erase / write operations corresponding to the current occurrence of uncorrectable data is 1.
[0078] The current uncorrectable error information for the first data block may also include the current erase operation time. This current erase operation time is the time taken for the current erase operation corresponding to this data block. In other words, it is the time taken to erase all the data in the data block during the current erase operation. For example, if the data block becomes uncorrectable after 50 erase / write operations, the time taken to erase all the data in the data block during the 50th erase operation.
[0079] The current uncorrectable information of the first data block may also include the data retention time for which the data is currently uncorrectable. For example, if a data block read operation is currently in progress, and the data block has undergone 50 erase / write operations before an uncorrectable error occurs, then the time interval between the 50th and 51st erase / write operations is the current data retention time for which the data is currently uncorrectable.
[0080] The above only describes a few aspects of the current uncorrectable information of the data block. The current uncorrectable information of the data block may also include other arbitrary information, which is not specifically limited in this scheme.
[0081] 303. Determine the risk level of the first data block based on the historical uncorrectable information and the current uncorrectable information of the first data block;
[0082] The SSD device can pre-store historical uncorrectable information of the first data block.
[0083] The historical uncorrectable error information for the first data block can include the total number of erase / write operations that resulted in uncorrectable data errors. For example, if a data block read operation is currently being performed, and the data block has undergone 50 erase / write operations before an uncorrectable error occurs, then the total number of historical uncorrectable erase / write operations is the total number of erase / write operations that resulted in uncorrectable data errors in the 49 erase / write operations prior to the 50th operation. For instance, if an uncorrectable error occurred after the 6th, 36th, and 49th erase / write operations, then the total number of historical uncorrectable erase / write operations would be 3.
[0084] The historical uncorrectable error information for the first data block may also include the number of erase / write operations at which the first uncorrectable error occurred. This number of erase / write operations at which the first uncorrectable error occurred is the number of erase / write operations performed on that data block. For example, if the data block experiences its first uncorrectable error after the 6th erase / write operation, then the corresponding number of erase / write operations at which the first uncorrectable error occurred for that data block is 6.
[0085] The historical uncorrectable error information for the first data block may also include the historical maximum erase operation time. For example, if a data block read operation is currently in progress, and 50 erase / write operations have been performed on the data block before an uncorrectable error occurs, then the historical maximum erase operation time is the maximum erase operation time among the 49 erase / write operations that resulted in uncorrectable data in the preceding 50 erase / write operations. For instance, if an uncorrectable error occurred after the 6th erase / write operation, the erase operation time for that operation was 5ms; after the 36th erase / write operation, the erase operation time was 3ms; and after the 49th erase / write operation, the erase operation time was 6ms. Therefore, the corresponding historical maximum erase operation time is 6ms.
[0086] The historical uncorrectable error information for the first data block may also include the maximum data retention time for historical instances of uncorrectable data. For example, if a data block read operation is currently being performed, and the data block has undergone 50 erase / write operations, and an uncorrectable error occurs, then the maximum historical data retention time for uncorrectable data is the maximum data retention time among the erase / write operations that resulted in uncorrectable data in the 49 erase / write operations preceding the 50th erase / write operation. For instance, if an uncorrectable error occurred after the 6th erase / write operation, and the time interval between the 6th and 7th erase / write operations was 48 hours; if an uncorrectable error occurred after the 36th erase / write operation, and the time interval between the 36th and 37th erase / write operations was 5 hours; and if an uncorrectable error occurred after the 49th erase / write operation, and the time interval between the 49th and 50th erase / write operations was 12 hours, then the corresponding maximum historical data retention time for uncorrectable data is 48 hours.
[0087] The above only describes a few aspects of the historical uncorrectable information of data blocks. The historical uncorrectable information of data blocks may also include other arbitrary information, which is not specifically limited in this scheme.
[0088] The risk level of the first data block is determined by combining its historical uncorrectable information and its current uncorrectable information. For example, the historical uncorrectable information of the first data block can be updated based on its current uncorrectable information to obtain its current uncorrectable information, which is then used to determine the risk level of the first data block.
[0089] 304. Manage the data storage array according to the risk level of the first data block.
[0090] Specifically, the data storage array is managed based on the risk level of the first data block obtained above. In other words, the management of the data storage array in this solution is based on the risk level of the data blocks.
[0091] The risk level of the aforementioned data blocks can include high risk, low risk, and no risk; alternatively, it can be classified according to preset levels, such as Level 1, Level 2, Level 3, etc., without specific limitations here. Of course, determining the risk level here can also involve comparing it with a reference level, such as determining that the risk level of the first data block is higher than the reference level, or determining that the risk level of the first data block is lower than the reference level, etc. The reference level can be arbitrarily set, such as being set based on a threshold of the risk level corresponding to the data block's elimination; that is, if the risk level is higher than the reference level, the data block is deleted. The above is merely an example and is not specifically limited here.
[0092] Optionally, for high-risk data blocks, data may not be stored in those blocks; instead, the blocks may be marked as bad or deleted. Low-risk data blocks can be primarily used to store data of moderate importance. Risk-free data blocks can be primarily used to store important data. This is merely an example and does not limit the specific data storage format.
[0093] Specifically, the risk level of the first data block can be checked to see if it is lower than a first preset level, which is set based on a threshold for data importance. If the risk level of the first data block is lower than the first preset level, then the first data, which is important data, is stored in the first data block. In other words, when the risk level of the first data block is not higher than the reference level, different data can be stored based on the risk level of the data block. For example, data blocks with a high risk level but lower than the reference level are used to store general data; data blocks with a risk level lower than the first preset level are used to store important data. This method enables selective storage based on the risk level of data blocks during data storage, reducing the probability of data loss and thus improving the reliability of data storage.
[0094] In this embodiment, the risk level of a data block is determined based on its current and historical uncorrectable error information, and the data storage array is then managed according to the risk level. The risk level is determined based on the current and historical uncorrectable error information of the data block. Compared to existing technologies that delete a data block only when an uncorrectable error occurs once, this solution provides more objective data block management and reduces unnecessary loss of device capacity.
[0095] The method for managing data storage arrays described above will be explained in detail below.
[0096] In one implementation, the aforementioned historical uncorrectable error information includes the total number of historical uncorrectable data erase / write cycles, and the aforementioned current uncorrectable error information includes the number of current uncorrectable data erase / write cycles. The risk level of the first data block is determined based on the total number of historical uncorrectable data erase / write cycles and the number of current uncorrectable data erase / write cycles.
[0097] Specifically, refer to Figure 4 The image shows a method for managing a data storage array provided in an embodiment of this application. The method includes steps 401-404, as detailed below:
[0098] 401. When the data on the first page of the first data block is uncorrectable, obtain the number of erase / write cycles corresponding to the current uncorrectable data in the first data block, wherein the first data block includes N pages, the first page is any one of the N pages, and N is an integer greater than 1.
[0099] In this embodiment, the current uncorrectable information of the first data block is the number of erase / write cycles corresponding to the current occurrence of uncorrectable data. If the data on the first page of the current first data block is uncorrectable, it means that the first data block has encountered uncorrectable data, and the corresponding number of erase / write cycles corresponding to the current occurrence of uncorrectable data is 1.
[0100] 402. Based on the total number of historical data erasures that cannot be corrected and the current number of data erasures that cannot be corrected, obtain the total number of data erasures that cannot be corrected in the first data block.
[0101] In this embodiment, the historical uncorrectable error information of the first data block refers to the total number of erase / write operations that resulted in uncorrectable data in the past. For example, if a data block read operation is currently being performed, and the data block has undergone 50 erase / write operations, resulting in uncorrectable data, then the total number of historical uncorrectable erase / write operations is the total number of erase / write operations that resulted in uncorrectable data in the 49 erase / write operations prior to the 50th operation. For instance, if uncorrectable data occurred after the 6th erase / write operation, the 36th erase / write operation, and the 49th erase / write operation, then the total number of historical uncorrectable erase / write operations would be 3.
[0102] The total number of uncorrectable erase / write events in the first data block is obtained by summing the total number of such events in the past and the current number. For example, if the current number of uncorrectable erase / write events is 1 and the total number of such events in the past is 3, then the total number of uncorrectable erase / write events in the first data block is 3 + 1, or 4.
[0103] Alternatively, the total number of erase / write operations that result in uncorrectable data errors in the first data block can be calculated based on preset weight ratios. For example, the weight of the total number of historically uncorrectable erase / write operations is preset to 70%, and the weight of the current number of uncorrectable erase / write operations is preset to 30%. Then, the products of the corresponding weights and the corresponding number of erase / write operations are added together to obtain the total number of erase / write operations that result in uncorrectable data errors in the first data block.
[0104] 403. When the total number of uncorrectable erase / write cycles in the first data block is higher than the first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level. The reference level is set according to the threshold of the risk level corresponding to the data block when it is eliminated.
[0105] Specifically, if the total number of uncorrectable erase / write operations in the first data block exceeds the first preset threshold, it indicates that the risk level of the first data block is high, i.e., higher than the reference level.
[0106] 404. Delete the first data block in the data storage array.
[0107] When the risk level of a data block is higher than the reference level, the SSD device can directly delete the data block so that no data is written to it in subsequent write operations.
[0108] In this embodiment, when the data on the first page of a first data block is uncorrectable, the number of erase / write cycles corresponding to the current uncorrectable data write / erase cycles of the first data block is obtained. The risk level of the first data block is determined based on the total number of historical uncorrectable data write / erase cycles of the first data block and the current number of such cycles. By using this method, the risk level of a data block is determined based on its current and historical uncorrectable information, thereby managing the data storage array. This allows for selective storage based on the risk level of the data block during data storage, reducing the probability of data loss and improving data storage reliability.
[0109] Furthermore, when the total number of uncorrectable write / erase events in the first data block is lower than the first preset threshold but higher than the second preset threshold, the historical uncorrectable information of the first data block also includes the first occurrence of an uncorrectable write / erase event, and the current uncorrectable information also includes the current occurrence of an uncorrectable write / erase event. The method further includes:
[0110] A1. Confirm whether the difference between the number of times the data in the first data block is currently uncorrectable and the number of times the data in the first data block is uncorrectable is first erased is less than a third preset threshold.
[0111] A2. If the risk level is less than the third preset threshold, then the risk level of the first data block is confirmed to be higher than the reference level.
[0112] In this embodiment, the historical uncorrectable information of the first data block is the total number of erase / write cycles corresponding to the historical occurrence of uncorrectable data and the number of erase / write cycles for the first occurrence of uncorrectable data.
[0113] When the total number of uncorrectable erase / write events in the first data block is higher than the second preset threshold but not higher than the first preset threshold, and the difference between the current uncorrectable erase / write event in the first data block and the first uncorrectable erase / write event in the first data block is less than the third preset threshold, it indicates that the risk level of the first data block is higher than the reference level.
[0114] For example, if the current number of erase / write operations that result in uncorrectable data errors is 50, and the first time such an operation occurred was 6, then the difference between the current number of erase / write operations that result in uncorrectable data errors and the first time such an operation occurred in the first data block is 44. When the total number of erase / write operations that result in uncorrectable data errors in the first data block is 6, if 6 is higher than the second preset threshold but not higher than the first preset threshold, and 44 is less than the third preset threshold, then it indicates that the risk level of the first data block is higher than the reference level.
[0115] A3. Delete the first data block in the data storage array.
[0116] When the risk level of a data block is higher than the reference level, the SSD device can directly delete the data block so that no data is written to it in subsequent write operations.
[0117] In this embodiment, when the data on the first page of a first data block is uncorrectable, the number of erase / write operations corresponding to the current uncorrectable data write / erase counts of the first data block is obtained. The risk level of the first data block is determined based on the total number of historical uncorrectable data write / erase counts, the first occurrence of uncorrectable data write / erase counts, and the current occurrence of uncorrectable data write / erase counts of the first data block. Using this method, when the total number of uncorrectable data write / erase counts in a data block is higher than a second preset threshold but not higher than the first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level if the difference between the current uncorrectable data write / erase counts and the first occurrence of uncorrectable data write / erase counts in the first data block is less than a third preset threshold. By determining the risk level of the data block, data block management can be implemented, reducing the probability of data loss and improving the reliability of data storage.
[0118] Furthermore, when the total number of uncorrectable erase / write operations in the first data block is higher than a fourth preset threshold but not higher than a second preset threshold, the method further includes:
[0119] B1. Confirm whether the difference between the number of times the data in the first data block is currently uncorrectable and the number of times the data in the first data block is uncorrectable exceeds a fifth preset threshold, wherein the fifth preset threshold is greater than the third preset threshold.
[0120] B2. If the risk level of the first data block exceeds the fifth preset threshold, it is confirmed that the risk level is lower than the reference level.
[0121] In this embodiment, the current uncorrectable information of the first data block is the number of times the data is currently uncorrectable and the number of times the data is currently uncorrectable.
[0122] When all pages of a data block are filled with data, an erase operation is required to erase the data block before data can be written again. The number of erase operations that resulted in uncorrectable data is the number of erase operations corresponding to the data block that currently exhibited uncorrectable data. For example, if a data block read operation is currently in progress, and the data block has undergone 50 erase operations before exhibiting uncorrectable data, then the number of erase operations that resulted in uncorrectable data is 50.
[0123] The total number of erase / write cycles corresponding to uncorrectable data occurrences in the history is obtained by summing the total number of erase / write cycles corresponding to uncorrectable data occurrences in the current data block.
[0124] If the difference between the number of times data cannot be corrected during erasure and the number of times data cannot be corrected during erasure in the first data block exceeds the fourth preset threshold, and the total number of times data cannot be corrected during erasure in the first data block is higher than the fifth preset threshold but not higher than the second preset threshold, then the risk level of the first data block is confirmed to be lower than the reference level.
[0125] In this embodiment, the historical uncorrectable information of the first data block includes the total number of erase / write cycles corresponding to the historical occurrence of uncorrectable data and the number of erase / write cycles for the first occurrence of uncorrectable data.
[0126] B3. Use the first data block in the data storage array for data storage.
[0127] Data blocks with low risk levels can be used for data storage.
[0128] In this embodiment, when the data on the first page of a first data block is uncorrectable, the number of erase / write operations corresponding to the current uncorrectable data write / write operations in the first data block is obtained. The risk level of the first data block is determined based on the total number of historical uncorrectable data write / write operations in the first data block, the first occurrence of uncorrectable data write / write operations, the current occurrence of uncorrectable data write / write operations in the first data block, and the number corresponding to the current uncorrectable data write / write operations. Using this method, when the total number of uncorrectable data write / write operations in the first data block is higher than a fourth preset threshold but not higher than a second preset threshold, it is confirmed that the difference between the current uncorrectable data write / write operations in the first data block and the first occurrence of uncorrectable data write / write operations in the first data block exceeds a fifth preset threshold. Therefore, the risk level of the first data block is confirmed to be lower than the reference level. By determining the risk level of the data block, data block management can be implemented, reducing the probability of data loss and improving the reliability of data storage.
[0129] As another optional implementation, embodiments of this application also provide a method for managing a data storage array. The method includes the following steps:
[0130] C1. When the data on the first page of the first data block is uncorrectable, obtain the current erase operation time of the first data block;
[0131] In this embodiment, the current uncorrectable information of the first data block is the current erase operation time.
[0132] The current erase operation time is the time taken for the current erase operation on this data block. In other words, it's the time taken to erase all the data in the data block during the current erase operation. For example, if the data block has undergone 50 erase / write operations and now the data is uncorrectable, then the time taken to erase all the data in the data block during the 50th erase operation is the erase time.
[0133] C2. The maximum value between the historical maximum erase operation time and the current erase operation time is determined as the maximum erase operation time of the first data block;
[0134] In this embodiment, the historical uncorrectable error information of the first data block is the historical maximum erase operation time. For example, if a data block read operation is currently being performed, and the data block has undergone 50 erase / write operations, and an uncorrectable error occurs, then the historical maximum erase operation time is the maximum erase operation time among the 49 erase / write operations that resulted in uncorrectable data in the preceding 50 erase / write operations. For instance, if an uncorrectable error occurred after the 6th erase / write operation, the erase operation time for that operation was 5ms; after the 36th erase / write operation, the erase operation time was 3ms; and after the 49th erase / write operation, the erase operation time was 6ms. Therefore, the corresponding historical maximum erase operation time is 6ms.
[0135] By comparing the historical maximum erase operation time with the current erase operation time, the maximum value is taken as the maximum erase operation time for the first data block.
[0136] C3. When the maximum erase operation time of the first data block is higher than the first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level.
[0137] When the maximum erase operation time of the first data block is higher than the first preset threshold, it indicates that the erase operation time is too long, indicating that the data block is abnormal, and the risk level of the first data block is determined to be higher than the reference level.
[0138] C4. Delete the first data block in the data storage array.
[0139] When the risk level of a data block is higher than the reference level, the SSD device can directly delete the data block so that no data is written to it in subsequent write operations.
[0140] In this embodiment, when the data on the first page of a first data block is uncorrectable, the current erase operation time of the first data block is obtained; the risk level of the first data block is determined based on the historical maximum erase operation time and the current erase operation time. By using this method to determine the risk level of a data block based on its current and historical uncorrectable information, selective storage based on the risk level of the data block can be achieved during data storage, reducing the probability of data loss and thus improving the reliability of data storage.
[0141] It should be noted that the maximum erase operation time in this embodiment is selected from the number of erase / write operations where data becomes uncorrectable. Of course, this solution could also select the maximum erase operation time from all erase / write operations. This solution does not specifically limit this.
[0142] As another optional implementation, this application embodiment also provides a method for managing a data storage array. The method includes the following steps:
[0143] D1. When the data on the first page of the first data block is uncorrectable, obtain the current minimum programming operation time for the first data block;
[0144] In this embodiment, the current uncorrectable information of the first data block is the current minimum programming operation time.
[0145] The current minimum programming operation time refers to the minimum programming operation time among all pages of the first data block in the current erase / write operation. In other words, it is the write time corresponding to the page that takes the shortest time to write data to each page of the first data block within the current corresponding erase / write count.
[0146] The programming operation time for each page can be centrally stored in a preset module. No specific limitations are specified here.
[0147] D2. Determine the minimum value between the historical minimum programming operation time and the current minimum programming operation time as the minimum programming operation time of the first data block;
[0148] In this embodiment, the historical uncorrectable information of the first data block is the historical minimum programming operation time. For example, if a data block read operation is currently being performed, and the data block has undergone 50 erase / write operations, resulting in uncorrectable data, then the historical minimum programming operation time is the minimum programming operation time among the erase / write operations that resulted in uncorrectable data in the 49 erase / write operations preceding the 50th erase / write operation. For instance, if uncorrectable data occurred after the 6th erase / write operation, the minimum programming operation time for writing to page 3 was 0.2ms; after the 36th erase / write operation, the minimum programming operation time for writing to page 18 was 0.05ms; and after the 49th erase / write operation, the minimum programming operation time for writing to page 8 was 0.1ms. Therefore, the corresponding historical minimum programming operation time is 0.05ms.
[0149] The minimum programming operation time is determined by comparing the historical minimum programming operation time with the current minimum programming operation time.
[0150] D3. When the minimum programming operation time of the first data block is less than the first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level.
[0151] When the minimum programming operation time of the first data block is less than the first preset threshold, the programming operation time is too short, indicating that the data block is abnormal, and the risk level of the first data block is determined to be higher than the reference level.
[0152] D4. Delete the first data block in the data storage array.
[0153] When the risk level of a data block is higher than the reference level, the SSD device can directly delete the data block so that no data is written to it in subsequent write operations.
[0154] In this embodiment, when the data on the first page of a first data block is uncorrectable, the current minimum programming operation time of the first data block is obtained; the risk level of the first data block is determined based on the historical minimum programming operation time and the current minimum programming operation time. By using this method, which determines the risk level of a data block based on its current and historical uncorrectable information, selective storage based on the risk level of the data block can be achieved during data storage, reducing the probability of data loss and thus improving the reliability of data storage.
[0155] It should be noted that the minimum programming operation time in this embodiment is selected from the number of erase / write cycles in which data becomes uncorrectable. Of course, this solution could also select the minimum programming operation time from all erase / write cycles. This solution does not specifically limit this approach.
[0156] The above embodiments all manage the data storage array when the data on the first page of a data block is detected to be uncorrectable. Furthermore, this application also provides a method for managing a data storage array. This method further includes detecting each page other than the first page separately, thereby managing the data storage array.
[0157] Reference Figure 5 As shown, the method for managing the data storage array includes steps 501-506, as detailed below:
[0158] 501. When the data on the first page of the first data block is uncorrectable, the other N-1 pages in the first data block, excluding the first page, are checked respectively to obtain the maximum and minimum page numbers of the currently uncorrectable data in the first data block. The first data block includes N pages, and the first page is any one of the N pages, where N is an integer greater than 1.
[0159] Among them, with the above Figure 4 The difference between the embodiments shown is that, in this embodiment, when the data on the first page of the first data block is uncorrectable, each of the other pages in the first data block, excluding the first page, is detected to obtain the current uncorrectable information of the first data block.
[0160] The currently uncorrectable error information refers to the maximum and minimum page numbers where the data is currently uncorrectable.
[0161] By obtaining the page numbers of the currently occurring data that cannot be corrected, the maximum and minimum page numbers can be obtained.
[0162] 502. The maximum value between the current maximum page number of the data that cannot be corrected and the historical maximum page number of the data that cannot be corrected is determined as the maximum page number of the data that cannot be corrected in the first data block.
[0163] 503. The minimum value between the current page number where the data cannot be corrected and the historical page number where the data cannot be corrected is determined as the minimum page number where the data in the first data block cannot be corrected.
[0164] In this embodiment, the historical uncorrectable information of the first data block consists of the maximum and minimum page numbers where uncorrectable data occurred in the past. These maximum and minimum page numbers are the maximum and minimum values among the page numbers where uncorrectable data occurred during the number of erase / write cycles in the past.
[0165] 504. Obtain the difference between the largest and smallest page numbers in the first data block where the data cannot be corrected;
[0166] 505. When the difference exceeds the first preset threshold, it is confirmed that the risk level of the first data block is higher than the reference level.
[0167] If the difference between the maximum and minimum page numbers in the first data block that cannot be corrected exceeds a first preset threshold, it indicates that the risk level of the first data block is high. This first preset threshold can be the same as or different from any of the aforementioned first preset thresholds.
[0168] 506. Delete the first data block in the data storage array.
[0169] When the risk level of a data block is higher than the reference level, the SSD device can directly delete the data block so that no data is written to it in subsequent write operations.
[0170] In this embodiment, when the data on the first page of a first data block is uncorrectable, each page in the first data block (excluding the first page) is inspected to obtain the maximum and minimum page numbers of the currently uncorrectable data in the first data block. The risk level of the first data block is determined based on the historical maximum and minimum page numbers of the first data block and the current maximum and minimum page numbers of the uncorrectable data. By using this method to determine the risk level of a data block based on its current and historical uncorrectable information, selective storage based on the risk level of the data block can be achieved during data storage, reducing the probability of data loss and thus improving the reliability of data storage.
[0171] Reference Figure 6 The image shows another method for managing a data storage array provided in this application embodiment. The method includes steps 601-605, as detailed below:
[0172] 601. When the data on the first page of the first data block is uncorrectable, the other N-1 pages in the first data block (excluding the first page) are checked respectively to obtain the data retention time, the number of erase / write operations, and the total number of pages in the first data block where the data is currently uncorrectable. The first data block comprises N pages, and the first page is any one of the N pages, where N is an integer greater than 1.
[0173] Among them, with the above Figure 4 to Figure 5 The difference between the embodiments shown is that, in this embodiment, when the data on the first page of the first data block is uncorrectable, each of the other pages in the first data block, excluding the first page, is detected to obtain the current uncorrectable information of the first data block.
[0174] The currently uncorrectable error information includes the data retention time for the currently uncorrectable data, the number of erase / write cycles for the currently uncorrectable data, and the total number of pages for the currently uncorrectable data.
[0175] If a data block read operation is currently in progress, and the data block has undergone 50 erase / write operations before becoming uncorrectable, then the time interval between the 50th and 51st erase / write operations is the data retention time for the current uncorrectable data.
[0176] The total number of pages where data cannot be corrected is the total number of pages corresponding to this data block that have become uncorrectable during this erase / write operation. For example, if a data block read operation is currently in progress, and after 50 erase / write operations, uncorrectable data has occurred, and it is confirmed that pages 1, 5, 8, and 23 have also become uncorrectable, then the total number of pages with uncorrectable data is currently 4.
[0177] 602. The maximum value between the historically uncorrectable data retention time and the currently uncorrectable data retention time is determined as the maximum uncorrectable data retention time in the first data block;
[0178] If a data block read operation is currently in progress, and the data block has undergone 50 erase / write operations, and an uncorrectable data error occurs, then the maximum data retention time for this historical occurrence of uncorrectable data error is the maximum data retention time among the 49 erase / write operations that resulted in uncorrectable data error before the 50th erase / write operation. For example, if an uncorrectable data error occurred after the 6th erase / write operation, and the time interval between the 6th and 7th erase / write operations was 48 hours; if it occurred after the 36th erase / write operation, and the time interval between the 36th and 37th erase / write operations was 5 hours; and if it occurred after the 49th erase / write operation, and the time interval between the 49th and 50th erase / write operations was 12 hours, then the corresponding maximum data retention time for this historical occurrence of uncorrectable data error is 48 hours.
[0179] By comparing the maximum data retention time of historically occurring data that cannot be corrected with the current data retention time of data that cannot be corrected, the maximum value is determined as the maximum data retention time of data that cannot be corrected in the first data block.
[0180] 603. Based on the total number of pages of historically uncorrectable data and the total number of pages of currently uncorrectable data, obtain the total number of pages of uncorrectable data in the first data block;
[0181] The total number of pages with historically uncorrectable data errors can be understood as follows: For example, if a data block read operation is currently in progress, and that data block has undergone 50 erase / write operations, and an uncorrectable data error occurs, then the total number of pages with historically uncorrectable data errors is the total number of pages with historically uncorrectable data errors among the 49 erase / write operations preceding the 50th erase / write operation. For instance, if an uncorrectable data error occurred after the 6th erase / write operation (3 pages), after the 36th erase / write operation (8 pages), and after the 49th erase / write operation (20 pages), then the total number of pages with historically uncorrectable data errors is 3 + 8 + 20, which is 31 pages.
[0182] The total number of pages with currently uncorrectable data is obtained by adding the total number of pages with historically uncorrectable data.
[0183] 604. When the maximum data retention time for data that cannot be corrected in the first data block is lower than the first preset threshold, and the number of erase / write operations for data that cannot be corrected in the first data block is lower than the second preset threshold, and the total number of pages for data that cannot be corrected in the first data block is greater than the third preset threshold, then the risk level of the first data block is confirmed to be higher than the reference level.
[0184] In this embodiment, the historical uncorrectable information of the first data block includes the maximum data retention time and the total number of pages in the history of uncorrectable data.
[0185] When the maximum data retention time for data that cannot be corrected in the first data block is lower than the first preset threshold, and the number of erase / write operations for data that cannot be corrected in the first data block is lower than the second preset threshold, and the total number of pages for data that cannot be corrected in the first data block is greater than the third preset threshold, it indicates that the risk level of the first data block is high.
[0186] 605. Delete the first data block in the data storage array.
[0187] When the risk level of a data block is higher than the reference level, the SSD device can directly delete the data block so that no data is written to it in subsequent write operations.
[0188] In this embodiment, when the data on the first page of a first data block is uncorrectable, each page in the first data block (excluding the first page) is individually inspected to obtain the current data retention time, the number of erase / write operations, and the total number of pages currently experiencing uncorrectable data errors. Based on the historical maximum data retention time, the historical total number of pages experiencing uncorrectable data errors, and the current maximum data retention time, the number of erase / write operations, and the current total number of pages experiencing uncorrectable data errors, the risk level of the first data block is determined. This method, which determines the risk level of a data block based on its current and historical uncorrectable data information, allows for selective storage based on the risk level of the data block during data storage, reducing the probability of data loss and thus improving data storage reliability.
[0189] It should be noted that the above embodiments only describe a method for managing a data storage array based on some historical uncorrectable information and some current uncorrectable information. The embodiments of this application are not limited to the aforementioned historical uncorrectable information and current uncorrectable information. They can also be any other historical uncorrectable information and other current uncorrectable information, etc.
[0190] The multiple first preset thresholds in the embodiments of this application may be equal or unequal. No specific limitation is made here.
[0191] The following describes a system for managing data storage arrays. For example... Figure 7 As shown, the system may include a host and SSD devices. The SSD devices include an SSD controller and multi-channel NAND Flash. The SSD controller connects to the host (such as a server) via various protocol interfaces such as NMVe / SAS / PCIe / UFS / eMMC to receive read and write requests from the host. The SSD controller also accesses and controls the NAND Flash chips on the channels through the NAND Flash interface. The SSD controller includes a processor, a data cache, and a NAND Flash management module. A block hierarchy module is located within the NAND Flash management module of the SSD controller. The block hierarchy module is used to manage the data storage array.
[0192] When the SSD device reads UNC data from a data block of NAND Flash, the SSD device can perform the following actions: Figure 3 to Figure 6 The method described in any of the embodiments is used to determine the risk level of the data block.
[0193] Optional, such as Figure 8 As shown, the Block grading module includes a Block-UNC management table storage unit, a UNC information extraction unit, and a Block grading calculation unit. When the SSD device reads data that is UNC from a certain Block, it obtains the address of that Block. The UNC information extraction unit initiates data reading from other pages within that Block, determines whether the data on other pages is UNC, thereby obtaining the total number of UNC pages, as well as the maximum and minimum page numbers of all UNCs within the Block. Based on the address of that Block, the UNC information extraction unit searches for the historical information of that Block in the Block-UNC management table stored in the Block-UNC management table storage unit, and updates the content of the Block-UNC management table in conjunction with the parameters obtained above. The Block grading calculation unit calculates the risk level of that Block based on the updated UNC information.
[0194] The contents of the Block-UNC management table are shown in Table 1 below:
[0195] Table 1
[0196] Attribute Meaning BLOCK_ADDR Block address CNT_PE Total number of times that the PE appears in the UNC PE_FIRST_UNC The PE value of the first time that the UNC appears PE_LAST_UNC The PE value of the last time that the UNC appears CNT_UNC Total number of the UNC PAGE_MAX The maximum Page number that the UNC appears in the history
[0197] PAGE_MIN The minimum Page number that the UNC appears in the history
[0198] The Block grading calculation unit calculates based on the updated UNC information to obtain the risk level of the Block. Among them, when the UNC information of the Block meets at least one of the following conditions, the risk level of the Block is high, and it can be marked as a bad block and no longer used for data storage.
[0199] 1) CNT_PE > a, that is, when the number of program erase (PE) times of UNC occurs in this Block is higher than the threshold a, the risk level of this Block is higher than the reference level.
[0200] 2) b < CNT_PE < a, and PE_LAST_UNC - PE_FIRST_UNC < c, that is, when the number of PE times of UNC occurs in this Block does not reach the threshold a but is higher than the threshold b, and at the same time, the difference between the PE of the last occurrence of UNC and the PE of the first occurrence of UNC is small, then the risk level of this Block is higher than the reference level.
[0201] 3) PAGE_MAX - PAGE_MIN > d, that is, when the range of Pages with UNC occurrences inside this Block is large, it is confirmed that the risk level of this Block is higher than the reference level.
[0202] For the above conditions 1), 2) and 3), it can be determined that the risk level of the Block is higher than the reference level if any one of the conditions is met. Or, it can also be determined that the risk level of the Block is higher than the reference level if both 1) and 3) are met, or both 2) and 3) are met.
[0203] Among them, when the Block meets the following condition 4), the risk level of the Block is lower than the reference level, and the SSD controller can protect it by regularly detecting the data.
[0204] 4) When e < CNT_PE < b, and PE_LAST_UNC - PE_FIRST_UNC > f, that is, when the difference between the PE of the last occurrence of UNC and the PE of the first occurrence of UNC in this Block is large, but the total number of PE times of UNC occurrences is large, then the risk level of this Block is lower than the reference level.
[0205] Among them, when the Block does not meet any of the above conditions 1) to 4), it is determined that the Block is a normal Block and no other processing is required.
[0206] It should be noted that the above a, b, c, d, e, f are all configurable parameters, and these parameters can be determined through the measured data of the NAND Flash. Optionally, a set of available parameters is: a = 12, b = 4, c = 25, d = 64, e = 6, f = 50. During the parameter setting process, the values of b and e are less than a; the value of f is greater than c. Among them, different parameter values affect the risk judgment criteria within a certain range.
[0207] Alternatively, the content of the Block-UNC management table can be referred to as shown in Table 2 below:
[0208] Table 2
[0209] Attribute Meaning BLOCK_ADDR Block address CNT_PE Total number of times that the PE appears in the UNC PE_FIRST_UNC The PE value of the first time that the UNC appears PE_LAST_UNC The PE value of the last time that the UNC appears CNT_UNC Total number of the UNC PAGE_MAX The maximum Page number that the UNC appears in the history PAGE_MIN The minimum Page number that the UNC appears in the history DR The maximum DR time that the UNC appears
[0210] RD The maximum RD number that the UNC appears tPROG_Max The maximum programming operation time of the Block tPROG_Min The minimum programming operation time of the Block tERASE_Max The maximum erase operation time of the Block tERASE_Min The minimum erase operation time of the Block
[0211] Among them, when the UNC information of the Block meets at least one of the following conditions, the risk level of the Block is higher than the reference level, and bad block marking can be performed, and data storage and use are no longer carried out.
[0212] 5) tERASE_Max > g, that is, when the maximum erase operation time of the Block is too large, the risk level of the Block is higher than the reference level.
[0213] 6) CNT_UNC > h, and PE_LAST_UNC < i, and DR < j, that is, when the DR time of the Block is small, the number of PEs at the last occurrence of UNC is low, and the total number of occurrences of UNC in the Block is too large, the risk level of the Block is higher than the reference level.
[0214] 7) tPROG_min < k, that is, the minimum programming operation time of the Block is too low, the risk level of the Block is higher than the reference level.
[0215] It should be noted that the above g, h, i, j, k are all configurable parameters, and these parameters can be determined through the measured data of the NAND Flash. Optionally, a set of available parameters is: g = 50ms, h = 100, i = 30, j = 1hr, k = 1ms.
[0216] The embodiment of the present application also provides a device for managing a data storage array, including:
[0217] A reading module, configured to read the data stored in the first data block in the data storage array;
[0218] The acquisition module is used to acquire the current uncorrectable information of the first data block when it is detected that the data of the first page of the first data block is uncorrectable, wherein the first data block includes N pages, the first page is any one of the N pages, and N is an integer greater than 1;
[0219] The determination module is used to determine the risk level of the first data block based on the historical uncorrectable information and the current uncorrectable information of the first data block.
[0220] The management module is used to manage the data storage array according to the risk level of the first data block.
[0221] The embodiments of this application employ the above-mentioned methods to determine the risk level of a data block based on its current uncorrectable information and historical uncorrectable information. This enables selective storage of data blocks according to their risk level during data storage, reducing the probability of data loss and thereby improving the reliability of data storage.
[0222] Optionally, the historical uncorrectable error information of the first data block includes the total number of historical write / erase cycles corresponding to uncorrectable data errors, and the current uncorrectable error information of the first data block includes the number of current write / erase cycles corresponding to uncorrectable data errors. The determining module is specifically used for:
[0223] Based on the total number of historical data erase / write cycles that cannot be corrected and the current number of data erase / write cycles that cannot be corrected, obtain the total number of data erase / write cycles that cannot be corrected in the first data block.
[0224] When the total number of uncorrectable erase / write operations in the first data block exceeds the first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level.
[0225] In this embodiment, when the data on the first page of a first data block is uncorrectable, the number of erase / write cycles corresponding to the current uncorrectable data write / erase cycles of the first data block is obtained. The risk level of the first data block is determined based on the total number of historical uncorrectable data write / erase cycles of the first data block and the current number of such cycles. By using this method to determine the risk level of a data block based on its current and historical uncorrectable information, selective storage based on the risk level of the data block can be achieved during data storage, reducing the probability of data loss and thus improving the reliability of data storage.
[0226] Optionally, the historical uncorrectable information of the first data block includes the total number of erase / write cycles corresponding to historical instances of uncorrectable data and the number of erase / write cycles corresponding to the first instance of uncorrectable data. The current uncorrectable information of the first data block includes the number of erase / write cycles corresponding to current instances of uncorrectable data. The determining module is specifically used for:
[0227] Based on the number of times the data cannot be corrected in the current erasure and write operation, and the total number of times the data cannot be corrected in the past erasure and write operation, obtain the total number of times the data cannot be corrected in the first data block.
[0228] When the total number of uncorrectable erase / write events in the first data block is higher than the second preset threshold but not higher than the first preset threshold, and the difference between the current uncorrectable erase / write event in the first data block and the first uncorrectable erase / write event in the first data block is less than the third preset threshold, then the risk level of the first data block is confirmed to be higher than the reference level.
[0229] In this embodiment, when the data on the first page of a first data block is uncorrectable, the number of erase / write cycles corresponding to the current uncorrectable data write cycles of the first data block is obtained. The risk level of the first data block is determined based on the total number of historical uncorrectable data write cycles, the first occurrence of uncorrectable data write cycles, and the current occurrence of uncorrectable data write cycles. By using this method to determine the risk level of a data block based on its current and historical uncorrectable information, selective storage based on the risk level of the data block can be achieved during data storage, reducing the probability of data loss and thus improving the reliability of data storage.
[0230] Optionally, the historical uncorrectable information of the first data block includes the total number of erase / write cycles corresponding to historical instances of uncorrectable data and the number of erase / write cycles that first occurred. The current uncorrectable information of the first data block includes the number of erase / write cycles currently occurring and the number corresponding to the current occurrence of uncorrectable data. The determining module is specifically used for:
[0231] Based on the number of times the data cannot be corrected in the current erasure and write operation, and the total number of times the data cannot be corrected in the past erasure and write operation, obtain the total number of times the data cannot be corrected in the first data block.
[0232] If the difference between the number of times data cannot be corrected during erasure and the number of times data cannot be corrected during erasure in the first data block exceeds the fourth preset threshold, and the total number of times data cannot be corrected during erasure in the first data block is higher than the fifth preset threshold but not higher than the second preset threshold, then the risk level of the first data block is confirmed to be lower than the reference level.
[0233] In this embodiment, when the data on the first page of a first data block is uncorrectable, the number of erase / write operations corresponding to the current uncorrectable data write / erase counts of the first data block is obtained. The risk level of the first data block is determined based on the total number of historical uncorrectable data write / erase counts, the first occurrence of uncorrectable data write / erase counts, the current occurrence of uncorrectable data write / erase counts, and the corresponding number of current uncorrectable data write / erase counts. By using this method, determining the risk level of a data block based on its current and historical uncorrectable data information, selective storage based on the risk level of the data block can be achieved during data storage, reducing the probability of data loss and thus improving the reliability of data storage.
[0234] Optionally, the historical uncorrectable information of the first data block includes the historical maximum erase operation time, and the current uncorrectable information of the first data block includes the current erase operation time. The determining module is specifically used for:
[0235] The maximum value between the historical maximum erase operation time and the current erase operation time is determined as the maximum erase operation time of the first data block;
[0236] When the maximum erase operation time of the first data block is higher than the first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level.
[0237] In this embodiment, when the data on the first page of a first data block is uncorrectable, the current erase operation time of the first data block is obtained; the risk level of the first data block is determined based on the historical maximum erase operation time and the current erase operation time. By using this method to determine the risk level of a data block based on its current and historical uncorrectable information, selective storage based on the risk level of the data block can be achieved during data storage, reducing the probability of data loss and thus improving the reliability of data storage.
[0238] Optionally, the historical uncorrectable information of the first data block includes the historical minimum programming operation time, and the current uncorrectable information of the first data block includes the current minimum programming operation time. The determining module is specifically used for:
[0239] The minimum value between the historical minimum programming operation time and the current minimum programming operation time is determined as the minimum programming operation time for the first data block.
[0240] When the minimum programming operation time of the first data block is less than the first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level.
[0241] In this embodiment, when the data on the first page of a first data block is uncorrectable, the current minimum programming operation time of the first data block is obtained; the risk level of the first data block is determined based on the historical minimum programming operation time and the current minimum programming operation time. By using this method, which determines the risk level of a data block based on its current and historical uncorrectable information, selective storage based on the risk level of the data block can be achieved during data storage, reducing the probability of data loss and thus improving the reliability of data storage.
[0242] Furthermore, the acquisition module is specifically used for:
[0243] The other N-1 pages in the first data block, excluding the first page, are inspected to obtain the current uncorrectable information of the first data block.
[0244] In this embodiment, the current uncorrectable information of the first data block also includes information obtained by detecting the other N-1 pages besides the first page. This approach makes the information acquisition more comprehensive, helping to determine the risk level of the data block based on more complete information and improving the reliability of determining the risk level of the data block.
[0245] Optionally, the historical uncorrectable information of the first data block includes the maximum and minimum page numbers where uncorrectable data occurred historically, and the current uncorrectable information of the first data block includes the maximum and minimum page numbers where uncorrectable data currently occurs. The determining module is specifically used for:
[0246] The maximum value between the current page number of data that cannot be corrected and the historical page number of data that cannot be corrected is determined as the maximum page number of data that cannot be corrected in the first data block.
[0247] The minimum value between the current page number of the data that cannot be corrected and the historical page number of the data that cannot be corrected is determined as the minimum page number of the data that cannot be corrected in the first data block.
[0248] Obtain the difference between the largest and smallest page numbers in the first data block where the data cannot be corrected;
[0249] When the difference exceeds the first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level.
[0250] Optionally, the historical uncorrectable information of the first data block includes the maximum data retention time and the total number of pages where uncorrectable data occurred in the past. The current uncorrectable information of the first data block includes the data retention time where uncorrectable data occurs, the number of erase / write operations where uncorrectable data occurs, and the total number of pages where uncorrectable data occurs. The determining module is specifically used for:
[0251] The maximum value between the historical data retention time that cannot be corrected and the current data retention time that cannot be corrected is determined as the maximum data retention time that cannot be corrected in the first data block.
[0252] Based on the total number of pages of historically occurring data that cannot be corrected and the total number of pages of currently occurring data that cannot be corrected, obtain the total number of pages of data that cannot be corrected in the first data block;
[0253] When the maximum data retention time for uncorrectable data in the first data block is lower than the first preset threshold, the number of erase / write operations for uncorrectable data in the first data block is lower than the second preset threshold, and the total number of pages for uncorrectable data in the first data block is greater than the third preset threshold, then the risk level of the first data block is confirmed to be higher than the reference level.
[0254] In this embodiment, when the data on the first page of a first data block is uncorrectable, each page in the first data block (excluding the first page) is individually inspected to obtain the current data retention time, the number of erase / write operations, and the total number of pages currently experiencing uncorrectable data errors. Based on the historical maximum data retention time, the historical total number of pages experiencing uncorrectable data errors, and the current maximum data retention time, the number of erase / write operations, and the current total number of pages experiencing uncorrectable data errors, the risk level of the first data block is determined. This method, which determines the risk level of a data block based on its current and historical uncorrectable data information, allows for selective storage based on the risk level of the data block during data storage, reducing the probability of data loss and thus improving data storage reliability.
[0255] As a possible implementation, the management module is specifically used to: delete the first data block in the data storage array if the risk level of the first data block is higher than the reference level.
[0256] As a possible implementation, the management module is specifically used to: if the risk level of the first data block is not higher than the reference level, then use the first data block in the data storage array for data storage.
[0257] This application also provides an apparatus for managing data blocks, including a processor and a NAND Flash management module, wherein:
[0258] The processor is used to read the data stored in the first data block in the data storage array;
[0259] The NAND Flash management module is used to obtain the current uncorrectable information of the first data block when the data of the first page of the first data block is uncorrectable. The first data block includes N pages, and the first page is any one of the N pages, where N is an integer greater than 1.
[0260] The NAND Flash management module is also used to determine the risk level of the first data block based on the historical uncorrectable information and the current uncorrectable information of the first data block.
[0261] The processor is also configured to manage the first data block according to its risk level.
[0262] This application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement the method described.
[0263] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0264] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0265] Furthermore, the functional units in the various embodiments of the application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software program module.
[0266] If the integrated unit is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0267] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc.
[0268] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for managing a data storage array, characterized in that, include: Read the data stored in the first data block of the data storage array; When it is detected that the data of the first page of the first data block is uncorrectable, the current uncorrectable information of the first data block is obtained, wherein the first data block includes N pages, the first page is any one of the N pages, and N is an integer greater than 1; The risk level of the first data block is determined based on the historical uncorrectable information and the current uncorrectable information of the first data block, wherein the historical uncorrectable information is the uncorrectable information generated by the operation before the detection that the data of the first page of the first data block is uncorrectable. The data storage array is managed according to the risk level of the first data block.
2. The method according to claim 1, characterized in that, The historical uncorrectable error information includes the total number of historical uncorrectable data erase / write cycles, and the current uncorrectable error information includes the number of current uncorrectable data erase / write cycles. The risk level of the first data block is determined based on the total number of historical uncorrectable data erase / write cycles and the number of current uncorrectable data erase / write cycles.
3. The method according to claim 2, characterized in that, Determining the risk level of the first data block based on its historical uncorrectable information and current uncorrectable information includes: Based on the total number of historical data erase / write cycles that cannot be corrected and the current number of data erase / write cycles that cannot be corrected, obtain the total number of data erase / write cycles that cannot be corrected in the first data block. When the total number of uncorrectable erase / write cycles in the first data block exceeds a first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level. The reference level is set based on the threshold of the risk level corresponding to the data block when it is eliminated.
4. The method according to claim 3, characterized in that, When the total number of write / erase attempts that result in uncorrectable data errors in the first data block is higher than a second preset threshold but not higher than the first preset threshold, the historical uncorrectable data information of the first data block also includes the first write / erase attempt that resulted in uncorrectable data errors, and the current uncorrectable data information also includes the current write / erase attempt that resulted in uncorrectable data errors. The method further includes: Confirm whether the difference between the number of times the data in the first data block is currently uncorrectable and the number of times the data in the first data block is uncorrectable is first erased is less than a third preset threshold. If the risk level is less than the third preset threshold, then the risk level of the first data block is confirmed to be higher than the reference level.
5. The method according to claim 4, characterized in that, When the total number of uncorrectable erase / write operations in the first data block exceeds a fourth preset threshold but does not exceed a second preset threshold, the method further includes: Confirm whether the difference between the number of times the data in the first data block is currently uncorrectable and the number of times the data in the first data block is uncorrectable exceeds a fifth preset threshold, wherein the fifth preset threshold is greater than the third preset threshold. If the risk level of the first data block exceeds the fifth preset threshold, it is confirmed that the risk level is lower than the reference level.
6. The method according to claim 1, characterized in that, The historical uncorrectable error information includes the historical maximum erase operation time, and the current uncorrectable error information includes the current erase operation time. Determining the risk level of the first data block based on its historical and current uncorrectable error information includes: The maximum value between the historical maximum erase operation time and the current erase operation time is determined as the maximum erase operation time of the first data block; When the maximum erase operation time of the first data block is higher than the first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level.
7. The method according to claim 1, characterized in that, The historical uncorrectable error information includes the historical minimum programming operation time, and the current uncorrectable error information includes the current minimum programming operation time. Determining the risk level of the first data block based on its historical and current uncorrectable error information includes: The minimum value between the historical minimum programming operation time and the current minimum programming operation time is determined as the minimum programming operation time for the first data block. When the minimum programming operation time of the first data block is less than the first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level.
8. The method according to claim 1, characterized in that, The step of obtaining the current uncorrectable information of the first data block includes: The other N-1 pages in the first data block, excluding the first page, are inspected to obtain the current uncorrectable information of the first data block.
9. The method according to claim 8, characterized in that, The historical uncorrectable error information includes the maximum and minimum page numbers where data was historically uncorrectable, and the current uncorrectable error information includes the maximum and minimum page numbers where data is currently uncorrectable. Determining the risk level of the first data block based on its historical and current uncorrectable error information includes: The maximum value between the current page number of data that cannot be corrected and the historical page number of data that cannot be corrected is determined as the maximum page number of data that cannot be corrected in the first data block. The minimum value between the current page number of the data that cannot be corrected and the historical page number of the data that cannot be corrected is determined as the minimum page number of the data that cannot be corrected in the first data block. Obtain the difference between the largest and smallest page numbers in the first data block where the data cannot be corrected; When the difference exceeds the first preset threshold, it is confirmed that the risk level of the first data block is higher than the reference level, which is set according to the threshold of the risk level corresponding to the data block when it is eliminated.
10. The method according to claim 8, characterized in that, The historical uncorrectable error information includes the maximum data retention time and the total number of pages where data was historically uncorrectable. The current uncorrectable error information includes the data retention time, the number of erase / write cycles, and the total number of pages where data is currently uncorrectable. Determining the risk level of the first data block based on its historical and current uncorrectable error information includes: The maximum value between the historical data retention time that cannot be corrected and the current data retention time that cannot be corrected is determined as the maximum data retention time that cannot be corrected in the first data block. Based on the total number of pages of historically occurring data that cannot be corrected and the total number of pages of currently occurring data that cannot be corrected, obtain the total number of pages of data that cannot be corrected in the first data block; When the maximum data retention time for uncorrectable data in the first data block is lower than the first preset threshold, and the number of erase / write operations for uncorrectable data in the first data block is lower than the second preset threshold, and the total number of pages for uncorrectable data in the first data block is greater than the third preset threshold, then the risk level of the first data block is confirmed to be higher than the reference level. The reference level is set according to the threshold of the risk level corresponding to the data block when it is eliminated.
11. The method according to any one of claims 1 to 10, characterized in that, The management of the first data block according to its risk level includes: If the risk level of the first data block is higher than the reference level, then the first data block in the data storage array will be deleted.
12. The method according to claim 11, characterized in that, Also includes: If the risk level of the first data block is not higher than the reference level, then the first data block in the data storage array will be used for data storage.
13. An apparatus for managing data blocks, characterized in that, Includes a processor and a NAND Flash management module, wherein: The processor is used to read the data stored in the first data block in the data storage array; The NAND Flash management module is used to obtain the current uncorrectable information of the first data block when it detects that the data of the first page of the first data block is uncorrectable. The first data block includes N pages, and the first page is any one of the N pages, where N is an integer greater than 1. The NAND Flash management module is further configured to determine the risk level of the first data block based on the historical uncorrectable information and the current uncorrectable information of the first data block, wherein the historical uncorrectable information is the uncorrectable information generated by operations prior to detecting that the data of the first page of the first data block is uncorrectable. The processor is also configured to manage the first data block according to its risk level.
14. The apparatus according to claim 13, characterized in that, The historical uncorrectable error information includes the total number of historical uncorrectable data erase / write cycles, and the current uncorrectable error information includes the number of current uncorrectable data erase / write cycles. The risk level of the first data block is determined based on the total number of historical uncorrectable data erase / write cycles and the number of current uncorrectable data erase / write cycles.
15. The apparatus according to claim 14, characterized in that, The NAND Flash management module is specifically used for: Based on the total number of historical data erase / write cycles that cannot be corrected and the current number of data erase / write cycles that cannot be corrected, obtain the total number of data erase / write cycles that cannot be corrected in the first data block. When the total number of uncorrectable erase / write cycles in the first data block exceeds a first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level. The reference level is set based on the threshold of the risk level corresponding to the data block when it is eliminated.
16. The apparatus according to claim 15, characterized in that, When the total number of write / erase attempts that result in uncorrectable data errors in the first data block is higher than the second preset threshold but not higher than the first preset threshold, the historical uncorrectable error information of the first data block also includes the first write / erase attempt that resulted in uncorrectable data errors, and the current uncorrectable error information also includes the current write / erase attempt that resulted in uncorrectable data errors. The NAND Flash management module is further configured to: Confirm whether the difference between the number of times the data in the first data block is currently uncorrectable and the number of times the data in the first data block is uncorrectable is first erased is less than a third preset threshold. If the risk level is less than the third preset threshold, then the risk level of the first data block is confirmed to be higher than the reference level.
17. The apparatus according to claim 16, characterized in that, When the total number of write / erase cycles that result in uncorrectable data errors in the first data block exceeds a fourth preset threshold but does not exceed a second preset threshold, the NAND Flash management module is further configured to: Confirm whether the difference between the number of times the data in the first data block is currently uncorrectable and the number of times the data in the first data block is uncorrectable exceeds a fifth preset threshold, wherein the fifth preset threshold is greater than the third preset threshold. If the risk level of the first data block exceeds the fifth preset threshold, it is confirmed that the risk level is lower than the reference level.
18. The apparatus according to claim 13, characterized in that, The historical uncorrectable error information includes the historical maximum erase operation time, and the current uncorrectable error information includes the current erase operation time. The NAND Flash management module is specifically used for: The maximum value between the historical maximum erase operation time and the current erase operation time is determined as the maximum erase operation time of the first data block; When the maximum erase operation time of the first data block is higher than the first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level.
19. The apparatus according to claim 13, characterized in that, The historical uncorrectable error information includes the historical minimum programming operation time, and the current uncorrectable error information includes the current minimum programming operation time. The NAND Flash management module is specifically used for: The minimum value between the historical minimum programming operation time and the current minimum programming operation time is determined as the minimum programming operation time for the first data block. When the minimum programming operation time of the first data block is less than the first preset threshold, the risk level of the first data block is confirmed to be higher than the reference level.
20. The apparatus according to claim 13, characterized in that, The processor is also used for: The other N-1 pages in the first data block, excluding the first page, are inspected to obtain the current uncorrectable information of the first data block.
21. The apparatus according to claim 20, characterized in that, The historical uncorrectable error information includes the maximum and minimum page numbers where historical data was uncorrectable, and the current uncorrectable error information includes the maximum and minimum page numbers where current data is uncorrectable. The NAND Flash management module is specifically used for: The maximum value between the current page number of data that cannot be corrected and the historical page number of data that cannot be corrected is determined as the maximum page number of data that cannot be corrected in the first data block. The minimum value between the current page number of the data that cannot be corrected and the historical page number of the data that cannot be corrected is determined as the minimum page number of the data that cannot be corrected in the first data block. Obtain the difference between the largest and smallest page numbers in the first data block where the data cannot be corrected; When the difference exceeds the first preset threshold, it is confirmed that the risk level of the first data block is higher than the reference level, which is set according to the threshold of the risk level corresponding to the data block when it is eliminated.
22. The apparatus according to claim 20, characterized in that, The historical uncorrectable error information includes the maximum data retention time and the total number of pages where historical data was uncorrectable. The current uncorrectable error information includes the data retention time, the number of erase / write cycles, and the total number of pages where current data is uncorrectable. The NAND Flash management module is specifically used for: The maximum value between the historical data retention time that cannot be corrected and the current data retention time that cannot be corrected is determined as the maximum data retention time that cannot be corrected in the first data block. Based on the total number of pages of historically occurring data that cannot be corrected and the total number of pages of currently occurring data that cannot be corrected, obtain the total number of pages of data that cannot be corrected in the first data block; When the maximum data retention time for uncorrectable data in the first data block is lower than the first preset threshold, and the number of erase / write operations for uncorrectable data in the first data block is lower than the second preset threshold, and the total number of pages for uncorrectable data in the first data block is greater than the third preset threshold, then the risk level of the first data block is confirmed to be higher than the reference level. The reference level is set according to the threshold of the risk level corresponding to the data block when it is eliminated.
23. The apparatus according to any one of claims 13 to 22, characterized in that, The processor is specifically used for: If the risk level of the first data block is higher than the reference level, then the first data block in the data storage array will be deleted.
24. The apparatus according to claim 23, characterized in that, The processor is also used for: If the risk level of the first data block is not higher than the reference level, then the first data block in the data storage array will be used for data storage.
25. A computer-readable storage medium storing a computer program that is executed by a processor to implement the method as claimed in any one of claims 1 to 12.
Citation Information
Patent Citations
Solid state disk reading error detecting device and method for detecting reasons for reading errors incapable of being corrected
CN106776109A