A method, device and medium for Nand bad block management of an SSD

CN122284932BActive Publication Date: 2026-08-07JIANGSU XINSHENG INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGSU XINSHENG INTELLIGENT TECH CO LTD
Filing Date
2026-06-01
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0005]但是现有技术均是基于在同Die(LUN)同Plane内进行SP Block坏块替换,若所有Die中有一个Plane的最大坏块数较多,则这个坏块最多的Plane就是可用Sblk的边界,从而决定了可用用户空间的最大容量,因此会有很大一部分Nand Flash空间将会被浪费掉

Benefits of technology

1)本申请通过跨Die查找和替换,将尽可能多的好块进行使用,最大化利用了NandFlash物理空间,增加了盘片的可用预留空间,从而提升盘片的稳态随机读写访问性能,以及提高SSD访问性能一致性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122284932B_ABST
    Figure CN122284932B_ABST
Patent Text Reader

Abstract

The application discloses a Nand bad block management method and device for an SSD and a medium, relates to the technical field of storage, and comprises the following steps: replacing SP Block bad blocks in the same Die and the same Plane in a Nand Flash, then determining a Boundary position, taking Sblks in a region below the Boundary position as a target region for cross-Die MP Block replacement, defining and searching for a Good MP Block and a Bad MP Block, then replacing the Good MP Block and the Bad MP Block, and making good Sblks containing the Good MP Block close to the Boundary; and simultaneously, synchronous updating is performed. The application maximally utilizes Nand Flash physical space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of storage technology, and more specifically to a method, device, and medium for managing Nand bad blocks in SSDs. Background Technology

[0002] In SSD usage scenarios, due to the operating characteristics of NAND Flash, especially in enterprise-grade SSDs, high random read and write performance is required. Correspondingly, the design of SSDs needs to perform MP block read, write, and erase access to NAND Flash as much as possible instead of SP block access, and have a large amount of available reserved space (OP). This allows the disk firmware to perform garbage collection, which can release more effective physical space to improve the random access read and write performance of the disk.

[0003] Existing technologies use a heap sort algorithm for the entire physical space, specifically including: sorting the blocks in Sblk from smallest to largest based on the number of bad blocks, then replacing them in the same die according to the MP block replacement method, and replacing them in the same die and plane according to the SP block replacement method. Finally, the boundary is defined based on the maximum number of bad blocks in all dies to distinguish the largest available Sblk.

[0004] In existing technologies, the entire physical space is replaced according to the SP Block replacement method within the same die and plane, and then the boundary is divided according to the maximum number of bad blocks in all dies to distinguish the largest available Sblk.

[0005] However, existing technologies are all based on replacing SP Block bad blocks within the same die (LUN) and plane. If one plane among all dies has a large number of bad blocks, then the plane with the most bad blocks becomes the boundary of the available SP Block, thus determining the maximum capacity of the available user space. Therefore, a large portion of the NAND Flash space will be wasted. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, device and medium for managing Nand bad blocks in SSDs.

[0007] The objective of this invention is achieved through the following technical solution: In a first aspect, this application discloses a method for managing NAND bad blocks in SSDs, comprising the following steps: S1. Replace bad blocks of single-plane blocks (SP Blocks) within the same logic cell (Die) and the same smallest unit (Plane) that can be operated according to commands in the solid-state electronic storage chip (NAND Flash). After the replacement is completed, determine the boundary position (Boundary) of the solid-state electronic storage chip (NAND Flash). Use the super block (Sblk) in the area below the boundary position (Boundary) as the target area for replacing multi-plane blocks (MP Blocks) across logic cell (Die). The super block (Sblk) is composed of blocks with the same number in different Planes of different logic cell (Die). The multi-plane block (MP Block) is composed of four SP Blocks with the same or different numbers on different Planes in a logic cell (Die). Define a Good MP Block and a Bad MP Block. A Good MP Block means that all single-plane blocks (SP Blocks) in the MP Block are good blocks, and a Bad MP Block means that there is at least one bad single-plane block (SP Block) in the MP Block. S2. Search for Good MP Blocks and Bad MP Blocks according to the preset search order; S3. Replace the found Good MP Blocks and Bad MP Blocks. During the replacement process, concentrate the good superblocks Sblk containing Good MP Blocks towards the Boundary position. S4. During the replacement of bad blocks in the same logic unit Die, the same smallest unit Plane that can be operated according to the command, and the replacement of multi-plane blocks (MP blocks) across logic unit Dies, the bad block replacement relationship table, the number of bad block replacement relationships for each smallest unit Plane that can be operated according to the command, the number of available multi-plane blocks (Good MP Blocks) gathered for each logic unit Die, and the latest boundary position (Boundary) value are updated synchronously.

