An enterprise-level SSD non-secure erasing and formatting method supporting abnormal power failure

Through Block invalidation, the Block invalid PBA information table is created and the PBA validity verification is performed, which solves the problems of abnormal power outage and performance test impacts in enterprise-level SSD non-safety erase formatting methods, and realizes efficient formatting Operation and simplified background processing.

CN115101109BActive Publication Date: 2024-12-06SHANDONG SINOCHIP SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210799743.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-08
Publication Date
2024-12-06
Estimated Expiration
2042-07-08

AI Technical Summary

Technical Problem

The non-secure erase formatting method of existing enterprise-level SSDs cannot take into account the impact of abnormal power outage processing and performance testing, resulting in the command execution time being too long or additional background operations are required, affecting subsequent performance testing.

Method used

Using Block invalidation method, by creating a Block invalid PBA information table, record the number of invalid Blocks and the last invalid PBA, traverse all Block settings invalid PBA information, and perform PBA validity verification after formatting to ensure user data isolation. Reduce formatted information maintenance and abnormal power outage handling.

Benefits of technology

While supporting abnormal power outage, it eliminates the impact of performance testing after the non-safe erase formatting commands, simplifies background operations after the formatting, and improves command execution efficiency and operability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115101109B_ABST
    Figure CN115101109B_ABST
Patent Text Reader

Abstract

The present invention discloses an enterprise-level SSD non-safety erasure formatting method supporting abnormal power failure. The method creates a Block invalid PBA information table, including the number of Blocks containing invalid PBAs and the last invalid PBA of all Blocks. When powered on for the first time, the number of Blocks containing invalid PBAs in all Blocks is set to an invalid value. If it is not the first power-on, historical information is loaded from the Block storing SSD management information to the information table. After receiving a non-safety erasure formatting command, a corresponding operation is performed according to the situation of the block. While supporting abnormal power failure, the present invention eliminates the impact of performance testing after the command is completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of solid-state storage, and in particular to an enterprise-level SSD non-safety erasing and formatting method supporting abnormal power failure. Background Art

[0002] Enterprise-level NVMe SSDs usually support multiple types of logical block address sizes (Logic Block Address Size, i.e., LBA Size) to meet the needs of users in different scenarios. Users can use the formatting command to modify the LBA Size according to their own needs during the use of the SSD, and clear the user data that has been written. The formatting command can be further classified into non-secure erase formatting and secure erase formatting. The difference is that the former only deletes the mapping of LBA to physical block address (Physical Block Address, i.e., PBA) (LBA to PBA Mapping, i.e., L2PMapping), while the latter also erases all user data on the storage medium. Existing non-secure erase formatting methods mainly prohibit users from accessing valid data by invalidating LBA. The specific methods include:

[0003] 1. Clear all L2P Mappings and save the change records to the storage medium to ensure that the SSD can inherit the formatting results after powering off and then on. The advantage is that no background operations need to be performed after formatting is completed, and there is no impact on subsequent performance tests. The disadvantage is that the command execution time is too long. If an abnormal power-off or hot-swap event occurs during the execution of the SSD, it may cause a power-off failure. Therefore, it is necessary to add an additional abnormal power-off processing process during the command execution.

[0004] 2. Set the LBA invalidation bitmap table and set all LBA-associated bits in the table to 1, indicating that all LBAs are associated with invalid data; the advantage is that the command execution time is short and does not affect abnormal power failure. The disadvantage is that background operations need to be performed, which affects subsequent performance tests.

[0005] In summary, the existing non-secure erase formatting method cannot take into account both abnormal power-off processing and performance test impact, and there is still room for further optimization. Summary of the invention

[0006] In view of the defects of the prior art, the present invention provides an enterprise-level SSD non-secure erasing and formatting method that supports abnormal power failure, while supporting abnormal power failure and eliminating the impact of performance testing after the command is completed.

[0007] In order to solve the technical problem, the technical solution adopted by the present invention is: an enterprise-level SSD non-secure erasure formatting method supporting abnormal power failure, comprising the following steps:

