CN117891412A - Bad block mapping method based on ZNS solid state disk - Google Patents

Bad block mapping method based on ZNS solid state disk Download PDF

Info

Publication number
CN117891412A
CN117891412A CN202410292161.6A CN202410292161A CN117891412A CN 117891412 A CN117891412 A CN 117891412A CN 202410292161 A CN202410292161 A CN 202410292161A CN 117891412 A CN117891412 A CN 117891412A
Authority
CN
China
Prior art keywords
solid state
bad
bad block
blocks
state disk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410292161.6A
Other languages
Chinese (zh)
Inventor
钱鹏
刘兴斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Lugu Technology Co ltd
Original Assignee
Wuhan Lugu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Lugu Technology Co ltd filed Critical Wuhan Lugu Technology Co ltd
Priority to CN202410292161.6A priority Critical patent/CN117891412A/en
Publication of CN117891412A publication Critical patent/CN117891412A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a solution based on the bad blocks of the ZNS solid state disk, and the bad blocks are analyzed and judged, and the difference processing is carried out according to the analysis result. The control module sets different bad block replacement strategies according to the difference of the sizes of the residual redundant spaces. Specifically, for ZNS solid state disks with larger redundant space, blocks are replaced in the same die in sequence in an inverted sequence mode; for ZNS solid state disks with less redundancy space, adopting a positive sequence mode in the same die or different die to replace planes in sequence; for ZNS solid state disks with extremely small redundant space, by marking and shielding all bad blocks and performing degradation operation on the ZNS solid state disks, capacity reduction caused by eliminating bad block marks, bad block remapping in the running process and performance reduction caused by newly increased bad blocks are reduced, and meanwhile, the read-write speed of the ZNS solid state disks is improved. Furthermore, the ZNS solid state disk can selectively open RAID to the zone where the bad block mapping table is located, and the safety of the ZNS solid state disk data is greatly improved.

Description

