Self-adaptive rereading device and method for read error of solid state disk
By disassembling the multi-plane read command to single-plane read command and using different or partially the same voltage axes for error correction, the problem that the solid-state drive reread mechanism cannot correct all blocks under multiple plane operations is solved, which improves the success rate of rereading and the robustness of the system.
Patent Information
- Application Number
- CN202411855823.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-17
AI Technical Summary
When the rereading mechanism of existing solid-state drives is used with the same voltage axis under multiple plane operations, all blocks cannot be corrected at the same time, resulting in reread failure.
The multi-plane read command is disassembled into several single-plane read commands through the command parsing module, and use different or partially the same voltage axes to correct errors in the reread module to complete the reread operation of nand flash.
It effectively solves the problem of reread failure caused by the wear difference of each block in different planes, and improves the success rate of rereading multiple planes and the robustness of the system.
Smart Images

Figure CN119759641A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of solid-state storage, and in particular to a solid-state hard disk read error adaptive re-reading device and method. Background Art
[0002] The read error handling process of the solid-state drive is an important part of it. It can extend the service life of the hard drive and ensure data security at the end of its service life. In addition, for solid-state drives that store data during long-term power outages, it can also extend the data storage time. The quality of read error handling directly affects the competitiveness of enterprise-level solid-state drives. Read error adaptive rereading is part of the read error handling mechanism. The principle of read error adaptive rereading is mainly to adjust different read voltage axes, judge whether the data is normal according to the LDPC result of the read data, and replace the next voltage axis if it is still abnormal, until all available voltage axes are traversed or the correct data is read. Read error adaptive rereading is based on the pre-stored voltage axis table, determines the issuance order through the judgment logic of the state machine, and analyzes the read results to judge the read status and other steps to achieve error correction effect, so that the data can be read correctly as much as possible. In actual applications, the read error adaptive rereading mechanism will first determine the parameters such as the number of erase and write times and write time of the data block that needs to be reread. Then, based on various parameters, the voltage axis sequence with the highest probability of correct reading is judged, and the original command is disassembled into a reread command, and information such as the data address and metadata address is configured. Finally, a reread command is issued and the reread results are analyzed. If there is still a read error, the voltage axis with the highest probability is taken out from the remaining table, and the above steps are repeated in sequence until completion. In general, SSDs may encounter temporary interference or occasional errors when reading data, which may cause data reading failures. The retry mechanism increases the probability of successfully reading data by trying to read data multiple times, thereby improving the reliability of data reading. It also optimizes the user experience, protects hardware, and provides troubleshooting clues. It is an important component of SSD drives, which helps ensure stable data reading and stable system operation.
[0003] Currently, there are still problems with the reread mechanism. For example, using the same voltage axis in multi-plane operation may not be able to correct all blocks at the same time. Summary of the invention
[0004] In view of the defects of the prior art, the present invention provides a solid-state hard disk read error adaptive reread device and method. Through a series of operations such as command disassembly, task query, data preparation, message return, etc., different voltage axes can be used to correct blocks of different planes, thereby completing the optimization of the reread mechanism.
[0005] In order to solve the technical problem, the technical solution adopted by the present invention is: a solid state hard disk read error adaptive rereading device, comprising: The command parsing module is used to determine whether the command with the read error is a single-plane read or a multi-plane read. If it is a multi-plane read, it is disassembled into several single-plane read commands and the parsed data is stored in the re-read module to wait for execution; The reread module completes the reread operation on the nand flash according to the data parsed by the command parsing module; The task query module is used to detect the information in the reread module. If it is detected that there is a command to be executed, the corresponding reread command is sent to the reread module. When it is detected that the read task is completed, the read status is judged. If there is still an error, the next voltage axis is used to continue to send the reread command. If the read is correct or the read is wrong but all voltage axes have been used up, the read completion will be marked. Data preparation module, after the rereading is completed, the data preparation module copies its information to the specified location according to the structure of the original command, and marks the data as ready; the data generated in the rereading is stored separately, and it is determined whether the rereading obtains the correct data, and only the correct data is stored at the target address; Message return module, all completed reread commands are stored in the queue of the message return module. The message return module automatically routes the completion status of the reread command to its incoming module. After successful sending, the message is removed from the queue.
[0006] Furthermore, when the re-read module performs re-reading, for the multiple single-plane read commands decomposed from the multi-plane read, corresponding voltage axis error correction is performed according to the conditions of the multiple single-plane read commands.
[0007] Furthermore, for multiple single plane read commands decomposed from a multi-plane read, the re-read voltage axes are all different or partially the same.
[0008] Furthermore, the data preparation module determines whether the correct data is obtained by rereading through the data status returned by the ldpc module integrated in the nandflash controller.
[0009] The present invention also discloses a solid state hard disk read error adaptive rereading method, comprising the following steps: S01, adding to the reread queue: after the firmware detects a read error, it records the relevant information of the read error and passes it to the reread queue; S02, the command parsing module parses and disassembles the original command: when the reread module is in an idle state, the command decryption module checks the reread queue. If there are messages to be processed in the reread queue, the command decryption module parses the first message at the top of the queue to determine whether the command with the read error is a single-plane read or a multi-plane read. If it is a multi-plane read, the command is disassembled into several single-plane read commands, and the parsed data is stored in the reread module, waiting for execution. S03, using the task query module to wait for the task to be completed. After the analysis is completed, the task query module sends the corresponding reread command to the reread module. The reread module completes the reread operation on the nand flash according to the data analyzed by the command analysis module. The task query module periodically queries the completion status of the read task. When all the reads in the task are completed, the reread is marked as completed. S04. Arrange the required data using the data preparation module. After the rereading is completed, the data preparation module copies the information including data and metadata to the specified location according to the structure of the original command, and marks the data as ready. S05. The message return module returns a read completion message. After the data is ready, the message return module is used to return a read completion message.
[0010] Furthermore, the method is completed by a finite state machine module, and the finite state machine model includes an initial state, a parsing state, a running state, a data preparation state, and a message recovery state; When powered on, the system automatically enters the initial state, and all state memories and information memories are restored to default values. When the polling system detects that there is a reread command to be started in the reread queue, it takes a command from the head of the reread queue and enters the parsing state. The parsing state parses the parameters in the original read message and then converts them into the standard data required by the reread module, waiting for the subsequent state call. When the parsing is completed, it automatically switches to the running state. During the parsing, it determines whether the command with the read error is a single-plane read or a multi-plane read. If it is a multi-plane read, it is disassembled into several single-plane read commands. The running state detects the command state of each plane in the state memory. If it is in the pending state, a reread command is issued and the state of the plane is changed to the running state; if it is in the running state, the running state is checked regularly to check whether it is completed. If it is completed, the state of this plane is changed to the ready state; if it is in the ready state, the reread data is checked. If it is correct, it is marked as completed, otherwise it is marked as pending. When the state of all planes changes to the completed state, it is automatically converted to the data ready state; In the data preparation state, the correct information read out from the reread module is copied to the specified address according to the format of the original read message, data length, and data address. After the copy is completed, the message reply state is automatically entered; The message reply status replies the message to the incoming module according to the read command parameters, so that the external module continues to perform its task. If the external module is busy and cannot receive the message, the message is placed in the queue to be sent until it is sent successfully.
[0011] Furthermore, in the running state, each plane executes in parallel, and for multiple single plane read commands decomposed from the multi-plane read, corresponding voltage axis error correction is taken according to the conditions of the multiple single plane read commands.
[0012] Furthermore, for multiple single plane read commands decomposed from a multi-plane read, the re-read voltage axes are all different or partially the same.
[0013] Furthermore, in the data preparation state, the data generated in the rereading is stored separately, and the data status returned by the LDPC module integrated in the nandflash controller is used to determine whether the rereading obtains the correct data, and only the correct data is stored at the target address.
[0014] Beneficial effects of the present invention: Innovation in command parsing: Provides a solution to split multi-plane reads into several single-plane reads, solving the problem of different wear of blocks in different planes. This causes interference during rereading regardless of the voltage axis setting, making it impossible to read individual blocks correctly during multi-plane rereading, leading to overall rereading failure.
[0015] State division and transition mechanism: The reread mechanism is divided into multiple states, such as initial state, instruction parsing state, running state, data preparation state, message reply state, etc., and switches between different states according to the transfer conditions. This state machine-based processing method makes the reread process clearer and more controllable, and improves the robustness of the system.
[0016] Data isolation solution: The data generated during rereading is stored separately. The data status returned by the LDPC module integrated in the nandflash controller is used to determine whether the rereading has obtained the correct data. Only the target address where the final correct data is stored is used to effectively isolate temporary data from production data. Once a failure occurs, the erroneous data can be confined to the module without contaminating other production data, thus ensuring the safety of production data. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a schematic diagram of a rereading device according to an embodiment; Figure 2 A schematic diagram of completing adaptive rereading based on a finite state machine model; Figure 3 It is a schematic diagram of multiple planes in operation; Figure 4 This is a diagram showing how messages are returned to external modules. DETAILED DESCRIPTION
[0018] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0019] Example 1 This embodiment discloses a solid state hard disk read error adaptive re-reading device, such as Figure 1 As shown, including: The command parsing module is used to determine whether the command with a read error is a single-plane read or a multi-plane read. If it is a multi-plane read, it is disassembled into several single-plane read commands and the parsed data is stored in the re-read module to wait for execution.
[0020] The reread module completes the reread operation on the nand flash according to the data parsed by the command parsing module.
[0021] The task query module is used to detect the information in the reread module. If a command is detected to be executed, the corresponding reread command is sent to the reread module. When it is detected that the read task is completed, the reading status is judged. If there is still an error, the next voltage axis is used to continue sending the reread command. If the read is correct or the read is erroneous but all voltage axes have been used up, the read completion will be marked.
[0022] Data preparation module, after the rereading is completed, the data preparation module copies its information to the specified location according to the structure of the original command, and marks the data as ready; the data generated during the rereading is stored separately, and it is determined whether the rereading has obtained the correct data, and only the correct data is stored at the target address; the temporary data and production data are effectively isolated. Once a failure occurs, the erroneous data can be limited to the inside of the module, and other production data will not be contaminated, thus ensuring the safety of production data.
[0023] Message return module, all completed reread commands are stored in the queue of the message return module and automatically routed to the incoming module according to the module that sent the message. If the incoming module is busy, it will be resent at a fixed time until the message is successfully sent. After successful sending, the message will be removed from the queue.
[0024] In this embodiment, when the reread module performs rereading, for multiple single-plane read commands decomposed from multi-plane read, corresponding voltage axis error correction is adopted according to the conditions of multiple single-plane read commands. Specifically, since the conditions of each single-plane read command are different, the reread voltage axes thereof are completely different or partially the same.
[0025] In this embodiment, the data preparation module determines whether the correct data is obtained by rereading through the data status returned by the ldpc module integrated in the nandflash controller.
[0026] Example 2 This embodiment discloses a method for adaptively rereading a solid state drive read error, comprising the following steps: S01. Join the reread queue: After the firmware detects a read error, it records the relevant information of the read error (such as address, data length, etc.) and passes it to the reread queue, waiting for the reread module to be called in sequence.
[0027] S02. The command parsing module parses and disassembles the original command: When the reread module is in an idle state, the command decryption module checks the reread queue. If there are messages to be processed in the reread queue, the first message at the top of the queue is parsed to determine whether the command with the read error is a single-plane read or a multi-plane read. If it is a multi-plane read, it is disassembled into several single-plane read commands, and the parsed data is stored in the reread module, waiting for execution.
[0028] S03, using the task query module to wait for the task to be completed. After the analysis is completed, the task query module sends the corresponding reread command to the reread module. The reread module completes the reread operation on the nand flash according to the data analyzed by the command analysis module. The task query module periodically queries the completion status of the read task. When all the reads in the task are completed, the reread is marked as completed. For multiple single plane read commands disassembled from multi-plane read, their reread voltage axes are all different or partially the same.
[0029] S04, using the data preparation module to organize the required data, after the rereading is completed, the data preparation module copies the information including data and metadata to the specified location according to the structure of the original command, and marks the data ready. This step stores the data generated in the rereading separately, and judges whether the rereading obtains the correct data through the data status returned by the ldpc module integrated in the nandflash controller, and only stores the correct data at the target address.
[0030] S05. The message return module returns a read completion message. After the data is ready, the message return module is used to return a read completion message.
[0031] The method described in this embodiment is completed by a finite state machine module, such as Figure 2 As shown, the finite state machine model includes an initial state, a parsing state, a running state, a data preparation state, and a message recovery state; When powered on, the system automatically enters the initial state, and all state memories and information memories are restored to default values. When the polling system detects a reread command to be started in the reread queue, it takes a command from the head of the reread queue and enters the parsing state.
[0032] The parsing state parses the parameters in the original read message and then converts them into standard data required by the reread module, waiting for subsequent state calls. When the parsing is completed, it automatically switches to the running state. During parsing, it determines whether the command in which the read error occurs is a single-plane read or a multi-plane read. If it is a multi-plane read, it is disassembled into several single-plane read commands.
[0033] like Figure 3 As shown, the running state detects the command state of each plane in the state memory. If it is in the state to be executed, a reread command is issued and the state of the plane is changed to the running state; if it is in the running state, the running state is checked regularly to check whether it is completed. If it is completed, the state of this plane is changed to the ready state; if it is in the ready state, the reread data is checked. If it is correct, it is marked as completed, otherwise it is marked as the state to be executed. When the state of all planes changes to the completed state, it is automatically converted to the data preparation state. In this embodiment, the running state of each plane runs in parallel. When it is in the running state, the reread module performs a reread operation on each plane. For multiple single plane read commands decomposed from the multi-plane read, corresponding voltage axis error correction is adopted according to the conditions of the multiple single plane read commands. Specifically, since the conditions of each single plane read command are different, the reread voltage axes are all different or partially the same.
[0034] In the data preparation state, the correct information read out from the reread module is copied to the specified address according to the format of the original read message, data length, and data address. After the copy is completed, the message reply state is automatically entered.
[0035] like Figure 4 As shown, the message reply status replies the message to the incoming module according to the read command parameters, so that the external module continues to perform its task. If the external module is busy and cannot receive the message, the message is placed in the queue to be sent until it is sent successfully.
[0036] This method provides a solution to split multi-plane reading into several single-plane readings, which solves the problem of different wear of blocks in different planes. This causes interference to occur regardless of the voltage axis setting during rereading, making it impossible to correctly read individual blocks in multi-plane rereading, which in turn causes overall rereading failure.
[0037] This method breaks down the rereading mechanism into multiple states, such as initial state, instruction parsing state, running state, data preparation state, message reply state, etc., and switches between different states according to the transfer conditions. This state machine-based processing method makes the rereading process clearer and more controllable, and improves the robustness of the system.
[0038] This method stores the data generated during rereading separately. The data status returned by the LDPC module integrated in the nandflash controller is used to determine whether the rereading has obtained the correct data. Only the target address where the final correct data is stored effectively isolates temporary data from production data. Once a failure occurs, the erroneous data can be confined to the module without contaminating other production data, thus ensuring the safety of production data.
[0039] 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. A solid state hard disk read error adaptive re-reading device, characterized in that: include: The command parsing module is used to determine whether the command with the read error is a single-plane read or a multi-plane read. If it is a multi-plane read, it is disassembled into several single-plane read commands and the parsed data is stored in the re-read module to wait for execution; The reread module completes the reread operation on the nand flash according to the data parsed by the command parsing module; The task query module is used to detect the information in the reread module. If it is detected that there is a command to be executed, the corresponding reread command is sent to the reread module. When it is detected that the read task is completed, the read status is judged. If there is still an error, the next voltage axis is used to continue to send the reread command. If the read is correct or the read is wrong but all voltage axes have been used up, the read completion will be marked. Data preparation module, after the rereading is completed, the data preparation module copies its information to the specified location according to the structure of the original command, and marks the data as ready; the data generated in the rereading is stored separately, and it is determined whether the rereading obtains the correct data, and only the correct data is stored at the target address; Message return module, all completed reread commands are stored in the queue of the message return module. The message return module automatically routes the completion status of the reread command to its incoming module. After successful sending, the message is removed from the queue.
2. The SSD read error adaptive re-reading device according to claim 1, characterized in that: When the re-read module performs re-reading, for multiple single plane read commands decomposed from multi-plane read, corresponding voltage axis error correction is taken according to the situations of multiple single plane read commands.
3. The SSD read error adaptive re-reading device according to claim 2, characterized in that: For multiple single plane read commands decomposed from a multi-plane read, the re-read voltage axes are all different or partially the same.
4. The SSD read error adaptive re-reading device according to claim 1, characterized in that: The data preparation module determines whether the correct data is obtained by rereading through the data status returned by the LDPC module integrated in the nandflash controller.
5. A method for adaptively rereading a solid state hard disk read error, characterized in that: The following steps are involved: S01, adding to the reread queue: after the firmware detects a read error, it records the relevant information of the read error and passes it to the reread queue; S02, the command parsing module parses and disassembles the original command: when the reread module is in an idle state, the command decryption module checks the reread queue. If there are messages to be processed in the reread queue, the command decryption module parses the first message at the top of the queue to determine whether the command with the read error is a single-plane read or a multi-plane read. If it is a multi-plane read, the command is disassembled into several single-plane read commands, and the parsed data is stored in the reread module, waiting for execution. S03, using the task query module to wait for the task to be completed. After the analysis is completed, the task query module sends the corresponding reread command to the reread module. The reread module completes the reread operation on the nand flash according to the data analyzed by the command analysis module. The task query module periodically queries the completion status of the read task. When all the reads in the task are completed, the reread is marked as completed. S04. Arrange the required data using the data preparation module. After the rereading is completed, the data preparation module copies the information including data and metadata to the specified location according to the structure of the original command, and marks the data as ready. S05. The message return module returns a read completion message. After the data is ready, the message return module is used to return a read completion message.
6. The SSD read error adaptive rereading method according to claim 5, characterized in that: This method is completed through a finite state machine module, and the finite state machine model includes an initial state, a parsing state, a running state, a data preparation state, and a message recovery state; When powered on, the system automatically enters the initial state, and all state memories and information memories are restored to default values. When the polling system detects that there is a reread command to be started in the reread queue, it takes a command from the head of the reread queue and enters the parsing state. The parsing state parses the parameters in the original read message and then converts them into the standard data required by the reread module, waiting for the subsequent state call. When the parsing is completed, it automatically switches to the running state. During the parsing, it determines whether the command with the read error is a single-plane read or a multi-plane read. If it is a multi-plane read, it is disassembled into several single-plane read commands. The running state detects the command state of each plane in the state memory. If it is in the pending state, a reread command is issued and the state of the plane is changed to the running state; if it is in the running state, the running state is checked regularly to check whether it is completed. If it is completed, the state of this plane is changed to the ready state; if it is in the ready state, the reread data is checked. If it is correct, it is marked as completed, otherwise it is marked as pending. When the state of all planes changes to the completed state, it is automatically converted to the data ready state; In the data preparation state, the correct information read out from the reread module is copied to the specified address according to the format of the original read message, data length, and data address. After the copy is completed, the message reply state is automatically entered; The message reply status replies the message to the incoming module according to the read command parameters, so that the external module continues to perform its task. If the external module is busy and cannot receive the message, the message is placed in the queue to be sent until it is sent successfully.
7. The SSD read error adaptive rereading method according to claim 6, characterized in that: In the running state, each plane executes in parallel, and for multiple single plane read commands decomposed from the multi-plane read, corresponding voltage axis error correction is taken according to the situations of multiple single plane read commands.
8. The SSD read error adaptive rereading method according to claim 7, characterized in that: For multiple single plane read commands decomposed from a multi-plane read, the re-read voltage axes are all different or partially the same.
9. The SSD read error adaptive rereading method according to claim 5, characterized in that: In the data preparation state, the data generated during the reread is stored separately. The data status returned by the LDPC module integrated in the nandflash controller is used to determine whether the reread has obtained the correct data, and only the correct data is stored at the target address.
Citation Information
Patent Citations
Method and device for improving NAND flash reading speed
CN107423160A
Implementation method and device for improving rereading efficiency of solid state disk and computer equipment
CN117850703A
Solid state disk data error correction method, device and equipment and readable storage medium
CN118535373A
Solid state disk access method and apparatus, device, and medium
US20230195569A1
Reread command processing method, flash memory controller, and solid-state drive
WO2022134741A1