[0008] Based on the first aspect, the preset search order in step S2 includes: the search order for Bad MP Blocks is to start from the superblock Sblk at the boundary position and increment, and search from logic unit 0 to logic unit N within each superblock Sblk; the search order for Good MP Blocks is to start from the superblock Sblk at the position of the largest superblock Sblk and decrement, and search from logic unit N to logic unit 0 within each superblock Sblk.

[0009] Based on the first aspect, in step S3, the stopping of the replacement of multi-plane blocks (MPBlocks) across logic units (Dies) is controlled by preset stopping conditions, the preset stopping conditions including: After replacing the single-plane block SP Block within the smallest unit Plane that can be operated according to the command in all logical units Die, find the total number of all multi-plane blocks Good MP Blocks below the minimum boundary position Boundary, divide the total number by the number of multi-plane blocks Good MP Blocks required for a single superblock Sblk, and get the number of superblocks Sblk that need to be assembled. If the number of good superblocks Sblk obtained by replacing the multiplane blocks (MP Blocks) across the logic unit Die reaches the required number of superblocks Sblk, then the replacement of the multiplane blocks (MP Blocks) across the logic unit Die is stopped.

[0010] Based on the first aspect, the multi-plane block (MP) replacement across logic unit dies in step S4 is further subject to constraints, including: The replaced superblock Sblk is only used for internal data read and write of the SSD firmware and is prohibited from being used to store user data that can be read and written by the host.

[0011] Secondly, this application discloses an electronic device, the electronic device comprising: Memory, which stores executable instructions; A processor that executes the executable instructions in the memory to implement the method described above.

[0012] Thirdly, this application discloses a computer storage medium storing a computer program, which is executed by a processor to implement the method described above.

[0013] The beneficial effects of this invention are: 1) This application utilizes as many good blocks as possible through cross-die search and replacement, maximizing the use of NandFlash physical space, increasing the available reserved space of the disk, thereby improving the steady-state random read and write access performance of the disk and improving the consistency of SSD access performance. Attached Figure Description

[0014] Figure 1 This is a schematic diagram illustrating the steps of a Nand bad block management method for SSDs according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the replacement process according to an embodiment of the present invention. Detailed Implementation

[0015] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0016] See Figures 1-2 This application discloses a method, device, and medium for Nand bad block management in SSDs. The method uses SP Blocks to replace bad blocks within the same die and plane (same LUN), and then uses MP Blocks to replace bad blocks across different dies. This addresses problems in existing technologies, including: requirements for SSD access performance consistency; the requirement for larger available over-provisioning (OP) space on the SSD platter; and the increasing size of individual block spaces, where marking a bad block allows for maximizing space utilization through improved bad block management. Specifically, it includes good blocks below the boundary line, increasing the available over-provisioning (OP) space of the SSD platter, thereby improving random access read / write performance without affecting SSD access performance consistency.

[0017] Here, the relevant technical terms used in this application are explained: CE: Chip Enable, an enable signal or pin for a chip.

[0018] Nand / NandFlash: Solid-state electronic storage chip, a flash medium used to store data.

[0019] Die / LUN: A logical unit of NandFlash, the smallest unit capable of independently executing commands and reporting status. Each CE has one or more dies.

[0020] Plane: The smallest unit of NandFlash that can be operated on according to read, write, erase, and other commands. Each die has one or more planes.

[0021] Block: The smallest unit of erasure in NandFlash. Each Plane has one or more Blocks.

[0022] Sblk: Super block, a super block consisting of blocks with the same number from different planes of different dies.

[0023] SP Block: single-plane Block, a single block of a plane within a die.

[0024] MP Block: Multi-plane Block. Each plane in a die has one block, which constitutes an MP Block. That is, four SP Blocks with the same or different numbers on different planes in a die form an MP Block.

[0025] SSD: Solid State Disk (SSD) is a hard drive made of solid-state electronic storage chip arrays.

[0026] Bad block replacement table: A record of bad block replacement relationships for SP blocks within the same plane (which can be across dies or the same plane within the same die), including the addresses of the SP blocks that are being replaced and those that are being replaced.