Bad block mapping method based on ZNS solid state disk
Technical Field
The invention relates to the field of solid state disks, in particular to a bad block mapping method based on a ZNS solid state disk, which comprises the creation of a bad block mapping relation, the calling of the mapping relation in a command when reading and writing bad blocks and the processing mode of newly adding the bad blocks.
Background
The Solid state disk (Solid STATE DRIVE, SSD) is a hard disk made of Solid state electronic memory chip array, and the SSD is composed of a control unit and a memory unit (FLASH chip, DRAM chip) and the like. The solid state disk has the following basic structure: page (page), block (block), plane (plane), die (die), flash memory chip (nand). Of these, page is the most basic component, and is typically 4kb in size; each block typically contains 32 or 64 pages or more; the blocks form planes, each die comprises one or more planes, and a nand is packaged by the plurality of die. The flash memory particles of the solid state disk are composed of small flash memory blocks, and after the process flows of wafer detection, cutting, packaging and the like, bad blocks are inevitably generated in the flash memory particles. The sources of the flash memory bad blocks of the solid state disk mainly have two aspects: factory bad blocks and late growth bad blocks. For the outgoing bad blocks, the flash memory factory has special test equipment and software and hardware to identify the bad blocks in the flash memory and make special marks for the bad blocks. When the solid state disk is read and written, the bad blocks are only skipped, and no processing is performed, so that the SSD wastes more storage space due to the bad blocks. For late growth bad blocks, there are generally two processing strategies: firstly, replacing the hard disk with good blocks of a fixed reserved space, and when too many replaceable spaces of the bad blocks are used up, scrapping the hard disk; secondly, the solid state disk is replaced by good blocks in the idle space of the whole SSD, and the faults of the solid state disk such as the drop of the disk and the scrapping of the solid state disk can be caused by too many bad blocks.
The ZNS SSD is gradually applied to various fields as an emerging storage technology, and provides better storage solutions for enterprises and individual users. The ZNS SSD has the following advantages: 1) The ZNS SSD has better cost performance, improves the storage efficiency by dividing the data into different areas, and can provide higher storage capacity in the same physical space; 2) The reliability is higher, the data are respectively stored in different areas, and the data operation among the areas is mutually independent; 3) Better performance; the data are stored in different zones, and each zone can independently perform read-write operation, so that the access speed and the access efficiency of the data are improved; 4) Better manageability; the data is stored in different zones, and an administrator can more easily manage and monitor the data of different areas. In the ZNS specification, the entire LBA range of SSD NAMESPACE is divided into several equal-length sections, the equal-length LBA sections become one zone, and each zone must be written in a sequential manner, and each zone has its independent state and is independently managed: different zones can be mapped with different physical locations according to different application scenarios. The ZNS SSD is similar to a traditional SSD in use, and also has bad blocks.
At present, similar to the traditional SSD processing mode, the ZNS solid state disk is simply marked and recorded for bad blocks obtained by low-level formatting. In general, there are two main recording modes: 1) Labeling by plane, 2) labeling by die. The two ways of marking bad blocks have the defects that: when the marking is performed according to the plane, the die where the bad block is located cannot perform Multi-plane operation, and SINGLE PLANE operation necessarily has influence on performance; when marking by die, other good planes on the die are also marked as bad blocks, resulting in a decrease in available capacity. The invention mainly aims to solve the problem of capacity and performance reduction caused by the existing bad block marking mode and ensure the safety and reliability of data.
Disclosure of Invention
The invention provides a solution based on the bad blocks of the ZNS solid state disk, and the bad blocks are analyzed and judged, and the difference processing is carried out according to the analysis result. The control module sets different bad block replacement strategies according to the difference of the sizes of the residual redundant spaces. Specifically, for ZNS solid state disks with larger redundant space, blocks are replaced in the same die in sequence in an inverted sequence mode; for ZNS solid state disks with less redundancy space, adopting a positive sequence mode in the same die or different die to replace planes in sequence; for ZNS solid state disks with extremely small redundant space, by marking and shielding all bad blocks and performing degradation operation on the ZNS solid state disks, capacity reduction caused by eliminating bad block marks, bad block remapping in the running process and performance reduction caused by newly increased bad blocks are reduced, and meanwhile, the read-write speed of the ZNS solid state disks is improved. Furthermore, the ZNS solid state disk can selectively open RAID to the zone where the bad block mapping table is located, and the safety of the ZNS solid state disk data is greatly improved.
Specifically, the invention relates to a bad block mapping method based on a ZNS solid state disk, wherein the ZNS solid state disk comprises a plurality of physical chips and a plurality of zones, each chip comprises more than 2 die, each die comprises 2 m planes, each plane comprises 2 k blocks, k and m are positive integers and are greater than or equal to 5, and each zone is mapped with at least one die; the method is characterized in that: the bad block mapping method at least comprises the following steps:
(1) Carrying out low-level formatting on the ZNS solid state disk, scanning bad blocks of the ZNS solid state disk, and establishing a bad block table according to the bad block information;
(2) If no bad block exists, executing the step (4); if the bad block exists, the control module reads the record information in the bad block table and performs statistical analysis processing on the bad block; the statistical analysis processing step comprises the following steps:
a. When the number of the remaining redundant good blocks is greater than or equal to 50%, the control module performs the following steps: a-1) the control module locates the 2 k -i blocks of die where the bad block is located through an address pointer according to the record information of the bad block table, and inquires whether the blocks are mapped or not, wherein i is a positive integer and the initial value is 1; a-2) if the 2 k -i th block has been mapped, executing i=i+1, and returning to the step a-1); and if the 2 k -i-th block is unoccupied, establishing a mapping relation between the 2 k -i-th block and the bad block.
B. when the number of remaining redundant good blocks is less than 50% and greater than or equal to 10%, the control module performs the following steps: b-1) the control module determines that the bad block is positioned on the jth plane according to the record information of the bad block table, positions the j+1th plane of die where the bad block is positioned through an address pointer, and inquires whether the planes are mapped or not; b-2) if the j+1th plane has been mapped, executing j=j+1, returning to step b-1); and if the j+1th plane is not occupied, establishing a mapping relation between the j+1th plane and the bad block.
C. When the number of the remaining redundant good blocks is less than 10%, the control module performs the following steps: c-1) reading the bad block table, marking all bad blocks by taking a plane as a unit, c-2) counting and calculating total storage space of all good blocks, reserving a certain space as a redundant space, and reducing the capacity of the current ZNS solid state disk and restarting the card; c-3) returning to the step (1).
(3) And establishing a mapping relation of the next bad block until the mapping relation of all the bad blocks in the bad block table is established, obtaining a bad block mapping table, and storing the bad block mapping table in a target zone of the ZNS solid state disk.
(4) The low-level formatting and the establishment of the bad block mapping table are completed, and the running application program is installed.
(5) When Program Fail and erase Fail occur (ERASE FAIL), the bad block table is updated and step (2) is performed.
(6) When the read-write operation of the solid state disk meets the marked bad blocks, the bad block mapping table is called to inquire the blocks or planes mapped by the bad blocks, and then the read-write operation is carried out on the blocks or planes mapped by the bad blocks.
Further, the target zone at least comprises metadata corresponding to the zone, and RAID is selectively opened.
Further, the RAID adopts RAID 1 or RAID 5.
Further, the step of storing the bad block mapping table in a target zone further comprises: and storing the bad block mapping table to a zone corresponding to metadata, and simultaneously reading the target zone by a control module and calling the bad block mapping table to a RAM (random access memory).
Further, in the step (5), the bad block mapping table is updated at the same time when the bad block table is updated, the updated bad block table and the updated bad block mapping table are stored in a RAM, and each time a period is set, the bad block table and the bad block mapping table stored in the RAM are stored in the corresponding target zone in the ZNS solid state disk.
Further, in the step of calling the bad block mapping table to query the block mapped by the bad block in the step (6), the bad block mapping table stored in the RAM is directly called.
Further, the control module further comprises an analysis module, and the quantity ratio is obtained by the analysis module on the quantity of the mapped good blocks and the unmapped good blocks in the bad block statistical redundancy space.
Further, the c-2) step further includes: c-2-1) reminding a user to store all data, and shielding all marked bad blocks after confirmation; c-2-2) counting the total storage space of the blocks as a regeneration space, reserving 10% of the regeneration space as a redundant space, and opening the card of the ZNS solid state disk; regenerating the ZNS solid state disk into a new ZNS solid state disk with lower storage capacity; c-2-3) taking die with the lowest capacity in the new ZNS solid state disk as the capacity of the new zone to obtain a plurality of new zones.
Further, one new zone maps one plane or a plurality of planes, wherein the mapping comprises a transverse mapping and a longitudinal mapping, the transverse mapping is that one zone corresponds to one die, and the longitudinal mapping is that one zone corresponds to all die.
Further, the new ZNS solid state disk is subjected to reset marking, and when the control module detects the reset marking, the control module skips the statistical analysis processing step and directly executes the step a-1).
Compared with the background technology, the invention has the beneficial effects that:
1. Aiming at bad blocks of the ZNS solid state disk, a differential replacement strategy is set, and the read-write speed of the ZNS solid state disk is improved under the condition that the storage space of the ZNS solid state disk is not reduced as much as possible.
2. Under the condition of ensuring data safety, different bad block marking units are adopted, when bad blocks appear, reverse block replacement or plane replacement in the same die is adopted, and the phenomenon that a single bad block marking mode is adopted, for example, when only a plane is used for marking, the die where the bad block is located cannot operate Multi planes is avoided; or when marking by die, other good planes on the same die are marked as bad blocks, resulting in the problem of reduced available capacity. The technical scheme of the invention not only ensures the read-write speed of the ZNS solid state disk, but also reduces the capacity reduction caused by the bad block marking mode to the greatest extent.
3. And remapping bad blocks occurring in the running process, and reducing performance reduction caused by newly added bad blocks.
4. The ZNS solid state disk with the replaced redundant space is reset and subjected to card opening operation, so that the high-capacity solid state disk is degraded, the data safety is ensured, the storage space of the solid state disk is fully utilized, the resource waste is reduced, and the cost is reduced.
5. The bad block table and the bad block mapping table are stored in the zone corresponding to the metadata, and RAID is selectively opened, so that the risk of data loss is improved, and the safety of the data is ensured; meanwhile, the waste of the storage space is avoided to a certain extent, and the data security and the use efficiency of the storage space are improved.
6. The ZNS solid state disk with large capacity is reset and is opened, so that the ZNS solid state disk with lower capacity is degraded for use, the problem that the solid state disk enters scrapping treatment after the redundant replacement space of the ZNS solid state disk is used up in the prior art is solved, the service life of the ZNS solid state disk is further prolonged, and storage resources are fully utilized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the related art, the drawings required for the description of the embodiments or the prior art will be briefly described below, and it is apparent that the drawings in the following description are only embodiments of the present invention, and other drawings may be obtained according to the provided drawings without inventive effort to those skilled in the art.
The structures, proportions, sizes, etc. shown in the drawings are shown only in connection with the present disclosure, and are not intended to limit the scope of the invention, since any modification, variation in proportions, or adjustment of the size, etc. of the structures, proportions, etc. should be considered as falling within the spirit and scope of the invention, without affecting the effect or achievement of the objective.
Fig. 1 is a schematic diagram of the lateral mapping of a ZNS SSD of one embodiment of the invention.
Fig. 2 is a schematic diagram of the longitudinal mapping of the ZNS SSD of one embodiment of the invention.
Fig. 3 is a schematic flow chart of an embodiment of the ZNS solid state disk bad block mapping of the present invention.
Detailed Description
Embodiments of the present invention will now be described more fully hereinafter with reference to the accompanying drawings, in which it is shown, however, in which some, but not all embodiments of the invention are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides a bad block mapping method based on a ZNS solid state disk, which is characterized in that bad blocks are analyzed, and differentiation processing is carried out according to analysis results. The control module sets different replacement strategies according to the difference of the residual redundant space, and particularly, for ZNS solid state disks with larger residual redundant space, blocks are replaced in the same die in sequence in an inverted sequence mode; for ZNS solid state disks with less redundancy space, adopting a positive sequence mode in the same die or different die to replace planes in sequence; for ZNS solid state disks with extremely small redundant space, by marking and shielding blocks corresponding to all bad blocks and performing degradation operation on the ZNS solid state disks, capacity reduction caused by eliminating bad block marks, bad block remapping in the running process and performance reduction caused by newly added bad blocks are reduced, and meanwhile, the read-write speed of the ZNS solid state disks is improved. Furthermore, the ZNS solid state disk can selectively open RAID to the zone where the bad block mapping table is located, and the safety of the ZNS solid state disk data is greatly improved.
In order to better understand the technical scheme of the invention, the technical scheme of the invention is further described through examples.
Example 1
The invention relates to a new ZNS solid state disk bad block mapping realization method, which comprises the following steps:
as shown in fig. 1 and fig. 2, the data layout manner of the ZNS solid state disk of the present invention mainly includes two forms: 1) The horizontal mapping refers to dividing the solid state disk into a plurality of horizontally arranged zones, namely one zone spans all die, and each zone area contains a part of logical addresses. In the lateral mapping, logical addresses are mapped to different areas in order to store data in the different areas. Therefore, the writing performance of the solid state disk can be improved by adopting a transverse mapping mode. Meanwhile, the write operations are dispersed into different areas, so that write amplification caused by writing can be reduced. 2) The longitudinal mapping refers to dividing the solid state disk into a plurality of vertical areas (zones), and each zone contains a part of physical address space, namely, one zone shares one die. The method has the advantages that the method is not mutually influenced during the concurrent operation of the multiple zones, realizes real independent operation, can ensure good QoS, but can only be used for single die concurrency, and has lower peak bandwidth. Therefore, when the new bad blocks occur, for the ZNS solid state disk in the transverse mapping mode, because the planes in each die are mapped by the zone space, a large amount of storage space is wasted when the redundant planes are used for replacing the bad blocks. Therefore, in order not to influence the read-write speed, the same die of unoccupied block is adopted to be more suitable; for ZNS solid state disk adopting longitudinal mapping mode, each zone is exclusive to one die, and in order not to affect read-write speed, it is more suitable to adopt redundant plane mode to replace bad blocks.
The ZNS solid state disk comprises a plurality of physical chips and a plurality of zones, wherein each chip comprises more than 2 die, each die comprises 2 m planes, each plane comprises 2 k blocks, and each zone is mapped with at least one die.
In one embodiment, where k, m is a positive integer and equal to or greater than 5, preferably equal to or greater than 8, more preferably equal to or greater than 10, and even 12. When the method is applied, the larger the ZNS solid state disk is, the longer the service life is, the more the data safety and the performance are improved obviously.
When the bad block is replaced, the bad block mapping method at least comprises the following steps:
(1) Firstly, LLF (low-level formatting) is carried out, a bad block table is created in the LLF (low-level formatting) process and is used for recording bad blocks of a factory and bad blocks generated by ERASE FAIL, and a control module creates the bad block table according to scanned bad block information.
(2) If no bad block exists, executing the step (4); if the bad block exists, the control module reads the record information in the bad block table and performs statistical analysis processing on the bad block.
In one embodiment the statistical analysis processing step performs an analysis statistic on the number of redundant good blocks remaining. For the number duty of different thresholds, different ways of processing are performed. According to use experience and multiple experiments, when the number of redundant good blocks of the SSD is less than half of the number of the redundant good blocks, the data read-write can keep higher safety and stable performance; when the number of redundant good blocks of the SSD is 20% or even less than 10%, the SSD prompts the user to pay attention to the data backup, and there is a large instability. Therefore, in the embodiment of the invention, different processing strategies are set in a targeted manner according to the remaining number of redundant good blocks in the SSD.
A. When the number of the remaining redundant good blocks is greater than or equal to 50%, the control module performs the following steps: a-1) the control module locates the 2 k -i blocks of die where the bad block is located through an address pointer according to the record information of the bad block table, and inquires whether the blocks are mapped or not, wherein i is a positive integer and the initial value is 1; a-2) if the 2 k -i th block has been mapped, executing i=i+1, and returning to the step a-1); and if the 2 k -i-th block is unoccupied, establishing a mapping relation between the 2 k -i-th block and the bad block. At the moment, redundancy is good, the quantity is sufficient, more empty spaces exist in blocks in each plane, unused blocks in the same die are used as replacement blocks of bad blocks, the space can be fully utilized, the replacement good blocks corresponding to the bad blocks are arranged in the same die, the competition relationship during data reading is avoided, the data parallel compatibility and the data space use continuity are improved, and the generation of fragmented data is reduced.
B. When the number of remaining redundant good blocks is less than 50% and greater than or equal to 10%, the control module performs the following steps: b-1) the control module determines that the bad block is positioned on the jth plane according to the record information of the bad block table, positions the j+1th plane of die where the bad block is positioned through an address pointer, and inquires whether the planes are mapped or not; b-2) if the j+1th plane has been mapped, executing j=j+1, returning to step b-1); and if the j+1th plane is not occupied, establishing a mapping relation between the j+1th plane and the bad block. At this time, the number of redundant good blocks remaining is reduced, i.e., more bad blocks occur. And replacement blocks, once used up, means that the SSD is about to be scrapped. Therefore, in order to further prolong the service life of the SSD, the adjacent planes are used for replacing planes corresponding to the bad blocks, so that the jump of addressing and the calculation overhead are reduced. And redundant good block space in the replaced plane is used as redundant good blocks when the redundant space is sufficient, so that the utilization efficiency of the space is further improved.
C. When the number of the remaining redundant good blocks is less than 10%, the control module performs the following steps: c-1) reading the bad block table, marking all bad blocks by taking a plane as a unit, c-2) counting and calculating total storage space of all good blocks, reserving a certain space as a redundant space, and reducing the capacity of the current ZNS solid state disk and restarting the card; c-3) returning to the step (1). In this step, all the planes with bad blocks are marked, so that the memory cells with good states are reserved, and a new LBA space is formed by the memory cell array. Although part of storage space is lost in the step, the service life of the ZNS solid state disk is further prolonged, and resource expenditure is saved. When the card is opened, the positive integer multiple of the unit with the smallest residual storage space in all die is used as the size of the zone unit, so that the zone space physical addresses are continuous, and the read-write characteristic of the solid state disk data is improved.
The step c-2) further comprises: c-2-1) reminding a user to store all data, and shielding all marked bad blocks after confirmation; c-2-2) counting the total storage space of the blocks as a regeneration space, reserving 10% of the regeneration space as a redundant space, and opening the card of the ZNS solid state disk; regenerating the ZNS solid state disk into a new ZNS solid state disk with lower storage capacity; c-2-3) taking die with the lowest capacity in the new ZNS solid state disk as the capacity of the new zone to obtain a plurality of new zones.
Further, in one embodiment, one new zone maps one or several planes, the mapping includes a lateral mapping and a longitudinal mapping, the lateral mapping is that one zone corresponds to one die, and the longitudinal mapping is that one zone corresponds to all die.
Further, in one embodiment, the new ZNS solid state disk is subjected to a reset flag, and when the control module detects the reset flag, the control module skips the statistical analysis processing step, and directly executes step a-1). For the hard disk of re-opening the card, the block reverse order replacement mode in the same die is adopted, so that the data security and the read-write performance can be better ensured.
(3) And (5) performing cyclic treatment. After the current bad block mapping relation is established, inquiring the next bad block and establishing a corresponding mapping relation until the mapping relation of all bad blocks in the bad block table is established. And obtaining a bad block mapping table, and storing the bad block mapping table in a target zone of the ZNS solid state disk.
The number ratio is obtained by counting the number of the mapped good blocks and the number of the unmapped good blocks in the redundant space for the bad blocks through an analysis module.
In one embodiment, the target zone at least includes a zone corresponding to metadata, and in order to improve data security, RAID is selectively opened by using characteristics of the ZNS solid state disk, where the RAID adopts RAID 1 or RAID 5. The adoption of RAID 1 or RAID 5 can ensure data security without occupying excessive storage space.
In one embodiment, in order to reduce the writing method caused by frequent reading and querying or writing of the target zone, the bad block mapping table may be saved to the zone corresponding to the metadata, and meanwhile, the control module reads the target zone and invokes the bad block mapping table into the RAM memory. And updating the bad block mapping table by performing read-write operation on the bad block mapping table in the RAM. When updating, the data in the target zone can be updated after a period of time; the number of writes may also be counted and when a fixed number of times threshold is reached, the data in the target zone is updated. When the block mapped by the bad block needs to be called, directly calling the bad block mapping table stored in the RAM.
(4) The low-level formatting and the establishment of the bad block mapping table are completed, and the running application program is installed.
(5) When Program Fail and erase Fail occur (ERASE FAIL), the bad block table is updated and step (2) is performed.
(6) When the read-write operation of the solid state disk meets the marked bad blocks, the bad block mapping table is called to inquire the blocks or planes mapped by the bad blocks, and then the read-write operation is carried out on the blocks or planes mapped by the bad blocks.
According to the application, by setting the residual good block proportion threshold value, the same die inner block replacement or die inner plane replacement is selectively adopted for the bad blocks, so that the high-efficiency data read-write efficiency and higher data safety of the ZNS solid state disk under different wear degrees are ensured, and the problem of space waste caused by bad block replacement is reduced.
In the present specification, each embodiment is described in a progressive manner, or a parallel manner, or a combination of progressive and parallel manners, and each embodiment is mainly described as a difference from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
It should be noted that, in the description of the present invention, it should be understood that the directions or positional relationships indicated by the terms "upper", "lower", "top", "bottom", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements to be referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in an article or device comprising the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A bad block mapping method based on ZNS solid state disk, ZNS solid state disk includes several physical chips and several zones, each chip includes more than 2 die, each die includes 2 m planes, each plane includes 2 k blocks, wherein k, m are positive integer and more than or equal to 5 and each zone maps at least one die; the method is characterized in that: the bad block mapping method at least comprises the following steps:
(1) Carrying out low-level formatting on the ZNS solid state disk, scanning bad blocks of the ZNS solid state disk, and establishing a bad block table according to the bad block information;
(2) If no bad block exists, executing the step (4); if the bad block exists, the control module reads the record information in the bad block table and performs statistical analysis processing on the bad block; the statistical analysis processing step comprises the following steps:
a. When the number of the remaining redundant good blocks is greater than or equal to 50%, the control module performs the following steps: a-1) the control module locates the 2 k -i blocks of die where the bad block is located through an address pointer according to the record information of the bad block table, and inquires whether the blocks are mapped or not, wherein i is a positive integer and the initial value is 1; a-2) if the 2 k -i th block has been mapped, executing i=i+1, and returning to the step a-1); if the 2 k -i block is unoccupied, establishing a mapping relation between the 2 nd k -i block and the bad block;
b. When the number of remaining redundant good blocks is less than 50% and greater than or equal to 10%, the control module performs the following steps: b-1) the control module determines that the bad block is positioned on the jth plane according to the record information of the bad block table, positions the j+1th plane of die where the bad block is positioned through an address pointer, and inquires whether the planes are mapped or not; b-2) if the j+1th plane has been mapped, executing j=j+1, returning to step b-1); if the j+1th plane is not occupied, establishing a mapping relation between the j+1th plane and the bad block;
c. When the number of the remaining redundant good blocks is less than 10%, the control module performs the following steps: c-1) reading the bad block table, marking all bad blocks by taking a plane as a unit, c-2) counting and calculating total storage space of all good blocks, reserving a certain space as a redundant space, and reducing the capacity of the current ZNS solid state disk and restarting the card; c-3) returning to the step (1);
(3) Establishing a mapping relation of the next bad block until the mapping relation of all bad blocks in the bad block table is established, obtaining a bad block mapping table, and storing the bad block mapping table in a target zone of the ZNS solid state disk;
(4) The low-level formatting and the establishment of the bad block mapping table are completed, and the running application program is installed;
(5) When Program Fail and erase Fail (ERASE FAIL) occur, updating the bad block table, and performing step (2);
(6) When the read-write operation of the solid state disk meets the marked bad blocks, the bad block mapping table is called to inquire the blocks or planes mapped by the bad blocks, and then the read-write operation is carried out on the blocks or planes mapped by the bad blocks.
2. The method for mapping bad blocks based on ZNS solid state disk as set forth in claim 1 wherein said target zone comprises at least metadata-corresponding zone and selectively opens RAID.
3. The method for mapping bad blocks based on the ZNS solid state disk of claim 2, wherein RAID 1 or RAID 5 is adopted.
4. The method for mapping bad blocks based on ZNS solid state disk of claim 3, wherein the step of storing the bad block mapping table in the target zone further comprises: and storing the bad block mapping table to a zone corresponding to metadata, and simultaneously reading the target zone by a control module and calling the bad block mapping table to a RAM (random access memory).
5. The method for mapping bad blocks based on ZNS solid state disk as set forth in claim 4, wherein in step (5), the bad block mapping table is updated simultaneously when the bad block table is updated, the updated bad block table and the updated bad block mapping table are stored in RAM, and the bad block table and the updated bad block mapping table stored in RAM are stored in the corresponding target zone in the ZNS solid state disk at intervals of a period of time.
6. The method for mapping bad blocks based on ZNS solid state disk as set forth in claim 5 wherein in step (6) said block mapped by said bad block is queried by said calling said bad block mapping table, directly calling said bad block mapping table stored in said RAM.
7. The method for mapping bad blocks based on the ZNS solid state disk of claim 6, wherein the control module further comprises an analysis module, and the number ratio is obtained by the analysis module counting the number of the mapped good blocks and the number of the unmapped good blocks in the redundant space for the bad blocks.
8. The method for mapping bad blocks based on the ZNS solid state disk of claim 1, wherein said c-2) step further comprises: c-2-1) reminding a user to store all data, and shielding all marked bad blocks after confirmation; c-2-2) counting the total storage space of the blocks as a regeneration space, reserving 10% of the regeneration space as a redundant space, and opening the card of the ZNS solid state disk; regenerating the ZNS solid state disk into a new ZNS solid state disk with lower storage capacity; c-2-3) taking die with the lowest capacity in the new ZNS solid state disk as the capacity of the new zone to obtain a plurality of new zones.
9. The method for mapping bad blocks based on ZNS solid state disk according to claim 8, wherein one new zone maps one plane or a plurality of planes, the mapping comprises a horizontal mapping and a vertical mapping, the horizontal mapping is that one zone corresponds to one die, and the vertical mapping is that one zone corresponds to all die.
10. The method for mapping bad blocks based on ZNS solid state disk according to claim 9, wherein a reset flag is set for the new ZNS solid state disk, and when the control module detects the reset flag, the control module skips the statistical analysis processing step and directly executes step a-1).
CN202410292161.6A 2024-03-14 2024-03-14 Bad block mapping method based on ZNS solid state disk Pending CN117891412A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410292161.6A CN117891412A (en) 2024-03-14 2024-03-14 Bad block mapping method based on ZNS solid state disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410292161.6A CN117891412A (en) 2024-03-14 2024-03-14 Bad block mapping method based on ZNS solid state disk