[0008] S01) After power on, create a Block invalid PBA information table Table blk_inv_pba , Invalid PBA information table Table blk_inv_pba The information includes the number of blocks containing invalid PBA Num inv_pba_blk_cnt And the last invalid PBA of all blocks, use Last_Inv_PBA Indicates the last invalid PBA of all blocks;

[0009] If it is the first time to power on, all blocks Last_Inv_PBA Set to an invalid value. Num inv_pba_blk_cnt Set to 0; if it is not the first power-on, load the historical information from the Block that saves the SSD management information to Table blk_inv_pba middle;

[0010] S02), receiving a non-secure erase format command, traversing all blocks, if the block is full of user data, proceeding to step S03); if the block has been written but not full of user data, proceeding to S04); if the block has not been written with user data, proceeding to S05);

[0011] S03) Associate the Block Last_Inv_PBA Set to the last PBA in the Block physical space. Num inv_pba_blk_cnt Execute the plus 1 operation;

[0012] S04) Associate the Block Last_Inv_PBA Set to the last PBA in the physical space of the Block where user data has been written. Num inv_pba_blk_cnt Execute the plus 1 operation;

[0013] S05) Block-related Last_Inv_PBA Set to an invalid value

[0014] S06), after completing the non-secure formatting and erasing command, when executing the read command or garbage collection command, execute the information table based Table blk_inv_pba Verification.

[0015] Furthermore, after completing the non-secure formatting and erasing command, a PBA validity check is performed when executing a read command. The process is as follows:

[0016] 1) Read Num inv_pba_blk_cnt, if the value is 0, the PBA validity check will not be performed, otherwise continue to execute 2);

[0017] 2) Read the PBA associated block Last_Inv_PBA ,like Last_Inv_PBA If it is an invalid value, the current PBA is valid and the verification stops; otherwise, continue with 3);

[0018] 3) PBA is greater than the associated Block Last_Inv_PBA , the current PBA is valid and the verification stops; otherwise, the PBA is invalid and empty data should be returned to the host computer.

[0019] Furthermore, after completing the non-secure formatting and erasing command, the Block validity check is performed when executing garbage collection. The process is as follows:

[0020] 1) Read the Block to be recycled Last_Inv_PBA If the value is invalid, the Block validity check will not be performed, otherwise continue to execute 2);

[0021] 2) If the block to be recycled Last_Inv_PBA It is the last PBA in its physical space, erase it directly, and then Num inv_pba_blk_cnt Execute the minus 1 operation, otherwise continue to execute 3);

[0022] 3) Only recycle Block Last_Inv_PBA The user data associated with the subsequent PBA is recovered and Num inv_pba_blk_cnt Perform a decrement operation.

[0023] Beneficial effects of the invention: This patent proposes an enterprise-level SSD non-secure erase formatting method, based on the Block invalidation method, which supports abnormal power failure while eliminating the impact of performance testing after the command is completed. Compared with the existing method, the patent method requires less formatting information to be maintained, does not require additional processing of abnormal power failure events, and the background execution operation after the formatting is completed is simpler and more efficient, so it has stronger operability and practicality. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 Formatting flowchart for non-secure erase;

[0025] Figure 2 This is the PBA validity verification flow chart;

[0026] Figure 3 This is the flow chart of Block validity verification. DETAILED DESCRIPTION

[0027] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0028] Example 1

[0029] The non-volatile storage media in enterprise-level SSDs are usually composed of a fixed number of physical blocks (Blocks), and each PBA can be associated with a unique Block; if all user data is invalid, then the data in all Blocks is invalid. The key to the non-secure erase formatting operation of enterprise-level SSDs is that after the operation is completed, it should be ensured that the user cannot obtain valid data through the upper machine read command, that is, the isolation operation of valid data. Therefore, effective data isolation can be achieved based on the Block invalidation method, that is, without changing the LBA-associated PBA information or marking whether the LBA is valid, the Block associated with the PBA is marked as invalid to ensure that user data cannot be accessed. Taking Toshiba's Bics5 TLC Nand chip as an example, if the LBA and PBA sizes are both 4KB, and 32 4-Plane Multi Blocks are combined into a Super Block as the minimum block management unit, then a Super Block contains a total of 688128 PBAs. Ideally, the same number of LBAs can be associated, that is, marking a Super Block as invalid can invalidate all 688128 LBAs associated with it, greatly improving the efficiency of formatting operations.

