Bad block screening method, device, apparatus and storage medium

By comprehensively considering the number of ECC error bits and the number of read retries in the solid-state drive (SSD), bad blocks are filtered out, solving the problem of misjudgment during the SSD screening process and achieving higher screening accuracy and device stability.

CN115148230BActive Publication Date: 2026-01-02SHENZHEN CITY TECHWIN SEMICONDUCTOR COMPANY LIMITED
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210779329.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2026-01-02
Estimated Expiration
2042-07-01

AI Technical Summary

Technical Problem

In existing technologies, solid-state drives (SSDs) have a high false positive rate when screening for bad blocks, resulting in storage devices with high capacity but unstable or stable but low capacity.

Method used

By obtaining the number of ECC error bits and the number of read retries for each data block in the storage device, bad blocks are identified and filtered out. Different threshold ranges are set to distinguish between good and bad blocks.

Benefits of technology

It improves the accuracy of bad block screening, avoids resource waste, and ensures the stability of storage devices and the balance of storage capacity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115148230B_ABST
    Figure CN115148230B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a bad block screening method, device and equipment and a storage medium. The method comprises: obtaining the ECC error bit number and the read retry number of each data block in a current recording storage device; and screening the bad blocks in the storage device according to the ECC error bit number and the read retry number of each data block. The ECC error bit number and the read retry number of the current recording data block are comprehensively used as the screening standard to screen the bad blocks in the storage device, so that the bad blocks can be more accurately screened, the bad block omission is avoided, and the accuracy of the bad block screening is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of solid state disks, and particularly relates to a bad block screening method, device, equipment and storage medium. BACKGROUND

[0002] A storage device is an important component of a computer system as a medium for data storage. In the era of big data, higher and higher requirements are put forward for the capacity, read-write speed and reliability of a storage device. Due to the advantages of fast read-write speed, large capacity, anti-shock and drop resistance, and small size, a solid state disk (SSD) is becoming a mainstream storage device. NAND flash memory is the actual physical storage medium of an SSD. The quality of NAND flash memory directly affects the performance of an SSD.

[0003] Currently, after an SSD is assembled, the bad block condition of NAND flash memory in the SSD is identified. The NAND flash memory with storage problems is screened out by an SSD firmware, and then reported to a system to inform personnel to replace the NAND flash memory in the SSD. For example, data writing and reading operations are performed on the solid state disk at the highest working temperature of the solid state disk, and the number of error bit flips of the read data is counted, and finally the bad blocks are screened out according to the number of error bit flips. However, the method of judging good blocks and bad blocks only by the number of error bit flips of the read data is prone to have a high capacity, but the product is unstable and has hidden dangers. Or the storage device is stable, but the storage capacity is low, that is, there are many misjudged blocks, which leads to resource waste and the like.

[0004] To sum up, how to improve the bad block screening accuracy of a solid state disk is a problem that needs to be solved by the technical personnel in the field at present. SUMMARY

[0005] In a first aspect, the present application provides a bad block screening method, comprising:

[0006] obtaining the number of ECC error bits and the number of read retries of each data block in a currently recorded storage device;

[0007] screening out the bad blocks in the storage device according to the number of ECC error bits and the number of read retries in each data block.

[0008] In an optional embodiment, the screening out of the bad blocks in the storage device according to the number of ECC error bits and the number of read retries in each data block comprises:

[0009] determining that the corresponding data block is a bad block when the ECC error bit number is between a first bit number threshold and a second bit number threshold, and the read retry number is greater than a preset retry number threshold; wherein the first bit number threshold is less than the second bit number threshold.

[0010] In an optional implementation, the method further comprises:

[0011] determining that the corresponding data block is a bad block when the ECC error bit number is greater than the second bit number threshold.

[0012] In an optional implementation, the method further comprises:

[0013] determining that the corresponding data block is a bad block when the read retry number is greater than a preset retry number threshold.

[0014] In an optional implementation, the first bit number threshold is 40%-60% of the second bit number threshold.

[0015] In a second aspect, the present application provides a bad block screening device, comprising:

[0016] an obtaining module, configured to obtain the ECC error bit number and the read retry number of each data block in a current record storage device;

[0017] a screening module, configured to screen the bad blocks in the storage device according to the ECC error bit number and the read retry number of each data block.

[0018] In an optional implementation, the screening module is configured to:

[0019] determining that the corresponding data block is a bad block when the ECC error bit number is between a first bit number threshold and a second bit number threshold, and the read retry number is greater than a preset retry number threshold; wherein the first bit number threshold is less than the second bit number threshold.

