Bad block processing method of solid state disk, solid state disk and storage medium

By finely labeling and distinguishing the bad blocks of solid state drives, the problem of low resource utilization rate of the bad blocks of solid state drives is solved, and more efficient resource utilization and data stability are achieved.

CN119620953AActive Publication Date: 2025-03-14HEFEI DATANG STORAGE TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411796115.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-14
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

The resource utilization rate of bad block processing methods of existing solid-state drives is low, resulting in waste of NAND FLASH resources and data write errors.

Method used

When performing data processing on the current page in the solid-state drive, blocks are marked according to the abnormal cause, marking information is generated, and the abnormal cause is distinguished based on the marking information, and the corresponding block is selected for data processing.

Benefits of technology

It improves the resource utilization rate of solid-state drives, avoids the waste of resources in traditional bad block processing methods, and enhances data stability and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119620953A_ABST
    Figure CN119620953A_ABST
Patent Text Reader

Abstract

The invention discloses a bad block processing method of a solid state disk, the solid state disk and a storage medium, and the method comprises the steps: marking a block where a current page is located according to an exception reason when an exception is found in the data processing of the current page, and obtaining the marking information corresponding to the block where the current page is located; wherein the mark information generated according to different abnormal reasons is different; and when data processing is performed on the solid state disk, performing data processing by using the corresponding block according to the mark information. According to the scheme, various different reasons of later bad blocks caused in the use process of the solid state disk are finely recorded, so that available parts can be continuously used when the blocks are not completely damaged, and the situation that all later bad blocks are directly decommissioned or replaced like a traditional bad block processing scheme is avoided; and the resource utilization rate of the solid-state disk is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to but is not limited to the field of solid-state hard disks, and in particular to a method for processing bad blocks of a solid-state hard disk, a solid-state hard disk, and a storage medium. Background Art

[0002] With the continuous advancement of electronic product technology, the demand for electronic storage products in various industries is growing, especially the demand for faster and more convenient storage products. NAND FLASH has become the preferred storage medium for many electronic products due to its characteristics of non-volatility, low power consumption, small size and no mechanical structure. Solid-state drives (SSDs), as a device that uses NAND FLASH as a storage medium, occupy an important position in the memory industry and have become the hottest part of the electronics industry in recent years.

[0003] However, NAND FLASH may have bad blocks during use (for example, due to differences in NAND FLASH manufacturing processes, different manufacturers cannot guarantee that every block is a good block when it leaves the factory. There will be some blocks with problems when leaving the factory, which we call original bad blocks; these original bad blocks will be automatically marked by the manufacturer when leaving the factory, and usually will not affect the normal use of the solid-state drive. During use, some new bad blocks will still appear due to programming, erasing and reading operations). These problems will lead to a variety of adverse consequences, such as reducing the write speed, and even causing data accumulation and inability to store in time, resulting in resource waste and deadlock, which in turn causes data write errors. It can be seen that the management of these bad blocks is crucial to the data reliability and effectiveness of the solid-state drive.

[0004] However, the traditional bad block processing method is to use a simple and crude management method to directly retire or replace all the bad blocks. However, with the improvement of technology, the capacity of a block has gradually increased from several MB to dozens of MB or even hundreds of MB. If a block is slightly damaged, it will be retired or replaced directly, which will cause a huge waste of NAND FLASH resources, which is not conducive to the deep utilization of NAND FLASH resources and also affects the resource occupation of cache.

[0005] Therefore, a new late bad block management method is needed to more effectively utilize NAND FLASH resources and improve the resource utilization of solid state drives. Summary of the invention

[0006] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0007] The present application provides a bad block processing method for a solid state drive, a solid state drive and a storage medium, which can effectively and deeply utilize NAND FLASH resources and solve the problem of low resource utilization of bad block processing methods in the prior art.

[0008] An embodiment of the present application provides a method for processing bad blocks of a solid-state hard disk, comprising: when an exception is found during data processing of a current page, marking the block where the current page is located according to the cause of the exception, and obtaining marking information corresponding to the block where the current page is located; wherein the marking information generated according to different causes of the exception is different; when processing data on the solid-state hard disk, using the corresponding block for data processing according to the marking information.

[0009] An embodiment of the present application also provides a solid-state hard disk, comprising: a memory and a processor; the memory is used to store a program for bad block processing of the solid-state hard disk; the processor is used to read the program for bad block processing of the solid-state hard disk and execute the bad block processing method of the solid-state hard disk as described in any embodiment of the present application.

[0010] An embodiment of the present application further provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, can implement the bad block processing method for a solid state drive as described in any embodiment of the present application.

[0011] Compared with the related art, the embodiment of the present application provides a method for processing bad blocks of a solid-state hard disk, a solid-state hard disk, and a storage medium. When an abnormality is found during data processing of the current page, the scheme marks the block where the current page is located according to the cause of the abnormality, and obtains the marking information corresponding to the block where the current page is located. The marking information generated due to different abnormal causes is different, so when the solid-state hard disk is processed for data, it is possible to distinguish the abnormal cause of the data processing abnormality according to the marking information, so as to further use the corresponding block for data processing. It can be seen that the scheme records the various different reasons for the late bad blocks during the use of the solid-state hard disk in detail, so that the usable part of the block can continue to be used when the block is not completely damaged, avoiding the operation of directly retiring or replacing all the late bad blocks like the traditional bad block processing scheme, thereby improving the resource utilization of the solid-state hard disk.

[0012] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by implementing the present application. Other advantages of the present application can be realized and obtained by the schemes described in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings are used to provide an understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0014] Figure 1 A brief flow chart of a bad block processing method for a solid state drive according to an embodiment of the present application; Figure 2 This is a flow chart of a bad block processing method of a solid state drive according to an embodiment of the present application; Figure 3 A schematic diagram of a solid state drive according to an embodiment of the present application. DETAILED DESCRIPTION

[0015] The present application describes multiple embodiments, but the description is exemplary rather than restrictive, and it is obvious to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described in the present application. Although many possible feature combinations are shown in the drawings and discussed in the specific embodiments, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with any other feature or element in any other embodiment, or may replace any other feature or element in any other embodiment.

[0016] The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements disclosed in the present application may also be combined with any conventional features or elements to form a unique invention scheme. Any features or elements of any embodiment may also be combined with features or elements from other invention schemes to form another unique invention scheme. Therefore, it should be understood that any feature shown and / or discussed in the present application may be implemented individually or in any appropriate combination. Therefore, except for the limitations made according to the attached claims and their equivalents, the embodiments are not subject to other restrictions. In addition, various modifications and changes may be made within the scope of protection of the attached claims.

[0017] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of the steps described herein, the method or process should not be limited to the steps of the specific order described. As will be understood by those of ordinary skill in the art, other sequences of steps are also possible. Therefore, the specific sequence of the steps set forth in the specification should not be interpreted as a limitation to the claims. In addition, the claims for the method and / or process should not be limited to the steps of performing them in the order written, and those skilled in the art can easily understand that these sequences can be changed and still remain within the spirit and scope of the embodiments of the present application.

[0018] Due to the design characteristics of NAND FLASH itself, a NAND FLASH DIE chip is composed of many blocks, and each block is composed of several pages. During the use process, the erase and write life of NAND FLASH is limited. When used for a certain period of time or in a certain scenario, the bad blocks generated become late bad blocks. How to efficiently manage these late bad blocks is a major issue that needs to be paid attention to in the application process of solid-state drives.

[0019] To this end, an embodiment of the present application provides a method for processing bad blocks of a solid state drive, such as Figure 1 As shown, the following steps may be included: Step S110: when an exception is found during data processing of the current page, the block where the current page is located is marked according to the cause of the exception, and marking information corresponding to the block where the current page is located is obtained; wherein the marking information generated according to different causes of the exception is different; Step S120: when processing data on the solid state drive, use corresponding blocks to process data according to the tag information.

[0020] The bad block processing method of the solid state drive of this embodiment, when an abnormality is found during data processing of the current page, the block where the current page is located is marked according to the abnormal cause, and the marking information corresponding to the block where the current page is located is obtained. Since the marking information generated by different abnormal causes is different, when processing data on the solid state drive, it is possible to distinguish the abnormal cause of the data processing abnormality according to the marking information, so as to further use the corresponding block for data processing. This solution does not adopt a simple and crude management method like the traditional bad block processing method, as long as a page in the bad block is abnormal, the entire block is marked as a late bad block, but a detailed record of the various different reasons for the late bad blocks during the use of the solid state drive is made, so that the usable part of the block can continue to be used when the block is not completely damaged, avoiding the operation of directly retiring or replacing all the late bad blocks like the traditional bad block processing solution, thereby improving the resource utilization of the solid state drive.

[0021] In an exemplary embodiment, marking the block where the current page is located according to the abnormality cause includes: When the abnormal reason is the reason that makes the entire block unusable, the block where the current page is located is marked as a first type bad block; When the abnormal reason is a reason that causes the current page to be unusable, the block where the current page is located is marked as a second type bad block, and the number information of the current page is recorded.

[0022] The bad block processing method of the solid state drive of the present embodiment divides the bad block causes into two categories: "the cause causing the entire block to be unusable" and "the cause causing the current page to be unusable". When the bad block cause is "the cause causing the entire block to be unusable", it is marked as a first type bad block. When the bad block cause is "the cause causing the current page to be unusable" (that is, it is not the cause causing the entire block to be unusable, but only some pages in the block are unusable), it is marked as a second type bad block, and the numbering information of the bad page is recorded. In this way, in the subsequent use of the solid-state hard disk, when processing data on a certain block, if the block has corresponding marking information and is marked as a first-type bad block, it means that the entire block is damaged and cannot be used (all pages in it cannot be used), and at this time, it can be directly skipped or a replacement strategy can be used; if the block has corresponding marking information and is marked as a second-type bad block, it means that only some pages of the block cannot be used, and at this time, it can be determined whether the current page used for data processing is a bad page based on the bad page information recorded in the marking information corresponding to the block. If it is a bad page, it can be skipped or a replacement strategy can be used, and if it is not a bad page, it can be used normally; if the block does not have corresponding marking information, it means that the block is a block that can be used normally (all pages in it can be used normally), and data processing is performed normally. It can be seen that the solution of this embodiment will continue to use the usable part of the block when the block is not completely damaged, avoiding the operation of directly retiring or replacing all the later bad blocks like the traditional bad block processing solution, thereby improving the resource utilization of the solid-state hard disk.

[0023] In an example of this embodiment, the reasons why the entire block is unusable include at least: original bad block, erase instruction failure; the reasons why the current page is unusable include at least: write instruction failure, read instruction failure, page error correction exceeds the error correction capability limit of the solid state drive.

[0024] The bad block processing method of the solid state drive in this example further refines the causes of bad blocks and records these different causes in detail, so that in the subsequent use of the solid state drive to process data, the abnormal causes can be distinguished according to the identification information, thereby improving the data stability and security of the solid state drive. For example, if the block with partially damaged pages is used reasonably, if it is very important data, it can be placed in the partially damaged block instead of the partially damaged block, and only the non-important data can be placed in the partially damaged block.

[0025] In an example of this embodiment, marking the block where the current page is located according to the abnormality reason to obtain the marking information corresponding to the block where the current page is located includes: After receiving feedback that the read instruction failed during data processing of the current page, the data is read using the error correction capability of the solid state drive: when the error correction is successful, the bad block cause of the block where the page is located is identified as a read instruction failure; when the error correction is unsuccessful, the bad block cause of the block where the page is located is identified as a page error and the error correction exceeds the error correction capability limit of the solid state drive.

[0026] Exemplarily, the page error correction exceeding the error correction capability limit of the solid state drive means that the error BIT flip in the currently read page exceeds the error correction limit of the solid state drive. Error correction can be achieved through RAID ECC (Redundant Array of Independent Disks with Error Correcting Code) technology.

[0027] This exemplary method for handling bad blocks of a solid-state drive uses different identification marks for "instruction-level error" bad blocks of "failed to read instructions" and "data-level error" bad blocks of "page error correction exceeding the error correction capability limit of the solid-state drive", thereby achieving a detailed segmentation of error causes and laying a good foundation for better use of the marking information in the later stage.

[0028] In an exemplary embodiment, after obtaining the tag information corresponding to the block where the current page is located, the method further includes: storing the tag information in a tag storage buffer area according to a preset structure; The method also includes: during power-off initialization, storing the tag information in a tag storage area of ​​a first valid block according to a preset tag storage address, wherein the first valid block is a valid block guaranteed by the hard disk manufacturer; during power-on initialization, initializing the tag information stored in the tag storage area to the tag storage cache area.

[0029] The method for processing bad blocks of a solid-state hard disk in this embodiment initializes the mark information stored in the mark storage area to the mark storage cache area during power-on initialization, thereby improving the storage and reading efficiency of the mark information; during power-off initialization, the mark information is stored in the mark storage area of ​​the first valid block according to a preset mark storage address, thereby avoiding the loss of mark information data.

[0030] In an example of this embodiment, the method may also include: when it is detected that the first valid block is a bad block and a first type bad block, pointing the preset mark storage address to the storage area of ​​another valid block, and using the storage area of ​​the valid block as the mark storage area.

[0031] The bad block processing method for a solid-state hard disk of this embodiment, when it is detected that the first valid block is a bad block and is a first type of bad block, points the preset mark storage address to the storage area of ​​another valid block, and uses the storage area of ​​the valid block as the mark storage area, so that the mark information can be better preserved and the loss of the mark information can be avoided.

[0032] In an exemplary embodiment, when the cause of the exception is the reason why the entire block cannot be used, the preset structure includes a bad block cause identifier and a bad block number; when the cause of the exception is the reason why the current page cannot be used, the preset structure includes a bad block cause identifier, a bad block number, the number of bad pages, and a bad page number; wherein the bad block cause identifier is used to distinguish whether the bad block is a first type bad block or a second type bad block.

[0033] In an exemplary embodiment, the using a corresponding block to perform data processing according to the tag information includes: Determine whether the current block for data processing has corresponding marking information; When it is confirmed that the current block has corresponding marking information, the bad block type of the block is confirmed according to the marking information corresponding to the block: when the block is a first type bad block, the block is skipped and the next predetermined block is used for data processing; when the block is a second type bad block, it is determined whether the number of the current page used for data processing is recorded in the marking information corresponding to the block, if it is recorded, the page is skipped and the next predetermined page is used as the current page for data processing, and if it is not recorded, the current page is used for data processing; When it is confirmed that the current block does not have corresponding marking information, the block is used to process the data.

[0034] The next predetermined block refers to the next block in the data processing logic, and the next predetermined page refers to the next page in the data processing logic. Exemplarily, when a skip strategy is used for bad blocks / bad pages, the next predetermined block refers to the next block in the data processing logic of the solid-state drive that is about to perform data processing, and the next predetermined page refers to the next page in the data processing logic of the solid-state drive that is about to perform data processing; when a replacement strategy is used for bad blocks / bad pages, the next predetermined block refers to the block that replaces the block in the data processing logic of the solid-state drive, and the next predetermined page refers to the page that replaces the page in the data processing logic of the solid-state drive.

[0035] The method for processing a bad block of a solid state drive of the present embodiment is that during the data processing of the solid state drive, when it is determined according to the marking information that the current block used for data processing has the corresponding marking information that is marked as a first type of bad block, it means that the entire block is damaged and cannot be used, and at this time, it can be directly skipped or a replacement strategy can be used; when it is determined according to the marking information that the current block used for data processing has the corresponding marking information that is marked as a second type of bad block, it means that only part of the page of the block cannot be used, and at this time, it is determined whether the page is a bad page according to the bad page information in the block recorded in the marking information, if it is a bad page, it can be skipped or a replacement strategy can be used, and if it is not a bad page, it can be used normally; when it is determined according to the marking information that the current block used for data processing does not have the corresponding marking information, it means that the block can be used normally, and data processing can be performed normally. It can be seen that according to the marking information, it is possible to continue to use the usable part of the block when the block is not completely damaged, avoiding the operation of directly retiring or replacing the block in its entirety when encountering a late bad block like the traditional bad block processing scheme, thereby improving the resource utilization of the solid state drive.

[0036] In addition, it should be noted that when a block / page is not marked, if the read instruction is abnormal, an error correction mechanism will be used for error correction. When the correct data is obtained through the error correction mechanism, the correct data will be written into other correct blocks / pages, and the block / page will be marked as "read instruction abnormal". In this case, the data will be read from the correct block / page next time, and the block / page will not be passed through; when the correct data cannot be obtained through the error correction mechanism, it is determined that the data is lost, and the block / page is marked as "page error correction exceeds the error correction capability limit of the solid state drive". In this case, the data is lost and the data will not be read again. Therefore, the data processing process of the above embodiment is that when reading data, if a block is found to be marked as "read instruction abnormal" or "page error correction exceeds the error correction capability limit of the solid state drive", the block can be directly skipped.

[0037] In this embodiment, data processing refers to reading data, and the so-called "skipping this block and using the next predetermined block for data processing" / "skipping this page and using the next predetermined page as the current page for data processing" means changing a block / page to read other data, rather than changing a block / page to read the same data.

[0038] The following is a complete example of the method for processing bad blocks of a solid state drive of the present application. Figure 2 As shown, the following steps may be included: Step S210: during power-on initialization, tag information is read from a tag storage area according to a preset tag storage address, and the tag information is initialized to a tag storage buffer area.

[0039] For example, when the solid state drive is processing data, a RAM cache is allocated in its cache space to perform specific marking of the bad blocks in the later stage. Since BLOCK 0 is a certain valid block guaranteed by the NAND FLASH manufacturer, we can usually save the RAM cache information in BLOCK 0 in the NAND FLASH. Of course, this application does not limit this. When BLOCK 0 is abnormal, we can also save the RAM cache information in other valid blocks.

[0040] This step S210 imports the specific late bad block mark information into the cache RAM after each power-on initialization, so that each time the solid state drive performs data processing, it can use the information of each block in the cache for comparison processing. For example, if the number of the block to be processed is not recorded in the cache mark information, then the block is a good block and can be directly used for data processing, data reading and writing, and other operations.

[0041] Step S220: When an abnormality is found during data processing of a certain page during use of the hard disk, the block where the current page is located and the current page are marked according to the abnormality cause, and the marking information is stored in the marking storage buffer area according to a preset structure. The marking of the block where the current page is located and the current page according to the abnormality cause includes:

[0042] When the abnormality is caused by the original bad block, the block where the current page is located is marked as 01, and the number of the block where the current page is located is recorded; When the abnormal reason is the failure of the erase instruction, the block where the current page is located is marked as 02, and the number of the block where the current page is located is recorded; When the abnormal reason is a write instruction failure, the block where the current page is located is marked as 03, and the number of the block where the current page is located and the number of the current page are recorded, and the number of bad pages of the current block is updated (increased by 1); illustratively, the marking information of a "block where a write instruction failed" can be "TLV: 03 1010 0002 0040 0080", where 03 means "write instruction failure", 1010 means that the number of the block is 0X1010, and 0002 means that there are 2 pages in the block that have write errors, namely page 0X0040 and page 0X0080; When the abnormal reason is a read instruction failure, the block where the current page is located is marked as 04, and the number of the block where the current page is located and the number of the current page are recorded, and the number of bad pages of the current block is updated (increased by 1); illustratively, the marking information of a "block where a read instruction failed" can be "TLV: 04 2020 0003 0022 0033 0044", where 04 means "read instruction failed", 2020 means that the number of the block is 0X2020, and 0003 means that there are 3 pages in the block that have read errors, namely, page 0X0022, page 0X0033, and page 0X0044; When the abnormal reason is that the page error correction exceeds the error correction capability limit of the solid state drive, the block where the current page is located is marked as 05, and the number of the block where the current page is located and the number of the current page are recorded, and the number of bad pages in the current block is updated (increased by 1); illustratively, the marking information of a "block where the page error correction exceeds the error correction capability limit of the solid state drive" can be "TLV: 050050 0002 0066 0077", where 05 means "page error correction exceeds the error correction capability limit of the solid state drive", 0050 means that the number of the block is 0X0050, and 0002 means that there are 2 pages in the block that have read errors that exceed the error correction capability limit of the solid state drive, namely pages 0X0066 and 0X0077.

[0043] Step S230: When performing data processing, read the tag information from the tag storage buffer area, and perform data processing according to the tag information. The data processing according to the tag information includes:

[0044] searching the marking information of the current block from the marking information according to the code of the block where the current page is located; When the mark information of the current block is not found, it means that the current block can be used normally, and the current block is directly used for data processing; When the mark information of the current block is found, if the bad block reason is marked as 01 or 02, it means that all pages in the current block cannot be used normally, and the next block is directly skipped or replaced by a replacement strategy; if the bad block reason is marked as 03, 04 or 05, the current page is confirmed to be a bad page according to the number of the current page. If the current page is a normal page, it is used normally. If the current page is a bad page, the next page is directly skipped or replaced by a replacement strategy; The confirmation of whether the current page is a bad page according to the number of the current page can be based on whether the number of the current page is stored in the bad page number of the current block. If so, the current page is a bad page; if not, the current page is a normal page.

[0045] It should be noted that bad blocks caused by original bad blocks and erase instruction failures indicate that these blocks have suffered serious physical damage, so these blocks are directly skipped or replaced; bad blocks caused by write instruction failures, read instruction failures, and page error correction exceeding the error correction capability limit of the solid-state drive only represent the current page write failure, read failure, and error correction failure, and do not mean that other pages in the block also have the above problems. Therefore, the block where the page is located is marked as a second type of bad block that is different from the "bad block caused by original bad blocks and erase instruction failures". In this way, it is possible to distinguish whether the entire block is damaged based on the mark type, so that the pages that can be used normally in the block can continue to be used, but the pages with problems in the block will no longer be used.

[0046] Step S240: During power-off initialization, the tag information of the tag storage buffer area is stored in the tag storage area of ​​the first valid block, where the first valid block is a valid block guaranteed by the hard disk manufacturer.

[0047] In summary, the management scheme of the bad block processing scheme of this embodiment is conceived as follows: make a specific detailed classification of the type of each bad block generated (for example, the original bad block is marked as 01, the bad block caused by the failure of the erase instruction in normal use is marked as 02, the bad block caused by the failure of the write instruction in normal use is marked as 03, the bad block caused by the failure of the read instruction in normal use is marked as 04, and the bad block caused by the normal use reading exceeding the limit of the solid state drive's error correction capability is marked as 05). Therefore, all the later bad blocks are first classified and marked in depth and detail, and then different specific processing is performed for different situations of each bad block, so as to achieve efficient resource utilization.

[0048] An embodiment of the present application provides a solid state drive, such as Figure 3 As shown, it includes: a memory and a processor; The memory is used to store a program for bad block processing of the solid state drive; The processor is used to read the program for bad block processing of the solid state drive and execute the bad block processing method of the solid state drive as described in any embodiment of the present application.

[0049] An embodiment of the present application further provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, can implement the bad block processing method for a solid state drive as described in any embodiment of the present application.

[0050] In summary, the present application realizes a bad block processing method of a solid state drive, a solid state drive and a storage medium, which can be applied to the optimization management of late bad blocks of flash memory. The scheme further subdivides the various different reasons that lead to late bad blocks during the use of the solid state drive, and makes detailed records for these different reasons, so that the traditional bad block processing scheme can completely avoid the operation of directly retiring or replacing all bad blocks when encountering late bad blocks during the use of the solid state drive, thereby saving NAND FLASH resources and no longer causing great resource waste caused by NAND FLASH in the management of late bad blocks. At the same time, it also supports the dynamic addition of markings to each page of each late bad block during use. In the use of the solid state drive, it only needs to judge the block to be operated at present, and if it is not in the late bad block cache of these subdivided blocks, it can be directly treated as a good block for various operations; if it is in the late bad blocks of these subdivided blocks, it can directly avoid the problematic pages that have been marked, and operate other pages normally, thereby greatly improving the utilization and efficiency of resources, and also improving the performance and reliability of the solid state drive.

[0051] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As is known to those skilled in the art, the term "computer storage medium" includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0052] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0053] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for processing bad blocks of a solid state drive, characterized in that: include: When an exception is found during data processing of the current page, the block where the current page is located is marked according to the cause of the exception, and marking information corresponding to the block where the current page is located is obtained; wherein the marking information generated according to different causes of the exception is different; When data processing is performed on the solid state drive, the corresponding blocks are used for data processing according to the marking information.

2. The method for processing bad blocks of a solid state drive according to claim 1, characterized in that: The marking of the block where the current page is located according to the abnormal reason includes: When the abnormal reason is the reason that makes the entire block unusable, the block where the current page is located is marked as a first type bad block; When the abnormal reason is a reason that causes the current page to be unusable, the block where the current page is located is marked as a second type bad block, and the number information of the current page is recorded.

3. The method for processing bad blocks of a solid state drive according to claim 2, wherein: The reasons that make the entire block unusable include at least: original bad block, erase command failure; The reasons why the current page cannot be used include at least: write instruction failure, read instruction failure, and page error correction exceeding the error correction capability limit of the solid state drive.

4. The method for processing bad blocks of a solid state drive according to claim 2, characterized in that: The using corresponding blocks to perform data processing according to the tag information includes: Determine whether the current block for data processing has corresponding marking information; When it is confirmed that the current block has corresponding marking information, the bad block type of the block is confirmed according to the marking information corresponding to the block: when the block is a first type bad block, the block is skipped and the next predetermined block is used for data processing; when the block is a second type bad block, it is determined whether the number of the current page used for data processing is recorded in the marking information corresponding to the block, if it is recorded, the page is skipped and the next predetermined page is used as the current page for data processing, and if it is not recorded, the current page is used for data processing; When it is confirmed that the current block does not have corresponding marking information, the block is used to process the data.

5. The method for processing bad blocks of a solid state drive according to claim 3, characterized in that: The step of marking the block where the current page is located according to the abnormal reason to obtain the marking information corresponding to the block where the current page is located includes: After receiving feedback that the read instruction failed during data processing of the current page, the data is read using the error correction capability of the solid state drive: when the error correction is successful, the bad block cause of the block where the page is located is identified as a read instruction failure; when the error correction is unsuccessful, the bad block cause of the block where the page is located is identified as a page error and the error correction exceeds the error correction capability limit of the solid state drive.

6. The method for processing bad blocks of a solid state drive according to claim 1, characterized in that: After obtaining the tag information corresponding to the block where the current page is located, the method further includes: storing the tag information in a tag storage buffer area according to a preset structure; The method also includes: during power-off initialization, storing the tag information in a tag storage area of ​​a first valid block according to a preset tag storage address, wherein the first valid block is a valid block guaranteed by the hard disk manufacturer; during power-on initialization, initializing the tag information stored in the tag storage area to the tag storage cache area.

7. The method for processing bad blocks of a solid state drive according to claim 6, characterized in that: The method further comprises: When it is detected that the first valid block is a bad block and a first type bad block, the preset mark storage address is pointed to a storage area of ​​another valid block, and the storage area of ​​the valid block is used as the mark storage area.

8. The method for processing bad blocks of a solid state drive according to claim 6, characterized in that: When the abnormal reason is the reason that causes the entire block to be unusable, the preset structure includes a bad block reason identifier and a bad block number; When the abnormal reason is the reason that causes the current page to be unusable, the preset structure includes a bad block reason identifier, a bad block number, a bad page quantity, and a bad page number; The bad block cause identifier is used to distinguish whether the bad block is a first type bad block or a second type bad block.

9. A solid state hard disk comprising: A memory and a processor, characterized in that: The memory is used to store a program for bad block processing of the solid state drive; The processor is used to read the program for bad block processing of the solid state drive and execute the bad block processing method of the solid state drive as described in any one of claims 1 to 8.

10. A non-transitory computer-readable storage medium storing a computer program, wherein: When the computer program is executed by a processor, it can implement the bad block processing method of the solid state drive as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Storage equipment bad block processing method and device and storage equipment

    CN104615550A

  • Error management method of flash memory for greatly enhancing service time of solid state disk

    CN106653090A

  • A method for handle data block errors of a solid state hard disk

    CN109460371A

  • Data storage method and system for NandFlash

    CN113110794A

  • Method and device for realizing bad block setting, storage medium and electronic equipment

    CN114356679A