[0030] Based on the Block invalidation method, this embodiment discloses an enterprise-level SSD non-secure erase formatting method that supports abnormal power failure, such as Figure 1 As shown, the following steps are included:

[0031] S01) After power on, create a Block invalid PBA information table Table blk_inv_pba , Invalid PBA information table Table blk_inv_pba The information includes the number of blocks containing invalid PBA Num inv_pba_blk_cnt And the last invalid PBA of all blocks, use Last_Inv_PBA[Num total_blk_cnt ] Indicates the last invalid PBA of all blocks, where Num total_blk_cnt Indicates the total number of blocks; if a PBA is in a block and the PBA is less than or equal to the last invalid PBA of the block, the LBA associated with the PBA points to invalid data; if the last invalid PBA of the block is an invalid value, the block does not contain an invalid PBA.

[0032] If it is the first time to power on, all blocks Last_Inv_PBA Set to an invalid value. Num inv_pba_blk_cnt Set to 0; if it is not the first power-on, load the historical information from the Block that saves the SSD management information to Table blk_inv_pba middle;

[0033] S02), receiving a non-secure erase format command, traversing all blocks, if the block is full of user data, proceeding to step S03); if the block has been written but not full of user data, proceeding to S04); if the block has not been written with user data, proceeding to S05);

[0034] S03) Associate the Block Last_Inv_PBA Set to the last PBA in the Block physical space. Num inv_pba_blk_cnt Execute the plus 1 operation;

[0035] S04) Associate the Block Last_Inv_PBA Set to the last PBA in the physical space of the Block where user data has been written. Num inv_pba_blk_cnt Execute the plus 1 operation;

[0036] S05) Block-related Last_Inv_PBA Set to an invalid value

[0037] S06), after completing the non-secure formatting and erasing command, when executing the read command or garbage collection command, the execution information table Table blk_inv_pba Verification.

[0038] Taking Toshiba's Bics5 TLC Nand chip as an example, if a 4TB enterprise-level SSD uses this chip as the storage medium and 32 4-Plane Multi Blocks are combined into one Super Block as the minimum block management unit, the total number of Super Blocks is 1662, completing Table blk_inv_pba The update does not exceed 50us. Table blk_inv_pba The storage time of a block does not exceed 2ms. Enterprise-level SSD backup capacitors can usually support a power supply time of more than 30ms. Therefore, if an abnormal power outage or hot-swap event occurs during command execution, the command can be continued. After the command is executed, the safe power-off process will be executed without affecting the normal power-on again.

[0039] After completing the non-secure formatting and erasing command, if a read command is received from the host computer, after completing the LBA to PBA analysis, an additional Table blk_inv_pba PBA validity check operation, such as Figure 2 As shown, the details are as follows:

[0040] 1) Read Num inv_pba_blk_cnt , if the value is 0, the PBA validity check is no longer performed, otherwise proceed to the next step;

[0041] 2) Read the PBA associated block Last_Inv_PBA ,like Last_Inv_PBA If it is an invalid value, the current PBA is valid and the verification stops; otherwise, proceed to the next step;

[0042] 3) If PBA is greater than the associated Block Last_Inv_PBA , the current PBA is valid and the verification stops; otherwise, the PBA is invalid and empty data should be returned to the host computer.

[0043] because Table blk_inv_pba It takes up less space and can be cached in the enterprise-level SSD controller, so the additional PBA validity check operation does not affect the read performance. When executing the write command sent by the host computer, no additional operations are added, so the write performance will not be affected.

[0044] After the non-secure formatting and erasing command is completed, when performing the Garbage Collection (GC) operation, additional Table blk_inv_pba The Block validity check operation is as follows:

[0045] 1) Read the Block to be recycled Last_Inv_PBA , if the value is invalid, the Block validity check will not be performed, otherwise continue to the next step;

[0046] 2) Blocks to be recycled Last_Inv_PBA If it is the last PBA in its physical space, the Block to be recycled does not contain any valid data and is directly erased. Num inv_pba_blk_cnt Execute the minus 1 operation; otherwise, continue to the next step;