[0020] In a third aspect, the present application provides a storage device, which adopts the bad block screening method according to any one of the preceding aspects.

[0021] In a fourth aspect, the present application provides a computer device, which comprises a memory and at least one processor, the memory stores a computer program, and the processor is configured to execute the computer program to implement the bad block screening method.

[0022] In a fifth aspect, the present application provides a computer storage medium, which stores a computer program, and the computer program is executed to implement the bad block screening method according to the preceding aspects.

[0023] The embodiment of the present application has the following beneficial effects:

[0024] The embodiment of the present application provides a bad block screening method, comprising obtaining the ECC error bit number and the read retry number of each data block in the current recorded storage device; screening the bad block in the storage device according to the ECC error bit number and / or the read retry number in each data block. The embodiment of the present application comprehensively takes the ECC error bit number and the read retry number of the current recorded data block as the screening standard, thereby screening the bad block in the storage device, so that the bad block can be more accurately screened, the bad block omission is avoided, and the accuracy of the bad block screening is improved; then, the screened bad block can be processed correspondingly, thereby improving the stability of the storage device, avoiding the situation that the storage device has high capacity but is unstable or the storage device is stable but has low storage capacity, and thereby balancing the storage capacity and the stability of the storage device. BRIEF DESCRIPTION OF DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope of protection of the present application. In each drawing, similar components are marked with similar reference numerals.

[0026] Figure 1 Fig. 1 shows a first embodiment schematic diagram of the bad block screening method in the embodiment of the present application;

[0027] Figure 2 Fig. 2 shows a second embodiment schematic diagram of the bad block screening method in the embodiment of the present application;

[0028] Figure 3 Fig. 3 shows a third embodiment schematic diagram of the bad block screening method in the embodiment of the present application;

[0029] Figure 4 Fig. 4 shows a fourth embodiment schematic diagram of the bad block screening method in the embodiment of the present application;

[0030] Figure 5 Fig. 5 shows a structural schematic diagram of the bad block screening device in the embodiment of the present application. DETAILED DESCRIPTION

[0031] The technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application.

[0032] The components of the embodiments of the present application described and illustrated herein can be arranged and designed in a wide variety of different configurations. Therefore, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, but is merely representative of selected embodiments of the application. All other embodiments not explicitly described or shown herein, which would still be within the scope of the present application, are intended to be protected.

[0033] Hereinafter, the terms "include", "have", and their conjugates, as used in various embodiments of the present application, are intended to denote a certain characteristic, number, step, operation, constituent element, component or a combination thereof, and are not intended to exclude the existence of or a possibility of additional one or more other characteristics, numbers, steps, operations, constituent elements, components or combinations thereof.

[0034] In addition, the terms "first", "second", "third", and the like are used only to distinguish descriptions, and are not to be construed as designating or implying a relative importance.

[0035] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the present application belong. The terms, such as those defined in a generally used dictionary, are to be interpreted as having a meaning that is the same as, or similar to, the meaning in the context of relevant technical literature, and are not to be interpreted in an idealized or overly formal sense unless clearly defined in various embodiments of the present application.

[0036] Since the process of a storage device such as a NAND Flash cannot guarantee that the Memory Array of the NAND Flash maintains the reliability of performance during its life cycle, bad blocks are generated in the production and use of the NAND Flash. The characteristics of the bad blocks are that when programming / erasing the blocks, errors occur in the Page Program and Block Erase operations, and are reflected in the corresponding bits of the Status Register accordingly.

[0037] At present, the solid state disk (SSD) or the U disk and the like need to be tested in an extreme environment, and then the good blocks and the bad blocks in the NAND flash memory can be distinguished. The problem is that the high-temperature writing and the low-temperature reading, the test in the extreme environment will cause many blocks to be misjudged, because the working environment will not appear such an environment, but if it is not done, some unstable blocks cannot be identified, so there are two problems, not doing the extreme test will cause the SSD to be screened, and the capacity of the SSD is high, but the product is unstable and has hidden dangers; doing the extreme test will cause the SSD to be screened, although it is stable, but the capacity is low, and the misjudgment is more. And with the development of the flash memory technology, the instability of the flash memory will become a normal state. Based on this, the embodiment provides a bad block screening method to solve the above technical problems.

[0038] Embodiment 1

[0039] Please refer to Figure 1 The embodiment provides a bad block screening method, and the bad block screening method is described in detail below.

[0040] S10, obtaining the ECC error bit number and the read retry number of each data block in the current recorded storage device.

[0041] S20, screening the bad blocks in the storage device according to the ECC error bit number and the read retry number in each data block.

[0042] When the solid state disk is tested in an extreme environment, the master control chip records the ECC return value and the read retry number of each data block in the storage device, wherein the ECC refers to the memory error correction verification, and the ECC return value is the ECC error bit number returned after verification. When the memory error correction verification is performed on the storage device, the ECC hardware module records how many bits are wrong in the data of a specified length, that is, an ECC error bit number is returned; and the read retry number is the number of recorded sending retry instructions to adjust the voltage Vt (that is, the flash pre-judgment voltage), wherein the read retry number is recommended by the flash manufacturer, and the read retry number of each flash is a fixed value.

[0043] According to the ECC error bit number and the read retry number corresponding to each data block, the bad blocks in the storage device are screened.

[0044] In the embodiment, the bad blocks in the storage device can be determined by comprehensively considering the ECC error bit number and the read retry number corresponding to each data block.

[0045] When the ECC error bit number is in a preset first interval, the corresponding data block is determined as a good block; when the ECC error bit number is in a preset second interval, the bad block is screened in combination with the read retry number, at this time, if the read retry number is less than a preset retry number threshold, the corresponding data block is determined as a good block, otherwise, as a bad block; when the ECC error bit number is in a third interval, the corresponding data block can be directly determined as a bad block.

[0046] It can be understood that the first interval corresponds to a normal error rate range allowed in general, the error rate corresponding to the second interval is higher than that of the first interval, but has not reached the limit value, and the third interval refers to exceeding the maximum error range allowed, indicating that the block is extremely unstable. Of course, here, only three intervals are taken as an example for illustration, if more intervals are desired to be screened more finely, more intervals can be divided, which is not limited here.

[0047] Specifically, as shown in Figure 2 When the bad block in the storage device is screened by the ECC error bit number and the read retry number, the method specifically includes the following steps:

[0048] S21, it is judged whether the ECC error bit number is between a preset first bit number threshold and a second bit number threshold.

[0049] S22, if the ECC error bit number is not between the first bit number threshold and the second bit number threshold, and the ECC error bit number is less than the first bit number threshold, the corresponding data block is determined as a good block, otherwise as a bad block.

[0050] S23, if the ECC error bit number is between the first bit number threshold and the second bit number threshold, it is judged whether the read retry number is greater than a preset retry number threshold.

[0051] S24, if the read retry number is less than or equal to the retry number threshold, the corresponding data block is determined as a good block.

[0052] S25, if the read retry number is greater than the retry number threshold, the corresponding data block is determined as a bad block.

[0053] Specifically, if the currently recorded ECC error bit number is less than the first bit number threshold, that is, the ECC error bit number is in a first interval composed of zero and the first bit number threshold as a critical value, the corresponding data block is determined as a good block.

[0054] If the ECC error bit number of the current record is in the second interval composed of the first bit number threshold and the second bit number threshold as critical values, i.e. the ECC error bit number is between the first bit number threshold and the second bit number threshold, and the read retry number is less than or equal to the retry number threshold, it is determined that the corresponding data block is a good block. When the ECC error bit number is between the first bit number threshold and the second bit number threshold, but the read retry number is greater than the retry number threshold, it is determined that the corresponding data block is a bad block.

[0055] If the ECC error bit number of the current record is greater than the second bit number threshold, i.e. the ECC error bit number is in the third interval composed of the second bit number threshold and infinity as critical values, it is determined that the corresponding data block is a bad block.

[0056] The first bit number threshold, the second bit number threshold and the retry number threshold can be set according to actual conditions, which are not limited here. For example, the second bit number threshold is set to 80%-100% of the total number of ECC error bits of the data block of the storage device in general cases, the first bit number threshold is set to 40%-60% of the second bit number threshold, assuming that the first bit number threshold is set to 43, the second bit number threshold is set to 72, and the retry number threshold is set to 18; when the ECC error bit number of the data block is less than 43, it is determined that the data block is a good block; when the ECC error bit number of the data block is in the interval (43, 72), but the read retry number is less than 18, it is determined that the corresponding data block is a good block, i.e. some data blocks with high ECC error bit numbers but good stability are redefined as good blocks. However, when the ECC error bit number of the data block is in the interval (43, 72), but the read retry number is greater than 18, it is directly determined that the corresponding data block is a bad block.

[0057] The above bad block of the storage device is comprehensively judged by the ECC error bit number and the read retry number, and some data blocks with high ECC error bit numbers but good stability are redefined as good blocks, such as data blocks with ECC error bit numbers in the interval (43, 72) but read retry numbers less than 18, so as to increase the capacity of the storage device and avoid the phenomenon that the current capacity of the storage device is high but unstable, or the storage device is stable but the capacity is low.

[0058] It can be understood that the above embodiments focus on screening bad blocks through the ECC error bit number and the read retry number, and screening is first performed by judging the ECC error bit number, and then combined with the read retry number. The process of judging the ECC error bit number includes: 1. judging whether the ECC error bit number is less than a first bit number threshold; 2. judging whether the ECC error bit number is between the first bit number threshold and a second bit number threshold; 3. judging whether the ECC error bit number is greater than the second bit number threshold. The above three judgment processes can be performed in sequence or simultaneously, and the specific judgment order is not limited here.

[0059] Optionally, as shown in the embodiment, the step of screening the bad blocks in the storage device only through the ECC error bit number can also be directly arranged after the step of reading the ECC error bit number and the read retry number, and the specific steps are as follows: Figure 3

[0060] S31, judging whether the currently recorded ECC error bit number is greater than a preset second bit threshold.

[0061] S32, if the currently recorded ECC error bit number is greater than the second bit number threshold, determining that the corresponding data block is a bad block.

[0062] If the currently recorded ECC error bit number is greater than the second bit number threshold, that is, the ECC error bit number is in a third interval composed of the second bit number threshold and an infinite number as a critical value, it is determined that the corresponding data block is a bad block. Specifically, the currently recorded ECC error bit number is compared with the preset second bit number threshold, and if the currently recorded ECC error bit number is greater than the second bit number threshold, it is determined that the corresponding data block is a bad block, wherein the second bit number threshold can be set according to actual conditions, which is not limited here. For example, assuming that the total number of currently recorded ECC error bits is 72, and the second bit number threshold is set to 73; thus, when the ECC error bit number corresponding to the data block is greater than 72, it is determined that the data block is a bad block. When the ECC error bit number is less than the second bit number threshold, the bad blocks in the storage device are screened according to the ECC error bit number and the read retry number.

[0063] Optionally, as shown in the embodiment, the step of screening the bad blocks in the storage device only through the read retry number can also be directly arranged after the step of reading the ECC error bit number and the read retry number, and the specific steps are as follows: Figure 4

[0064] S41, judging whether the currently recorded read retry number is greater than a preset retry number threshold.

[0065] ​​S42, if the read retry number of the current record is greater than the retry number threshold, determining that the corresponding data block is a bad block.

[0066] Specifically, the read retry number of the current record is compared with the preset retry number threshold, and if the read retry number of the current record is greater than the retry number threshold, it is determined that the corresponding data block is a bad block, wherein the retry number threshold can be set according to actual conditions, which is not limited here.

[0067] For example, the retry number threshold is set to 40%-60% of the total read retry number of the data block of the storage device under normal circumstances, and the read retry number of the data block of the storage device is usually more than 30, so the retry number threshold can be set to 18. When the read retry number exceeds 18, regardless of the number of ECC error bits, it is marked as a bad block. That is, assuming that the total read retry number of the data block of the storage device under normal circumstances is 36, the retry number threshold is set to 18; thus, when the read retry number of the data block is greater than 18, it is determined that the data block is a bad block.

[0068] It can be understood that in the screening of bad blocks, the read retry number can also be first judged, and then the ECC error bit number is combined to screen the bad blocks. When the read retry number is less than or equal to the retry number threshold, the ECC error bit number is combined to further screen the bad blocks, and when the ECC error bit number is less than or equal to the second bit number threshold, it is determined that the corresponding data block is a good block, otherwise it is a bad block. When the read retry number is greater than the retry number threshold, regardless of the number of ECC error bits, the corresponding data block is determined to be a bad block.

[0069] In this embodiment, the ECC error bit number and the read retry number of the current record of the data block are comprehensively used as the screening standard, that is, the ECC error bit number and the read retry number of the data block are comprehensively considered, so that the bad blocks in the storage device can be screened out in the extreme environment test process, thereby more accurately screening the bad blocks, avoiding the omission of bad blocks, and improving the accuracy of bad block screening. Then, the screened bad blocks can be processed to improve the stability of the storage device, thereby balancing the storage capacity of the storage device and the stability of the storage device.

[0070] Embodiment 2

[0071] Please refer to Figure 5 The embodiment of the present application provides a bad block screening device, which comprises:

[0072] The acquisition module 51 is configured to acquire the ECC error bit number and the read retry number of each data block in the current record of the storage device.

[0073] The screening module 52 is configured to screen out the bad block in the storage device according to the ECC error bit number and the read retry number in each data block.

[0074] In an implementation, the screening module 52 is configured to:

[0075] When the ECC error bit number is between a first bit number threshold and a second bit number threshold, and the read retry number is greater than a preset retry number threshold, the corresponding data block is determined as a bad block; wherein the first bit number threshold is less than the second bit number threshold.

[0076] The bad block screening device described above corresponds to the bad block screening method of Embodiment 1, and any optional item in Embodiment 1 is also applicable to this embodiment, which will not be described in detail here.

[0077] The present application also provides a storage device, which adopts the bad block screening method of the above-mentioned embodiments to screen out bad blocks.

[0078] The present application also provides a computer device, which comprises a memory and at least one processor, the memory stores a computer program, and the processor is configured to execute the computer program to implement the bad block screening method of the above-mentioned embodiments.

[0079] The memory can include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required by a function; the data storage area can store data created according to the use of the computer device (such as read retry number and ECC error bit number, etc.). In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device.

[0080] The present application also provides a computer readable storage medium, which stores computer executable instructions, and when the computer executable instructions are called and executed by a processor, the computer executable instructions cause the processor to execute the steps of the bad block screening method of the above-mentioned embodiments.

[0081] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can also be implemented by other manners. The apparatus embodiments described above are merely illustrative, for example, the flowcharts and structural diagrams in the drawings show the possible implementation architecture, function and operation of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logic function. It should also be noted that in alternative implementation manners, the functions noted in the blocks can also occur in different order from that noted in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can also be executed in reverse order, depending on the functions involved. It should also be noted that each block in the structural diagram and / or flowchart, and the combination of blocks in the structural diagram and / or flowchart, can be implemented by a dedicated hardware-based system for executing the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0082] In addition, each functional module or unit in the embodiments of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0083] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or the part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0084] The above description is merely a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered within the protection scope of the present application.

Claims

1. A bad block screening method, characterized by, The method comprises: acquiring the number of ECC error bits and the number of read retries of each data block in the current recording storage device; the number of read retries is the number of times of sending a retry instruction to adjust the pre-judgment voltage of the storage device; screening out bad blocks in the storage device according to the number of ECC error bits and the number of read retries in each data block; wherein, the screening out bad blocks in the storage device according to the number of ECC error bits and the number of read retries in each data block comprises: if the number of ECC error bits is between a first preset bit threshold and a second preset bit threshold, and the number of read retries is greater than a preset retry threshold, determining that the corresponding data block is a bad block; wherein, the first bit threshold is less than the second bit threshold; if the number of ECC error bits is greater than the second bit threshold, determining that the corresponding data block is a bad block; the first bit threshold is 40%-60% of the second bit threshold.

2. The bad block screening method of claim 1, wherein, The method further comprises: when the number of read retries is greater than a preset retry threshold, determining that the corresponding data block is a bad block.

3. A bad block screening device, characterized by, The method comprises: an acquiring module, configured to acquire the number of ECC error bits and the number of read retries of each data block in the current recording storage device; the number of read retries is the number of times of sending a retry instruction to adjust the pre-judgment voltage of the storage device; a screening module, configured to screen out bad blocks in the storage device according to the number of ECC error bits and the number of read retries in each data block; wherein, the screening out bad blocks in the storage device according to the number of ECC error bits and the number of read retries in each data block comprises: if the number of ECC error bits is between a first preset bit threshold and a second preset bit threshold, and the number of read retries is greater than a preset retry threshold, determining that the corresponding data block is a bad block; wherein, the first bit threshold is less than the second bit threshold; if the number of ECC error bits is greater than the second bit threshold, determining that the corresponding data block is a bad block; the first bit threshold is 40%-60% of the second bit threshold.

4. A storage device, characterized by The method for screening bad blocks according to any one of claims 1-2 is adopted to screen bad blocks.

5. A computer device, comprising: The computer device comprises a memory and at least one processor, the memory stores a computer program, and the processor is configured to execute the computer program to implement the method for screening bad blocks according to any one of claims 1-2.

6. A computer storage medium, characterized in that The computer program is stored in the memory and is executed to implement the method for screening bad blocks according to any one of claims 1-2.

Citation Information

Patent Citations

  • Method for marking bad blocks and related device

    CN109032524A