[0027] The method specifically includes the following steps: S1. Replace bad blocks of single-plane blocks (SP Blocks) within the same logic cell (Die) and the same smallest unit (Plane) capable of operation according to read, write, and erase commands in the Nand Flash. After replacement, determine the boundary position (Boundary position, i.e., the address alignment boundary between the storage unit and the operation unit) of the Nand Flash. Use the superblock (Sblk) below the boundary position (Boundary position) as the target area for replacing multi-plane blocks (MP Blocks) across logic cells (Die). Define good MP Blocks and bad MP Blocks. A good MP Block means that all single-plane blocks (SP Blocks) in the MP Block are good blocks (SP Blocks are all good blocks, meaning that they are blocks that have been replaced with bad blocks within the same Die and the same Plane). A bad MP Block is a block in the MP Block that contains at least one bad single-plane block (SP Block). S2. Search for Good MP Blocks and Bad MP Blocks according to the preset search order; S3. Replace the found Good MP Blocks and Bad MP Blocks. During the replacement process, concentrate the good superblocks Sblk containing Good MP Blocks towards the Boundary position. S4. During the replacement of bad blocks in the same logic unit Die, the same smallest unit Plane that can be operated according to read, write, erase and other commands, and the replacement of multi-plane blocks (MP blocks) across logic unit Dies, the bad block replacement relationship table, the number of bad block replacement relationships for each smallest unit Plane that can be operated according to read, write, erase and other commands, the number of available multi-plane blocks (Good MP Blocks) gathered for each logic unit Die, and the latest boundary position (Boundary) value are updated synchronously.

[0028] Specifically, the preset search order in step S2 includes: the search order for Bad MP Blocks starts from the superblock Sblk at the boundary position and increments, and searches are performed from logic unit 0 to logic unit N within each superblock Sblk; the search order for Good MP Blocks starts from the superblock Sblk at the position of the largest superblock Sblk and decrements, and searches are performed from logic unit N to logic unit 0 within each superblock Sblk.

[0029] Specifically, in step S3, the stopping of the replacement of multi-plane blocks (MP blocks) across logic units (Dies) is controlled by preset stopping conditions, which include: After replacing the single-plane block SP Block within the smallest unit Plane that can be operated according to the command in all logical units Die, find the total number of all multi-plane blocks Good MP Blocks below the minimum boundary position Boundary, divide the total number by the number of multi-plane blocks Good MP Blocks required for a single superblock Sblk, and get the number of superblocks Sblk that need to be assembled. If the number of good superblocks Sblk obtained by replacing the multiplane blocks (MP Blocks) across the logic unit Die reaches the required number of superblocks Sblk, then the replacement of the multiplane blocks (MP Blocks) across the logic unit Die is stopped.

[0030] Specifically, the multi-plane block (MP) replacement across logic unit dies in step S4 is further subject to constraints, including: The replaced good superblocks (Sblk) are only used for internal data read and write of the SSD firmware and are prohibited from being used to store user data for host read and write, thus affecting the read and write access performance of the SSD. This is because these good superblocks (Sblk) generated by replacing multi-plane blocks (MP blocks) across logical unit dies contain multiple good MP blocks within the same logical unit die, which affects the concurrent access of multiple logical unit dies of the NAND flash memory chip, thereby affecting the read and write bandwidth and access performance of the SSD.

[0031] Specifically, in step S4, the number of available good MP blocks that each logic unit Die can assemble is counted starting from 0; the latest boundary position Boundary value is the superblock Sblk number value with the largest number among all good superblocks Sblk composed of all logic units Die. Specifically, the synchronization update described in step S4 includes: 1) Bad Block Replacement Relationship Table: The bad block replacement relationship table is organized by adding or modifying each of the smallest units (Plane) of all logical units (Die) that can be operated on according to read, write, erase, etc. commands. When a bad MP block is found and needs to be replaced by a good MP block found on a different logic unit die, it is necessary to add or modify the replacement relationship of the single-plane blocks (SP blocks) of each plane that can be operated according to read, write, erase, etc., within the bad MP block. Adding a replacement relationship for a single-plane block (SP block) occurs when there is no replacement relationship for the single-plane blocks (SP blocks) in the bad MP block after step S1. In this case, the bad MP block is replaced with a single-plane block (SP block) with the same plane number in the good MP block on the different logic unit die. This adds a replacement relationship and records which single-plane block (SP block) from the good MP block on the different logic unit die replaced the single-plane block (SP block) with the same plane number in the bad MP block. Modifying a replacement relationship for a single-plane block (SP block) occurs when there is already a replacement relationship for the single-plane blocks (SP blocks) in the bad MP block after step S1. In this case, the bad MP block is replaced with a single-plane block (SP block) with the same plane number in the bad MP block. The block is replaced by the single-plane block SP block with the same Plane number among the many plane blocks Good MP Blocks on the different dies. That is, the replacement relationship that existed after step S1 is modified, and it is recorded which SP block among the many plane blocks Good MP Blocks on the different logic unit dies replaced the single-plane block SP block with the same Plane number in the Bad MP Block.

[0032] 2) Number of bad block replacement relationships for each plane: When a bad MP block is found in the bad block replacement relationship table, if a new SP block replacement relationship needs to be added, the number of bad block replacement relationships for the plane containing that SP block is incremented by one; if the SP block replacement relationship needs to be modified, the number of bad block replacement relationships for the plane containing that SP block remains unchanged.