[0047] 3) Only recycle Block Last_Inv_PBA The user data associated with the subsequent PBA is recovered and Num inv_pba_blk_cnt Perform a decrement operation.

[0048] Through the block validity check operation, the GC efficiency can be significantly improved after non-secure erase formatting, unnecessary data recovery can be avoided, and after multiple GCs, Table blk_inv_pba The information is updated to the initial state, waiting to record the next non-secure erase command information.

[0049] The enterprise-level SSD non-secure erase formatting method that supports abnormal power failure proposed in this embodiment reduces the impact of the formatting operation on subsequent performance tests without affecting the abnormal power failure. Based on the method of invalidating the Block after formatting, the Block invalid PBA information table is introduced. When performing formatting, only the invalid PBA information of different types of Blocks is configured to improve the command execution efficiency. After the formatting is completed, the PBA validity check is performed during the read performance test; when performing the GC operation, the invalid PBA information of the Block to be recycled is cleared.

[0050] The above description is only the basic principle and preferred embodiments of the present invention. Improvements and substitutions made by those skilled in the art based on the present invention belong to the protection scope of the present invention.

Claims

1. An enterprise-level SSD non-secure erasing and formatting method that supports abnormal power failure, characterized in that: The following steps are involved: S01) After power on, create a Block invalid PBA information table Table blk_inv_pba , Invalid PBA information table Table blk_inv_pba The information includes the number of blocks containing invalid PBA Num inv_pba_blk_cnt And the last invalid PBA of all blocks, use Last_Inv_PBA Indicates the last invalid PBA of all blocks; If it is the first time to power on, all blocks Last_Inv_PBA Set to an invalid value. Num inv_pba_blk_cnt Set to 0; if it is not the first power-on, load the historical information from the Block that saves the SSD management information to Table blk_inv_pba middle; S02) After receiving the non-secure erase format command, traverse the data writing status of all blocks; S03), determine whether the current Block is full of user data, if the Block is full of user data, proceed to step S04); if the Block has been written but not full of user data, proceed to step S05); if the Block has not been written with user data, proceed to step S06); S04) Associate the Block Last_Inv_PBA Set to the last PBA in the Block physical space. Num inv_pba_blk_cnt Execute the plus 1 operation and proceed to step S07); S05) Associate Block Last_Inv_PBA Set to the last PBA in the physical space of the Block where user data has been written. Num inv_pba_blk_cnt Execute the plus 1 operation and proceed to step S07); S06) Associate the Block Last_Inv_PBA Set to an invalid value and proceed to step S07); S07) Determine whether the traversal of all Block data writing is completed. If not, return to step S03). If the traversal is completed, proceed to step S08); S08), after completing the non-secure erase format command, when executing the read command or garbage collection command, execute the information table based Table blk_inv_pba of verification.

2. The enterprise-level SSD non-secure erasing and formatting method supporting abnormal power failure according to claim 1, characterized in that: After completing the non-secure erase format command, the PBA validity check is performed when executing the read command. The process is as follows: 1) Read Num inv_pba_blk_cnt , if the value is 0, the PBA validity check will not be performed, otherwise continue to execute 2); 2) Read the PBA associated block Last_Inv_PBA ,like Last_Inv_PBA If the value is invalid, the current PBA is valid and the verification stops; otherwise, continue with step 3); 3) PBA is greater than the associated Block Last_Inv_PBA , the current PBA is valid and the verification stops; otherwise, the PBA is invalid and empty data should be returned to the host computer.

3. The enterprise-level SSD non-secure erasing and formatting method supporting abnormal power failure according to claim 1, characterized in that: After completing the non-secure erase format command, the block validity check is performed when executing the garbage collection command. The process is as follows: 1) Read the Block to be recycled Last_Inv_PBA If the value is invalid, the Block validity check will not be performed, otherwise continue to execute 2); 2) If the block to be recycled Last_Inv_PBA It is the last PBA in its physical space, erase it directly, and after erasing, inv_pba_blk_cnt Execute the minus 1 operation, otherwise continue to execute 3); 3) Only recycle Block Last_Inv_PBA The user data associated with the subsequent PBA is recovered and Num inv_pba_blk_cnt Perform a decrement operation.