Publications (1)

Publication Number Publication Date
CN117891412A true CN117891412A (en) 2024-04-16

Family

ID=90641413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410292161.6A Pending CN117891412A (en) 2024-03-14 2024-03-14 Bad block mapping method based on ZNS solid state disk

Country Status (1)

Country Link
CN (1) CN117891412A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090282301A1 (en) * 2008-04-05 2009-11-12 David Flynn Apparatus, system, and method for bad block remapping
CN102508724A (en) * 2011-10-25 2012-06-20 北京同有飞骥科技股份有限公司 Disk bad block processing method based on soft RAID (redundant array of independent disks)
CN104317733A (en) * 2014-10-28 2015-01-28 陕西千山航空电子有限责任公司 NAND FLASH bad block management method
CN104360958A (en) * 2014-12-09 2015-02-18 哈尔滨工业大学 Bad block management system and bad block management method based on block reservation area replacement
US20150287478A1 (en) * 2014-04-02 2015-10-08 Lsi Corporation Bad memory unit detection in a solid state drive
CN110287068A (en) * 2019-07-04 2019-09-27 四川长虹空调有限公司 A kind of NandFlash driving method
CN110297606A (en) * 2019-06-28 2019-10-01 深圳忆联信息系统有限公司 Bad block management method, device and computer equipment based on solid state hard disk
US20200073573A1 (en) * 2018-08-30 2020-03-05 SK Hynix Inc. Data storage device, operation method thereof and storage system having the same
CN112927749A (en) * 2021-03-09 2021-06-08 杭州海康威视数字技术股份有限公司 Solid state disk management method and device, electronic equipment and solid state disk
CN113744783A (en) * 2020-05-29 2021-12-03 西部数据技术公司 Write data transfer scheduling in a partitioned namespace (ZNS) drive
US20220269409A1 (en) * 2021-02-19 2022-08-25 Realtek Semiconductor Corp. Method and apparatus for bad block management in flash memory

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090282301A1 (en) * 2008-04-05 2009-11-12 David Flynn Apparatus, system, and method for bad block remapping
CN102508724A (en) * 2011-10-25 2012-06-20 北京同有飞骥科技股份有限公司 Disk bad block processing method based on soft RAID (redundant array of independent disks)
US20150287478A1 (en) * 2014-04-02 2015-10-08 Lsi Corporation Bad memory unit detection in a solid state drive
CN104317733A (en) * 2014-10-28 2015-01-28 陕西千山航空电子有限责任公司 NAND FLASH bad block management method
CN104360958A (en) * 2014-12-09 2015-02-18 哈尔滨工业大学 Bad block management system and bad block management method based on block reservation area replacement
US20200073573A1 (en) * 2018-08-30 2020-03-05 SK Hynix Inc. Data storage device, operation method thereof and storage system having the same
CN110297606A (en) * 2019-06-28 2019-10-01 深圳忆联信息系统有限公司 Bad block management method, device and computer equipment based on solid state hard disk
CN110287068A (en) * 2019-07-04 2019-09-27 四川长虹空调有限公司 A kind of NandFlash driving method
CN113744783A (en) * 2020-05-29 2021-12-03 西部数据技术公司 Write data transfer scheduling in a partitioned namespace (ZNS) drive
US20220269409A1 (en) * 2021-02-19 2022-08-25 Realtek Semiconductor Corp. Method and apparatus for bad block management in flash memory
CN112927749A (en) * 2021-03-09 2021-06-08 杭州海康威视数字技术股份有限公司 Solid state disk management method and device, electronic equipment and solid state disk

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王丽娜;王强;: "闪存数据管理中闪存转换层映射策略研究", 中国新通信, no. 13, 5 July 2018 (2018-07-05) *