[0033] 3) The number of available good MP blocks gathered in each logic unit Die: During the update of the bad block replacement relationship table, if a bad MP block is found, and all SP blocks in the bad MP block are replaced, the number of available good MP blocks gathered in the Die containing the bad MP block is incremented by one; otherwise, it remains unchanged.

[0034] 4) Boundary value: During the update of the bad block replacement relationship table, if a good superblock Sblk of all good MP blocks is completed, the Boundary value is incremented by one; otherwise, it remains unchanged.

[0035] For example, this application discloses a computer storage medium storing a computer program that is executed by a processor to implement the method described above.

[0036] For example, this application discloses an electronic device, the electronic device comprising: Memory, which stores executable instructions; A processor that executes the executable instructions in the memory to implement the method described above.

[0037] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A method for managing NAND bad blocks in SSDs, characterized in that, Includes the following steps: S1. Replace bad blocks of single-plane blocks (SP Blocks) within the same logic cell (Die) and the same smallest unit (Plane) that can be operated according to commands in the solid-state electronic storage chip (NAND Flash). After the replacement is completed, determine the boundary position (Boundary) of the solid-state electronic storage chip (NAND Flash). Use the super block (Sblk) in the area below the boundary position (Boundary) as the target area for replacing multi-plane blocks (MP Blocks) across logic cell (Die). The super block (Sblk) is composed of blocks with the same number in different Planes of different logic cell (Die). The multi-plane block (MP Block) is composed of four SP Blocks with the same or different numbers on different Planes in a logic cell (Die). Define a Good MP Block and a Bad MP Block. A Good MP Block means that all single-plane blocks (SP Blocks) in the MP Block are good blocks, and a Bad MP Block means that there is at least one bad single-plane block (SP Block) in the MP Block. S2. Search for Good MP Blocks and Bad MP Blocks according to the preset search order; S3. Replace the found Good MP Blocks and Bad MP Blocks. During the replacement process, concentrate the good superblocks Sblk containing Good MP Blocks towards the Boundary position. S4. During the replacement of bad blocks in the same logic unit Die, the same smallest unit Plane that can be operated according to the command, and the replacement of multi-plane blocks (MP blocks) across logic unit Dies, the bad block replacement relationship table, the number of bad block replacement relationships for each smallest unit Plane that can be operated according to the command, the number of available multi-plane blocks (Good MP Blocks) gathered for each logic unit Die, and the latest boundary position (Boundary) value are updated synchronously.

2. The method for managing NAND bad blocks in SSDs according to claim 1, characterized in that, The preset search order mentioned in step S2 includes: the search order for Bad MP Blocks is to start from the superblock Sblk at the boundary position and increment, and search from logic unit 0 to logic unit N within each superblock Sblk; the search order for Good MP Blocks is to start from the superblock Sblk at the position of the largest superblock Sblk and decrement, and search from logic unit N to logic unit 0 within each superblock Sblk.

3. The method for managing NAND bad blocks in SSDs according to claim 1, characterized in that, In step S3, the stopping of multi-plane block (MP) replacement across logic unit dies is controlled by preset stopping conditions. The preset stopping conditions include: After replacing the single-plane block SP Block within the smallest unit Plane that can be operated according to the command in all logical units Die, find the total number of all multi-plane blocks GoodMP Blocks below the minimum boundary position Boundary, divide the total number by the number of multi-plane blocks GoodMP Blocks required for a single superblock Sblk, and get the number of superblocks Sblk that need to be assembled. If the number of good superblocks Sblk obtained by replacing the multiplane blocks (MP Blocks) across the logic unit Die reaches the required number of superblocks Sblk, then the replacement of the multiplane blocks (MP Blocks) across the logic unit Die is stopped.

4. The method for managing NAND bad blocks in SSDs according to claim 3, characterized in that, The multi-plane block (MP) replacement across logic unit dies in step S4 is further subject to constraints, including: The replaced superblock Sblk is only used for internal data read and write of the SSD firmware and is prohibited from being used to store user data that can be read and written by the host.

5. An electronic device, characterized in that, The electronic device includes: Memory, which stores executable instructions; A processor that executes the executable instructions in the memory to implement the method of any one of claims 1-4.

6. A computer storage medium, characterized in that, The medium stores a computer program, which is executed by a processor to implement the method described in any one of claims 1-4.

Citation Information

Patent Citations

  • Bad block management method and device and related equipment

    CN119148928A

  • Method and device for dynamically allocating bad block replacement resources, storage medium and electronic equipment

    CN119376646A