Bad block management method and device and related equipment

By determining whether there are continuous good storage blocks in the Plane area where the storage bad block is located in the solid-state hard disk, and using the reserved space in the remaining Die area for batch replacement, the low efficiency of storage bad block replacement and the dispersion of reserved space in the SSD is solved. The problem of improving the performance and replacement efficiency of SSD.

CN119148928APending Publication Date: 2024-12-17SHENZHEN CITY TECHWIN SEMICONDUCTOR COMPANY LIMITED
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411086570.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In the prior art, solid-state drives (SSDs) cannot effectively realize batch replacement of multiple storage blocks in succession when replacing storage bad blocks, resulting in a degradation of SSD performance, and the storage blocks in the reserved space are easily broken up, affecting the replacement. Efficiency and performance.

Method used

By determining whether there are good storage blocks in the Plane area where the continuous storage bad blocks in the user space are located, batch replacement is performed if there is, otherwise batch replacement is performed using the reserved space of the remaining Die area to ensure Multi-Plane operation and reservation Continuity of space.

Benefits of technology

Improve the replacement efficiency and replaceability rate of storage bad blocks, ensure the performance of SSDs, and prevent the dispersion of stored blocks in the reserved space, ensuring rapid batch replacement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119148928A_ABST
    Figure CN119148928A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of memory processing, in particular to a bad block management method and device and related equipment. The method comprises the following steps: for Nm continuous storage bad blocks which are arranged according to a horizontal direction in an mth Die area in a user space, determining whether a storage good block exists in a partial area in a reserved space in a Plane area where each storage bad block is located; if the corresponding Nm storage blocks do not exist, replacing the storage blocks existing in a partial area, located in the reserved space, in each of (M-1) remaining Die areas except the mth Die area in the solid state disk in batches according to the Nm storage bad blocks, and if the Nm storage blocks do not exist, replacing the storage blocks existing in the partial area, located in the reserved space, in the (M-1) remaining Die areas except the mth Die area in the solid state disk in batches; therefore, the bad storage blocks are replaced with the Die area as the unit, it can be ensured that the SSD can carry out Multi-Plane operation on the multiple good storage blocks which are replaced into the same Die area in the user space in batches, and the use performance of the SSD is further ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of memory processing technology, and in particular to a bad block management method, device and related equipment. Background Art

[0002] In the prior art, the strategy for replacing bad storage blocks in the memory space of SSD (Solid State Drive) is mainly a replacement strategy. The memory space is physically divided into multiple Die areas arranged in the horizontal direction, each Die area includes multiple Plane areas arranged in the horizontal direction, and each Plane area includes multiple storage blocks arranged in the vertical direction; the memory space is logically divided into user space and reserved space arranged in the vertical direction.

[0003] The replacement strategy specifically refers to the process of writing data into the user space. If a bad storage block is found in the user space, the good storage block in the reserved space will be replaced with the bad storage block in the user space. In actual implementation, the replacement strategy includes batch replacement and single replacement. Batch replacement refers to using multiple consecutive good storage blocks in the reserved space to replace multiple consecutive bad storage blocks arranged horizontally in a certain Die area in the user space at one time. This can effectively improve the replacement efficiency and improve the performance of the SSD.

[0004] In actual applications, since multiple good storage blocks used to batch replace multiple bad storage blocks are randomly selected from the reserved space, it is very likely that the selected good storage blocks are distributed across Die areas in the reserved space; when multiple good storage blocks distributed across Die areas are replaced to the user space, the SSD cannot perform Multi-Plane operations on the multiple good storage blocks distributed across Die areas, which will seriously affect the performance of the SSD;

[0005] In addition, randomly selecting good blocks in the reserved space will also cause the "pieces" of good storage blocks in the reserved space to be easily broken up. As the service life of the SSD continues to increase, the above phenomenon becomes more and more serious, resulting in the reserved space not always having multiple continuous good storage blocks for batch replacement. When batch replacement of multiple continuous bad storage blocks cannot be performed, the replacement efficiency of the bad storage blocks will be significantly reduced, further affecting the performance of the SSD; when the replacement efficiency of bad storage blocks is reduced, it will also lead to untimely replacement of bad storage blocks, which may further cause data corruption, further affecting the performance of the SSD. Summary of the invention

[0006] In view of this, the purpose of the present application is to provide a bad block management method, device and related equipment to solve the technical problem in the prior art that the performance of the SSD is affected due to the inability to achieve batch replacement of multiple consecutive storage bad blocks as much as possible.

[0007] In a first aspect, the present application provides a bad block management method, which is applied to a solid state drive, and the method comprises:

[0008] For the N horizontally arranged in the mth Die area in the user space m consecutive bad storage blocks, determining whether there is a good storage block in a partial area located in the reserved space in the Plane area where each bad storage block is located;

[0009] Wherein, M≥m≥1, M represents the number of Die areas in the solid state drive; N m ≥2, the N m Indicates the number of Plane areas in the mth Die area;

[0010] If there is no corresponding N m The stored blocks are N arranged in the horizontal direction in a partial area in each of the (M-1) Die areas remaining in the solid state drive after excluding the mth Die area and located in the reserved space. m The storage blocks are continuous, for N m The bad storage blocks are replaced in batches.

[0011] Preferably, after determining whether there is a good storage block in a partial area in the reserved space in the Plane area where each bad storage block is located, the method further comprises:

[0012] If there is a corresponding N m The stored blocks are N m The good storage blocks are respectively replaced with the corresponding bad storage blocks.

[0013] Preferably, the determining whether there is a good storage block in a partial area located in the reserved space in the Plane area where each bad storage block is located includes:

[0014] For the N horizontally arranged in the mth Die area in the user space m continuous bad blocks, determining whether there are N bad blocks arranged in a horizontal direction in a partial area of ​​the m-th Die area located in the reserved space m A continuous storage block;

[0015] If there is a corresponding N mN consecutive storage blocks m The continuous storage blocks correspond to N m The bad storage blocks are replaced in batches;

[0016] If there is no corresponding N m The continuous good storage blocks are determined to determine whether there is a good storage block in a partial area located in the reserved space in the Plane area where each bad storage block is located.

[0017] Preferably, the N horizontally arranged areas in each of the (M-1) Die areas remaining in the solid state drive after excluding the mth Die area are m The continuous storage blocks, for the corresponding N m The bad storage blocks are replaced in batches, including:

[0018] Determine whether there are N horizontally arranged areas in a partial area located in the reserved space in each of the (M-1) Die areas remaining after excluding the mth Die area in the solid state drive. m A continuous storage block;

[0019] If there is a corresponding N m N consecutive storage blocks m The continuous good storage blocks are batch-replaced for the corresponding bad storage blocks.

[0020] Preferably, the method further comprises:

[0021] In the process of writing data into the user space, if it is detected that there are N horizontally arranged data in the mth Die area in the user space, m continuous bad storage blocks, and performing the step of determining whether there is a good storage block in a partial area located in the reserved space in the Plane area where each bad storage block is located.

[0022] Preferably, the method further comprises:

[0023] In the process of writing data to the user space, if it is detected that the n′th m The storage block is the bad storage block, and the n′th m whether there is a good storage block in a partial area located in the reserved space in the Plane area where the bad storage block is located;

[0024] If there is no corresponding good storage block, the N existing horizontally arranged blocks in the partial area of ​​each Die area in the remaining (M-1) Die areas located in the reserved space are m The continuous storage blocks, for the mth Die area including the n'th m N of the bad storage blocks m The storage blocks are replaced in batches; wherein n′ m ≥1.

[0025] In a second aspect, the present application provides a bad block management device, which is applied to a solid state drive, and the device includes: a storage block confirmation module and a replacement module;

[0026] The storage block confirmation module is used to identify N horizontally arranged storage blocks in the mth Die area in the user space. m consecutive bad storage blocks, determining whether there is a good storage block in a partial area located in the reserved space in the Plane area where each bad storage block is located;

[0027] Wherein, M≥m≥1, M represents the number of Die areas in the solid state drive; N m ≥2, the N m Indicates the number of Plane areas in the mth Die area;

[0028] The replacement module is used to replace the corresponding N m The stored blocks are N arranged in the horizontal direction in a partial area in each of the (M-1) Die areas remaining in the solid state drive after excluding the mth Die area and located in the reserved space. m The storage blocks are continuous, for N m The bad storage blocks are replaced in batches.

[0029] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory is used to store software programs, and the processor runs or executes the software programs stored in the memory so that the electronic device implements the above-mentioned bad block management method.

[0030] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program codes executed by a processor, wherein the program codes include methods for implementing the above-mentioned bad block management method.

[0031] In a fifth aspect, the present application provides a computer program product, including a program code, so that when a computer runs the computer program product, the computer executes the above-mentioned bad block management method.

[0032] Beneficial effects:

[0033] The present application provides a bad block management method, comprising: for N bad blocks arranged in horizontal direction in the mth Die area in the user space, m consecutive bad storage blocks, and determine whether there is a good storage block in the partial area of ​​the reserved space in the Plane area where each bad storage block is located; where M≥m≥1, M represents the number of Die areas in the solid state drive; N m ≥2, N m Indicates the number of Plane regions in the mth Die region; if there is no corresponding N m The N stored blocks arranged horizontally in the reserved space of each of the (M-1) Die areas remaining after the mth Die area in the solid state drive are stored. m consecutive storage blocks, for N m Batch replacement of bad storage blocks;

[0034] In summary, the present application performs a single replacement for each of the multiple storage bad blocks that need to be replaced in the mth Die area. If the partial area in the reserved space in the mth Die area is insufficient for a single replacement of the above-mentioned storage bad blocks, the multiple storage bad blocks are replaced in batches through the partial area in the reserved space in the remaining Die. Therefore, the present application replaces the storage bad blocks in units of Die areas, which can ensure that the SSD can perform Multi-Plane operations on the multiple storage good blocks that are replaced in batches to the same Die area in the user space, thereby further ensuring the performance of the SSD. In addition, it can also ensure that the "pieces" of storage good blocks in the reserved space will not be randomly scattered, so that the SSD can quickly determine the storage good blocks that can be replaced in batches in the reserved space and perform batch bad blocks on multiple consecutive storage bad blocks through the above-mentioned storage good blocks. Therefore, the replacement efficiency of the storage bad blocks can be significantly improved, and the replaceability rate of the storage bad blocks and the utilization efficiency of the storage good blocks can be maximized, which can effectively ensure the performance of the SSD. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. The following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 A flowchart of a bad block management method provided in an embodiment of the present application;

[0037] Figure 2 Another flowchart of the bad block management method provided in the embodiment of the present application;

[0038] Figure 3 A schematic diagram of the structure of a bad block management device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] In the prior art, strategies for replacing bad storage blocks in the memory space of an SSD include: a skip strategy and a replacement strategy.

[0040] As shown in Table 1, Table 1 is an example table of the distribution of storage blocks in the memory space of the solid-state drive provided in an embodiment of the present application. The memory space of the SSD is physically divided into M Die areas arranged in a horizontal direction, and each Die area includes N m Plane areas, each Plane area includes Q storage blocks arranged in a vertical direction, where M, N m and Q are both positive integers; in the present embodiment, N m Set to 3 and Q to 13; the memory space is logically divided into user space and reserved space arranged vertically.

[0041] Table 1 Example of the distribution of storage blocks in the memory space of a solid state drive

[0042]

[0043] In Table 1, "Die0" indicates the Die area with the serial number 0; "Pl0" indicates the Plane area with the serial number 0; SBLK represents a super block, which is used to indicate the N horizontally arranged blocks in each Die area. m In the prior art, when the storage blocks included in the qth SBLK among Q SBLKs are all bad storage blocks, the entire qth SBLK and the T storage blocks in the reserved space can be replaced in batches.

[0044] The skip strategy specifically refers to the process of writing data into the user space. If the storage block to which data is currently to be written is found to be a bad storage block, the bad storage block will be skipped until the data is written into a good storage block. The replacement strategy specifically refers to the process of writing data into the user space. If a bad storage block is found in the user space, the good storage block in the reserved space will be replaced with the bad storage block in the user space. The replacement strategies include: batch replacement and single replacement. Batch replacement refers to using multiple consecutive good storage blocks in the reserved space to replace multiple consecutive bad storage blocks arranged horizontally in a Die area in the user space at one time.

[0045] It should be emphasized that, in actual implementation, the "replacement" of the bad storage block is essentially to build a mapping relationship between the bad storage block in the user space and the good storage block in the reserved space according to the storage block number, so that when it is necessary to perform read and write operations on the bad storage block in the user space, the read and write operations can be performed on the good storage block in the reserved space according to the corresponding mapping relationship. It can be seen that the storage block number in Table 1 indicates the read and write order.

[0046] Now, an example is given in conjunction with Table 1. Now, it is assumed that the storage block numbered 13 in the user space is a bad storage block. After the bad storage block numbered 13 is replaced with the good storage block numbered 121 in the reserved space (a mapping relationship is established), when the storage block numbered 12 in the user space is read and written, the good storage block numbered 121 in the reserved space is directly read and written (according to the mapping relationship).

[0047] In practical applications, although batch replacement is used to replace multiple bad storage blocks in a Die area in the user space, multiple good storage blocks used for batch replacement of multiple bad storage blocks are randomly selected in the reserved space, which may cause the selected good storage blocks to be distributed across Die areas in the reserved space; now, an example is given in conjunction with Table 1, and now it is assumed that the storage blocks numbered 15, 16 and 17 in the Die1 area in the user space are bad storage blocks. In order to perform batch replacement for the three bad storage blocks, the good storage blocks numbered 125, 126 and 127 are randomly selected in the reserved space for batch replacement of the three bad storage blocks, wherein the good storage block numbered 125 is located in the Die1 area, and the good storage blocks numbered 126 and 127 are located in the Die area adjacent to the Die1 area; the good storage blocks numbered 125, 126 and 127 are “the selected good storage blocks are distributed across Die areas in the reserved space”;

[0048] In actual applications, when multiple storage blocks distributed across Die areas are replaced to user space, the SSD cannot perform Multi-Plane operations on the multiple storage blocks distributed across Die areas according to the mapping relationship, which will seriously affect the performance of the SSD.

[0049] In addition, randomly selecting good blocks in the reserved space will also cause the "pieces" of good storage blocks in the reserved space to be easily broken up. As the service life of the SSD continues to increase, the above phenomenon becomes more and more serious, resulting in the reserved space not always having multiple continuous good storage blocks for batch replacement. When batch replacement is not possible, the replacement efficiency of bad storage blocks will be significantly reduced, further affecting the performance of the SSD; when the replacement efficiency of bad storage blocks is reduced, it will also lead to untimely replacement of bad storage blocks, which may further cause data corruption, further affecting the performance of the SSD.

[0050] In order to solve the above problems, the embodiment of the present application proposes a bad block management scheme; in this scheme, if a bad storage block that needs to be replaced in batches is encountered in the prior art, the embodiment of the present application replaces each bad storage block in the multiple bad storage blocks that need to be replaced in batches in the mth Die area individually, and if the partial area in the reserved space in the mth Die area is insufficient for the single replacement of the above-mentioned bad storage block, the multiple bad storage blocks are replaced in batches by using the partial area in the reserved space in the remaining Die; it can be seen from the above that replacing bad storage blocks in units of Die areas can ensure that SS D can perform Multi-Plane operations on multiple good storage blocks that are replaced in batches to the same Die area in the user space, further ensuring the performance of the SSD; in addition, it can also ensure that the "pieces" of good storage blocks in the reserved space will not be randomly scattered, so that the SSD can quickly determine the good storage blocks that can be replaced in batches in the reserved space and use the above-mentioned good storage blocks to replace multiple bad storage blocks in batches. Therefore, the replacement efficiency of bad storage blocks can be significantly improved, which is used to effectively ensure the performance of the SSD. It can also maximize the replaceable rate of bad storage blocks, which can effectively ensure the performance of the SSD.

[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0052] First, this application proposes a bad block management method, such as Figure 1 As shown, Figure 1A flowchart of a bad block management method provided in an embodiment of the present application is provided. The method includes: S110 to S120, and the details are as follows:

[0053] S110: for N horizontally arranged ones in the mth Die area in the user space m consecutive bad storage blocks, determining whether there are good storage blocks in a portion of the reserved space in the Plane area where each bad storage block is located;

[0054] Where, M≥m≥1, M represents the number of Die areas in the solid state drive; N m ≥2, N m Indicates the number of Plane areas in the mth Die area.

[0055] Specifically, in the embodiment of the present application, when encountering a situation in the prior art where a plurality of bad storage blocks need to be replaced in batches, a single replacement is performed for each bad storage block.

[0056] For example, as shown in Table 2, Table 2 is the first distribution example table of bad blocks stored in the memory space provided in an embodiment of the present application. The storage blocks numbered 39, 40 and 41 in the user space are bad blocks, and the storage blocks numbered 3, 4, 15 and 27 in the reserved space are bad blocks. Combined with Table 1, it can be seen that the bad blocks in the reserved space are replaced by the bad blocks numbered 123, 124 and 135 in the user space.

[0057] Table 2: The first distribution example of bad blocks stored in memory space

[0058]

[0059] It should also be emphasized that the “continuous” emphasized in S110 in the embodiment of the present application indicates the close proximity of two storage blocks. If there is no other storage block between the two storage blocks, the two storage blocks are “continuous”.

[0060] In Table 2, there are three consecutive bad storage blocks arranged in the horizontal direction in the second Die area (i.e., Die1 area) in the user space, which are numbered 39, 40, and 41 respectively; according to the prior art, the three bad storage blocks can be replaced with any three consecutive good storage blocks in the reserved space, but in the embodiment of the present application, for the above situation, the embodiment of the present application performs individual replacements for the three bad storage blocks respectively.

[0061] In the process of performing a single replacement for three bad storage blocks, it is necessary to determine whether there are good storage blocks in the partial area located in the reserved space of the Plane area where each bad storage block is located; for example, in the process of performing a single replacement for the bad storage block numbered 41, it is necessary to confirm whether there are good storage blocks in the three storage blocks numbered 125, 137 and 149 located in the reserved space in the Pl2 area where the bad storage block numbered 41 is located.

[0062] According to Table 2, in the Die1 area, there are no good storage blocks in some areas of the reserved space in the Pl0 area for replacing the bad storage block numbered 39, the good storage blocks numbered 136 and 148 in the reserved space in the Pl1 area can be used to replace the bad storage block numbered 40, and the good storage blocks numbered 125, 137 and 149 in the reserved space in the Pl2 area can be used to replace the bad storage block numbered 41.

[0063] In one implementation, Figure 2 As shown, Figure 2 Another flowchart of the bad block management method provided in the embodiment of the present application, S110 includes: S1110 to S1130, the details of which are as follows:

[0064] S1110: for the N horizontally arranged ones in the mth Die area in the user space m consecutive bad blocks, determine whether there are N bad blocks arranged horizontally in the reserved space of the mth Die area. m A continuous storage block.

[0065] S1120: If there is a corresponding N m N consecutive storage blocks m N consecutive storage blocks for the corresponding m Batch replace bad storage blocks.

[0066] S1130: If there is no corresponding N m Continuous good storage blocks are determined to determine whether there is a good storage block in a partial area in the reserved space in the Plans area where each bad storage block is located.

[0067] Specifically, in order to improve the replacement efficiency, the N horizontally arranged ones in the mth Die area in the user space may be determined first. m Can the consecutive bad storage blocks be directly replaced in batches in the mth Die area? If so, directly replace them in batches. If not, determine N m Whether all storage bad blocks can be replaced individually in the mth Die area.

[0068] S120: If there is no corresponding N m The N stored blocks arranged horizontally in the reserved space of each of the (M-1) Die areas remaining after the mth Die area in the solid state drive are stored. m consecutive storage blocks, for N m Batch replace bad storage blocks.

[0069] Specifically, according to common sense logic, if there is no corresponding N in the reserved space m N stored blocks for user space m If each bad storage block is replaced individually, there will definitely be no N bad storage blocks in the reserved space for the user space. m The bad storage blocks are replaced in batches with good storage blocks.

[0070] Therefore, in the embodiment of the present application, the N horizontally arranged ones existing in the part of the reserved space in the remaining (M-1) Die areas are m consecutive storage blocks, for N m Batch replace bad storage blocks.

[0071] For example, according to Table 2, good storage blocks numbered 120, 121 and 122 in the Die0 area in the reserved space can be used to batch replace bad storage blocks numbered 39, 40 and 41 in the Die1 area in the user space.

[0072] In one implementation, Figure 2 As shown, S120 includes: S1210 to S1220, the details of which are as follows:

[0073] S1210: If there is no corresponding N m storage blocks, determine whether there are N horizontally arranged blocks in the partial area of ​​each Die area located in the reserved space of the (M-1) Die areas remaining in the solid state drive except the mth Die area m A continuous storage block.

[0074] Specifically, in actual applications, the part of the reserved space in each of the (M-1) Die areas remaining after the mth Die area in the solid state drive may not necessarily have N horizontally arranged areas. m A continuous storage block, so a judgment process is required.

[0075] Taking Table 2 as an example, good storage blocks available for batch replacement can be searched in the remaining (M-1) Die areas, that is, good storage blocks available for batch replacement need to be searched in the remaining Die areas such as Die0 area or Die (M-1) area; after searching, it is found that there are 3 consecutive good storage blocks arranged in the horizontal direction in the Die0 area, such as good storage blocks numbered 120, 121 and 122, and then, according to the search results, the good storage blocks numbered 120, 121 and 122 in the reserved space can be replaced in batches with the bad storage blocks numbered 39, 40 and 41 in the user space.

[0076] S1220: If there is a corresponding N m N consecutive storage blocks m The continuous good storage blocks are batch replaced for the corresponding bad storage blocks.

[0077] Specifically, when it is determined that there is a corresponding N m After a continuous block is stored, the corresponding batch replacement can be performed.

[0078] In one implementation, after S110, the method further includes: S130, the details of which are as follows:

[0079] S130: If there is a corresponding N m The N stored blocks m Each good storage block is replaced with the corresponding bad storage block.

[0080] Specifically, if N m In the Die0 area where the consecutive bad storage blocks are located, there are corresponding N m N stored blocks can be realized m A single replacement of a storage bad block, as shown in Table 3, Table 3 is the second distribution example table of storage bad blocks in the memory space provided in an embodiment of the present application. In the Die1 area, the storage good block numbered 147 in the reserved space in the Pl0 area can be used to replace the storage bad block numbered 39, the storage good blocks numbered 136 and 148 in the reserved space in the Pl1 area can be used to replace the storage bad block numbered 40, and the storage good blocks numbered 125, 137 and 149 in the reserved space in the Pl2 area can be used to replace the storage bad block numbered 41.

[0081] Table 3 The second distribution example of bad blocks stored in memory space

[0082]

[0083]

[0084] In one implementation, the method further includes: step (1), the details of which are as follows:

[0085] Step (1): During the process of writing data to the user space, if it is detected that there are N horizontally arranged data in the mth Die area in the user space, m consecutive bad storage blocks, and determining whether there is a good storage block in a partial area in the reserved space in the Plane area where each bad storage block is located.

[0086] Specifically, in the prior art, the types of bad blocks stored in an SSD include: factory bad blocks and growth bad blocks. Factory bad blocks are generated during the production process of the SSD, and growth bad blocks are generated during the use of the SSD.

[0087] In actual implementation, S110 to S130 can be used for N horizontally arranged digits in the mth Die area in the user space generated during the production process of the SSD. m The process of replacing consecutive bad storage blocks can also be used for the N horizontally arranged bad blocks in the mth Die area in the user space generated during the use of the SSD as described in step (1). m A continuous process of replacing bad storage blocks.

[0088] In one implementation, the method further includes: Step (2) to Step (3), the details of which are as follows:

[0089] Step (2): During the process of writing data to the user space, if the n′th m The storage block is a bad block, determine the n′ m Whether there is a good storage block in the partial area of ​​the reserved space in the Plane area where the bad storage block is located.

[0090] Specifically, "n'th m "N storage blocks" means that the storage blocks are arranged in the horizontal direction. m The sequence number in a storage block.

[0091] Step (3): If there is no corresponding storage block, the N horizontally arranged blocks in the reserved space of each of the remaining (M-1) Die areas are m Continuous storage blocks, for the mth Die area including the n'th m N storage bad blocks m storage blocks are replaced in batches; where n′ m ≥1.

[0092] Specifically, according to the prior art, for the n′th Die area in the mth Die area in the user space generated during the production process of the SSD, m If there are bad blocks in the m-th Die area, they can be replaced individually. However, in actual execution, the replacement may fail due to insufficient good blocks in the pre-stored space. When a single replacement fails in the m-th Die area, the remaining (M-1) Die areas can be used to find N blocks that can be replaced in batches. m contiguous storage blocks, if any, can be included in the n'th m N storage bad blocks m The storage blocks are replaced in batches to ensure that the storage blocks in the user space are all good blocks.

[0093] Second, the present application provides a bad block management device, which is applied to a solid state drive, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of a bad block management device provided in an embodiment of the present application, the device includes: a storage block confirmation module 310 and a replacement module 320;

[0094] The storage block confirmation module 310 is used to determine the N horizontally arranged storage blocks in the mth Die area in the user space. m consecutive bad storage blocks, determining whether there are good storage blocks in a portion of the reserved space in the Plane area where each bad storage block is located;

[0095] Where, M≥m≥1, M represents the number of Die areas in the solid state drive; N m ≥2, N m Indicates the number of Plane areas in the mth Die area;

[0096] Replacement module 320, for if there is no corresponding N m The N stored blocks arranged horizontally in the reserved space of each of the (M-1) Die areas remaining after the mth Die area in the solid state drive are stored. m consecutive storage blocks, for N m Batch replace bad storage blocks.

[0097] In one implementation, the replacement module 320 is further configured to: m The N stored blocks m Each good storage block is replaced with the corresponding bad storage block.

[0098] In one implementation, the storage block confirmation module 310 is further configured to determine the N horizontally arranged storage blocks in the mth Die area in the user space. mconsecutive bad blocks, determine whether there are N bad blocks arranged horizontally in the reserved space of the mth Die area. m A continuous storage block;

[0099] The storage block confirmation module 310 is also used to check if there is a corresponding N m N consecutive storage blocks m N consecutive storage blocks for the corresponding m Batch replacement of bad storage blocks;

[0100] The storage block confirmation module 310 is also used to m Continuous good storage blocks are determined to determine whether there is a good storage block in a partial area located in the reserved space in the Plane area where each bad storage block is located.

[0101] In one implementation, the replacement module 320 is further configured to determine whether there are N horizontally arranged parts in a partial area in the reserved space of each of the (M-1) Die areas remaining after the mth Die area in the solid state drive. m A continuous storage block;

[0102] The replacement module 320 is also used to replace the corresponding N m N consecutive storage blocks m The continuous good storage blocks are batch-replaced for the corresponding bad storage blocks.

[0103] In one implementation, the replacement module 320 is further configured to, during the process of writing data into the user space, detect that there are N horizontally arranged data in the mth Die area in the user space. m A step of determining whether there is a good storage block in a partial area in the reserved space in the Plane area where each bad storage block is located is performed.

[0104] In one implementation, the storage block confirmation module 310 is further configured to detect, during the process of writing data to the user space, the n′th m The storage block is a bad block, determine the n′ m Whether there are good storage blocks in the reserved space of the Plane area where the bad storage block is located;

[0105] The replacement module 320 is further configured to replace the N horizontally arranged blocks in the partial area of ​​each Die area in the reserved space of the remaining (M-1) Die areas if there is no corresponding stored block. mContinuous storage blocks, for the mth Die area including the n'th m N storage bad blocks m storage blocks are replaced in batches; where n′ m ≥1.

[0106] Third, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, steps S110 to S130 provided in the above embodiment are implemented.

[0107] Fourthly, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, steps S110 to S130 of the above embodiment are executed.

[0108] Fifth, the computer program product provided in the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. The specific implementation can refer to steps S110 to S130 of the method embodiment, which will not be repeated here.

[0109] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0110] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0111] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0112] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM) random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0113] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0114] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A bad block management method, characterized in that: Applied to a solid state drive, the method comprises: For the N horizontally arranged in the mth Die area in the user space m consecutive bad storage blocks, determining whether there is a good storage block in a partial area located in the reserved space in the Plane area where each bad storage block is located; Wherein, M≥m≥1, M represents the number of Die areas in the solid state drive; N m ≥2, the N m Represents the number of Plane areas in the mth Die area; If there is no corresponding N m The stored blocks are N arranged in the horizontal direction in a partial area in each of the (M-1) Die areas remaining in the solid state drive after excluding the mth Die area and located in the reserved space. m The storage blocks are continuous, for N m The bad storage blocks are replaced in batches.

2. The method according to claim 1, characterized in that After determining whether there is a good storage block in a partial area located in the reserved space in the Plane area where each bad storage block is located, the method further includes: If there is a corresponding N m The stored blocks are N m The good storage blocks are respectively replaced with the corresponding bad storage blocks.

3. The method according to claim 1, characterized in that The determining whether there is a good storage block in a partial area located in the reserved space in the Plane area where each bad storage block is located comprises: For the N horizontally arranged in the mth Die area in the user space m continuous bad blocks, determining whether there are N bad blocks arranged in a horizontal direction in a partial area of ​​the m-th Die area located in the reserved space m A continuous storage block; If there is a corresponding N m N consecutive storage blocks m The continuous storage blocks correspond to N m The bad storage blocks are replaced in batches; If there is no corresponding N m The continuous good storage blocks are determined to determine whether there is a good storage block in a partial area located in the reserved space in the Plane area where each bad storage block is located.

4. The method according to claim 1, characterized in that: The N horizontally arranged areas in each of the (M-1) Die areas remaining in the solid state drive after excluding the mth Die area are located in the reserved space. m The continuous storage blocks, for the corresponding N m The bad storage blocks are replaced in batches, including: Determine whether there are N horizontally arranged areas in a partial area of ​​each Die area located in the reserved space in the (M-1) Die areas remaining in the solid state drive except the mth Die area m A continuous storage block; If there is a corresponding N m N consecutive storage blocks m The continuous good storage blocks are batch-replaced for the corresponding bad storage blocks.

5. The method according to claim 1, characterized in that The method further comprises: In the process of writing data into the user space, if it is detected that there are N horizontally arranged data in the mth Die area in the user space, m continuous bad storage blocks, and performing the step of determining whether there is a good storage block in a partial area located in the reserved space in the Plane area where each bad storage block is located.

6. The method according to claim 1, characterized in that The method further comprises: In the process of writing data to the user space, if it is detected that the nth ′ m The nth storage block is the bad storage block, and the ′ m whether there is a good storage block in a partial area located in the reserved space in the Plane area where the bad storage block is located; If there is no corresponding good storage block, the N existing horizontally arranged blocks in the partial area of ​​each Die area in the remaining (M-1) Die areas located in the reserved space are m The continuous storage blocks, for the mth Die area including the n'th m N of the bad storage blocks m The storage blocks are replaced in batches; wherein n′ m ≥1.

7. A bad block management device, characterized in that: Applied to a solid state hard disk, the device comprises: a storage block confirmation module and a replacement module; The storage block confirmation module is used to identify N horizontally arranged storage blocks in the mth Die area in the user space. m consecutive bad storage blocks, determining whether there is a good storage block in a partial area located in the reserved space in the Plane area where each bad storage block is located; Wherein, M≥m≥1, M represents the number of Die areas in the solid state drive; N m ≥2, the N m Represents the number of Plane areas in the mth Die area; The replacement module is used to replace the corresponding N m The stored blocks are N arranged in the horizontal direction in a partial area in each of the (M-1) Die areas remaining in the solid state drive after excluding the mth Die area and located in the reserved space. m The storage blocks are continuous, for N m The bad storage blocks are replaced in batches.

8. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory is used to store a software program, and the processor runs or executes the software program stored in the memory so that the electronic device implements the bad block management method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes executed by a processor, wherein the program codes include code for implementing the bad block management method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product comprises program codes, and when a computer runs the computer program product, the computer executes the bad block management method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Nand bad block management method and equipment for SSD (Solid State Disk) and medium

    CN122284932A

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

    CN122284932B