Similar Documents

Publication Publication Date Title
US10204042B2 (en) Memory system having persistent garbage collection
US20210210136A1 (en) Lifetime mixed level non-volatile memory system
CN1139031C (en) Memory system
US8706998B2 (en) Method for managing flash memories having mixed memory types
US8095765B2 (en) Memory block management
CN102508787B (en) System and method for memory allocation of composite memory
US9542119B2 (en) Solid-state mass storage media having data volumes with different service levels for different data types
CN101777026B (en) Memory management method, hard disk and memory system
TWI399644B (en) Block management method for a non-volatile memory
CN103688247A (en) Block management schemes in hybrid slc/mlc memory
US11599304B2 (en) Data aggregation in ZNS drive
US9372804B2 (en) Cache memory for hybrid disk drives
CN110569002A (en) Flash memory device variable capacity device and method based on mixed mode
CN103198020B (en) A kind of flash memory method in service life that improves
CN104317753A (en) Storage device and data reading-writing method thereof
CN102520885B (en) Data management system for hybrid hard disk
CN104298615B (en) Method for equalizing swap partition loss of memory
US20230061979A1 (en) Solution For Super Device Imbalance In ZNS SSD
CN102362263A (en) SSD controller, and method for operating an SSD controller
CN117891412A (en) Bad block mapping method based on ZNS solid state disk
JP2010152778A (en) Semiconductor storage device
US20230075329A1 (en) Super Block Allocation Across Super Device In ZNS SSD
CN113900591A (en) Method and device for prolonging service life of memory, electronic equipment and storage medium
CN108710580A (en) A kind of bad block management method promoting storage device active volume
CN102945141B (en) A kind of system for promoting RAID group memory property and method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination