A control method and device of a solid state disk

By building superblocks in the solid-state drive (SSD) and marking faulty storage blocks, the problem of bad block management in NAND flash memory cells is solved, enabling optimized management of the SSD and improving performance and capacity utilization.

CN114691433BActive Publication Date: 2026-02-27ALIBABA (CHINA) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210302374.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2026-02-27
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

Managing bad blocks in NAND flash memory cells in existing solid-state drives presents challenges, affecting key indicators such as cost, performance, and lifespan. Furthermore, the use of spare blocks leads to capacity occupancy and performance degradation.

Method used

A superblock is constructed and faulty storage blocks are marked to avoid direct replacement. Data recovery is performed using reserved space and check blocks, reducing the impact on performance.

Benefits of technology

Bad block management has been optimized, reducing the impact on SSD performance and capacity, and improving the overall performance and efficiency of the hard drive.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114691433B_ABST
    Figure CN114691433B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a kind of control method and device of solid state disk, the solid state disk has multiple storage units, each storage unit has multiple storage blocks, the method comprises: constructing one or more superblocks, each superblock is composed of multiple storage blocks, the multiple storage blocks of the superblock are part of the storage blocks included in the multiple storage units;The storage block that appears in the multiple storage blocks of the composition fails is marked, so that the superblock uses the storage block except the storage block that appears in the multiple storage blocks of the composition fails.The embodiment of the present application realizes the optimization of bad block management in solid state disk, reduces the influence on solid state disk when carrying out bad block management.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of storage, in particular to a control method and device of a solid state disk. BACKGROUND

[0002] At present, a solid state disk (SSD) is usually composed of a plurality of storage units, such as a NAND flash memory. The storage unit of the NAND flash memory is developing towards higher density and larger capacity in order to reduce cost and improve storage efficiency.

[0003] However, with the increasing complexity of manufacturing technology, quality assurance is also increasingly challenging. In order to balance production and technical strength, the production and shipment requirements of the storage unit of the NAND flash memory itself are relatively loose, which is actually higher than the defect rate of the previous generation product.

[0004] Therefore, the possibility of failure of the storage unit of the NAND flash memory in the solid state disk is increasing, especially the occurrence of bad blocks. Bad block management is a core factor that determines key indicators such as cost, performance, capacity, and life of the solid state disk. How to manage the bad blocks of the storage unit of the NAND flash memory while reducing the impact on the solid state disk becomes a particularly important problem in the solid state disk. SUMMARY

[0005] In view of the above problems, a control method and device of a solid state disk are provided to overcome the above problems or at least partially solve the above problems, comprising:

[0006] A control method of a solid state disk, the solid state disk having a plurality of storage units, each storage unit having a plurality of storage blocks, the method comprising:

[0007] constructing one or more super blocks, each super block being composed of a plurality of storage blocks, the plurality of storage blocks constituting the super block being part of the storage blocks contained in the plurality of storage units;

[0008] marking the storage blocks in the plurality of storage blocks that have failed, so that the super block uses the storage blocks in the plurality of storage blocks except the storage blocks that have failed.

[0009] Optionally, the plurality of storage units have storage blocks for use as backup storage blocks for the storage blocks that have failed, further comprising:

[0010] For the storage blocks used as backup storage blocks, set them as reserved space of the solid state disk.

[0011] Optionally, before marking the storage blocks in the plurality of storage blocks that have failed, further comprising:

[0012] In the use of the super block, when a failure occurs in the multiple storage blocks, a target page with data written in the failed storage block is determined and recycled;

[0013] Data in the target page is written to a storage block other than the failed storage block.

[0014] Optionally, before the target page with data written in the failed storage block is determined and recycled, the method further comprises:

[0015] If the failure occurring in the multiple storage blocks is a read failure, the target page with data written in the failed storage block is determined and recycled;

[0016] If a write failure occurs in the storage blocks, the failed storage block is set to a read-only state until a read failure occurs or garbage collection is performed on the super block, and the target page with data written in the failed storage block is determined and recycled.

[0017] Optionally, each super block has a storage block for checking other storage blocks in the super block, and the target page with data written in the failed storage block is determined by:

[0018] The target page with data written in the failed storage block is read;

[0019] In the case where the target page with data written in the failed storage block cannot be read, the target page with data written in the failed storage block is recovered using the check information in the check storage block.

[0020] Optionally, after the data in the target page is written to a storage block other than the failed storage block, the method further comprises:

[0021] New check information is generated for data in the super block other than the target page;

[0022] The check storage block is updated using the new check information.

[0023] Optionally, writing the data in the target page to a storage block other than the failed storage block comprises:

[0024] The data in the target page is written to a storage block other than the failed storage block in the super block, or the data in the target page is written to a storage block in another super block.

[0025] A control device of a solid state disk, the solid state disk having a plurality of storage units, each storage unit having a plurality of storage blocks, the device comprising:

[0026] a super block construction module, configured to construct one or more super blocks, each super block being composed of a plurality of storage blocks, the plurality of storage blocks composing the super block being part of the storage blocks contained in the plurality of storage units;

[0027] a failed block marking module, configured to mark the storage block that fails in the composed plurality of storage blocks, so that the super block uses the storage blocks other than the failed storage block in the composed plurality of storage blocks.

[0028] An electronic device includes a processor, a memory, and a computer program stored on the memory and capable of running on the processor, the computer program being executed by the processor to implement the control method of the solid state disk as described above.

[0029] A computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed by the processor to implement the control method of the solid state disk as described above.

[0030] The embodiments of the present application have the following advantages:

[0031] In the embodiments of the present application, by constructing one or more super blocks in the solid state disk, each super block being composed of a plurality of storage blocks, the plurality of storage blocks composing the super block being part of the storage blocks contained in the plurality of storage units, and then marking the storage block that fails in the composed plurality of storage blocks, so that the super block uses the storage blocks other than the failed storage block in the composed plurality of storage blocks, the optimization of the bad block management in the solid state disk is realized, and the impact on the solid state disk when performing the bad block management is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0032] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the description of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0033] Figure 1 is a schematic diagram of the architecture of a solid state disk provided by an embodiment of the present application;

[0034] Figure 2 is a step flowchart of the control method of a solid state disk provided by an embodiment of the present application;

[0035] Figure 3 is a schematic diagram of another architecture of a solid state disk provided by an embodiment of the present application;

[0036] Figure 4 is a schematic diagram of the architecture of a super block provided by an embodiment of the present application;

[0037] Figure 5 is a step flow chart of another control method of a solid state disk provided by an embodiment of the present application;

[0038] Figure 6 is a step flow chart of another control method of a solid state disk provided by an embodiment of the present application;

[0039] Figure 7 is a step flow chart of another control method of a solid state disk provided by an embodiment of the present application;

[0040] Figure 8 is a structure block diagram of a control device of a solid state disk provided by an embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to make the above objectives, characteristics and advantages of the present application more apparent, comprehensible and easier to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without any creative work, shall fall within the protection scope of the present application.

[0042] In a solid state disk, a controller and a plurality of storage units controlled thereby can be included, the storage units can be NAND flash units, such as Figure 1 The NAND flash units can be NAND dies controlled by the SSD controller.

[0043] It should be noted that the NAND flash units are processed from original silicon material, the silicon material is processed into a wafer, several hundred NAND flash chips can be made on a wafer, the die before packaging of the chip is a NAND die, which is a small piece cut from the wafer by laser, each NAND die is an independent functional chip, which is composed of countless transistor circuits, but can be finally packaged as a NAND flash grain chip as a unit.

[0044] For each storage unit, a plurality of storage blocks, such as storage blocks in the NAND flash unit, can be included, the block is the smallest erase unit in the storage unit such as the NAND flash unit, a storage block contains a plurality of pages, the page is the smallest read / write unit in the storage unit such as the NAND flash unit, a page contains a plurality of bytes.

[0045] In order to perform bad block management, a certain number of storage blocks are set as spares, i.e., spare blocks, in each storage unit, and in the case of a bad block, i.e., a storage block failure, a storage block as a spare can be used to replace the failed storage block, such as Figure 1 In the case of a NAND block (a storage block in a NAND flash memory unit) failure in a NAND die (NAND flash memory unit), a spare NAND block can be used for replacement.

[0046] Since the blocks used as spares are only used to replace failed storage blocks and are not used for other purposes, the capacity is occupied, which affects the performance of the solid state disk.

[0047] Moreover, in order to implement error checking and correction (ECC) and data recovery protection, one or more superblocks can be constructed, which can be composed of storage blocks selected from the storage unit, and similarly, when a storage block constituting a superblock fails, it can be used as a spare block for replacement, such as Figure 1 In the case of a blk (Block) failure in a Superblock, a spare blk can be used for replacement.

[0048] However, when a spare block is used to replace a failed storage block in a superblock, in order to avoid invalidating data recovery protection, the entire superblock in which the failed storage block is located will be immediately recycled, which will affect the performance.

[0049] Moreover, as the density of storage units such as NAND flash memory units continues to grow, each superblock can contain hundreds of storage blocks, and recycling the entire superblock in order to replace a failed storage block will result in the consumption of system resources, including bandwidth, power, buffer capacity, etc., which is costly.

[0050] Based on this, in embodiments of the present application:

[0051] On the one hand, by setting the storage blocks used as spares as over-provisioning (OP), which refers to the capacity that cannot be operated by the user, the storage blocks used as spares are not always unused, which avoids the occupation of capacity and improves the performance of the solid state disk.

[0052] On the other hand, when a certain storage block constituting a super block fails, the failed storage block is no longer directly replaced by a storage block as a backup, but is marked and then deleted from the super block, so that the super block only contains other storage blocks except the failed storage block, to avoid using the failed storage block.

[0053] The following will be described in detail:

[0054] Referring to Figure 2 , a step flow chart of a control method of a solid state disk is shown, the solid state disk can have a controller and a plurality of storage units controlled thereby, each storage unit has a plurality of storage blocks, the storage unit can be a NAND flash unit, such as Figure 3 , the NAND flash unit can be a NAND die controlled by the SSD Controller, each NAND die can include a plurality of NAND blocks.

[0055] Specifically, it can include the following steps:

[0056] Step 201, constructing one or more super blocks, each super block being composed of a plurality of storage blocks, the plurality of storage blocks constituting the super block being part of the storage blocks contained in the plurality of storage units.

[0057] In order to realize error correction coding and data recovery protection, one or more super blocks can be constructed, a certain number of storage blocks can be selected from the storage blocks contained in the plurality of storage units, and then the selected storage blocks are composed into a super block, such as selecting one storage block from each storage unit contained in the solid state disk to form a super block.

[0058] Specifically, geometry data (Geometry) can be obtained, and then the storage blocks are selected according to the geometry data, and then the selected storage blocks are composed into a super block, for example, the i-th storage block in each storage unit can be composed into the i-th super block.

[0059] Among them, the geometry data can include cylinder number (Cylinder), head number (Head), sector number (Sector / Track), the cylinder number represents the number of tracks on each face of the hard disk, numbered from 0, the maximum is 1023, indicating 1024 tracks (stored with 10 binary bits), the head number represents the total number of heads of the hard disk, that is, the number of faces of the disk, numbered from 0, the maximum is 255, indicating 256 heads (stored with 8 binary bits), the sector number represents the number of sectors on each track, numbered from 1, the maximum is 63, indicating 63 sectors (stored with 6 binary bits), each sector is 512 bytes, which is the smallest storage unit of the hard disk.

[0060] In an embodiment of the present application, the plurality of storage units can have a storage unit for a failed storage block as a spare storage block, i.e., a spare block, and can further include:

[0061] For the storage unit as a spare storage block, it is set as a reserved space of the solid state drive.

[0062] Since the storage unit as a spare storage block is only used to replace the failed storage block and is not used for other purposes, it results in the occupation of capacity, which in turn affects the performance of the solid state drive.

[0063] In order to avoid the occupation of capacity, the storage unit as a spare storage block can be set as a reserved space, which refers to the capacity that cannot be operated by the user, and the storage unit as a spare storage block is not always unused, which avoids the occupation of capacity and in turn improves the performance of the solid state drive.

[0064] In step 202, the failed storage block among the plurality of storage blocks is marked, so that the super block uses the storage blocks other than the failed storage block among the plurality of storage blocks.

[0065] Since the entire super block in which the failed storage block is located is immediately recycled when the spare block is used to replace the failed storage block in the super block, the performance is affected.

[0066] In order to avoid the recycling of the super block, the storage unit as a spare storage block is no longer directly used for replacement, and by marking the failed storage block, the failed storage block can be deleted in the super block, such as Figure 3 When the blk (Block) in the Superblock fails, the spare blk is no longer used for replacement (No replacement), and the replacement record is no longer retained.

[0067] By allowing the super block to have different numbers of storage blocks, after the failed storage block is deleted in the super block, the super block no longer needs to use the storage unit as a spare storage block for replacement, and can only include other storage blocks except the failed storage block.

[0068] As Figure 4 Superblock1 and Superblock2 originally contain M User blocks (i.e., storage blocks), and N failed User blocks occur in Superblock2, then after deleting the N User blocks, Superblock1 can include M User blocks, and Superblock2 can include M-N User blocks, M and N are positive integers greater than 1 and M is greater than N.

[0069] For the storage block marked as failed, a record table can be generated and persisted at the end of a session, which can record the relevant information of the storage block marked as failed, i.e., which storage block is the failed storage block.

[0070] At the beginning of a new session, the super block can delete the failed storage block according to the latest record table, thereby avoiding the use of the failed storage block by the super block.

[0071] In an embodiment of the present application, before step 202, the following can also be included:

[0072] In the use process of the super block, when a failure occurs in the plurality of storage blocks, the target page in which data is written in the failed storage block is determined, and the target page is recycled; the data in the target page is written to the storage block other than the failed storage block.

[0073] In the use process of the super block, when a failure occurs in the plurality of storage blocks, the failed storage block can contain valid data, and the target page in which data is written in the failed storage block can be further determined, including valid pages and invalid pages.

[0074] After the target page is determined, the target page can be recycled, and the data in the target page is written to the storage block other than the failed storage block, thereby ensuring the processing of the valid data in the failed storage block and avoiding data loss.

[0075] In an embodiment of the present application, before the target page in which data is written in the failed storage block is determined and recycled, the following can also be included:

[0076] If the failure occurring in the plurality of storage blocks is a read failure, the target page in which data is written in the failed storage block is determined and recycled; if a write failure occurs in the storage block, the failed storage block is set to a read-only state, and until a read failure occurs or garbage collection is performed on the super block, the target page in which data is written in the failed storage block is determined and recycled.

[0077] In order to avoid the impact of recycling on performance, the failure type of the failed storage block can be processed differently, i.e., when a failure is detected, it can be determined whether it is a read failure or a write failure.

[0078] If the failure is a read failure, the storage block in which the read failure occurs cannot be used for subsequent read and write, and the valid data contained therein must be recycled immediately and written to other storage blocks.

[0079] If a fault occurs, the faulty storage block can be set to a read-only state to prevent subsequent writing, and to avoid traffic congestion and resource occupation caused by recycling valid data contained in the faulty storage block, the valid data is not immediately recycled until the faulty storage block occurs a read fault again or the entire super block is subjected to garbage collection.

[0080] As Figure 4 When a certain User block occurs a fault, for the Programmed pages (target pages) that have existed data writing, if the fault is a read error, the Programmed pages are directly recycled, and if the fault is a write error, the Programmed pages need to wait for the next GC (Garbage Collection).

[0081] Further, as Figure 4 The Superblock can include M User blocks, and correspondingly, has M Superpages (pages in the Superblock). When a certain User block occurs a write error, since the User block needs to be recycled from the Superblock at the next GC, the Superpages in the Superblock are reduced from M pages to M-1 pages.

[0082] In an embodiment of the present application, each super block can have a storage block for checking other storage blocks in the super block, i.e., a check block. As Figure 4 The Parity block in the above embodiment is a check block, which can contain check information of all storage blocks constituting the super block. The target pages in the faulty storage block that have existed data writing can include:

[0083] The target pages in the faulty storage block that have existed data writing are read. If the target pages in the faulty storage block that have existed data writing cannot be read, the check information in the check block is used to recover the target pages in the faulty storage block that have existed data writing.

[0084] When the faulty storage block occurs a fault and needs to be recycled, the target pages in the faulty storage block that have existed data writing can be read. If the reading is successful, the target pages are directly recycled.

[0085] If the reading is unsuccessful, and the disk is protected by a RAID (Redundant Arrays of Independent Disks) in advance, a RAID recovery can be initiated, and the target page in the failed storage block can be recovered by using the check information in the storage block serving as a check and combining data in other storage blocks.

[0086] In an embodiment of the present application, after the data in the target page is written into the storage blocks other than the failed storage block, the following steps can be further included:

[0087] New check information is generated for the data in the super block other than the target page, and the storage block serving as a check is updated by using the new check information.

[0088] After the valid data in the target page of the failed storage block is written into other storage blocks, the failed storage block can be deleted from the super block, and the check information in the storage block serving as a check in the super block needs to remove the influence of the valid data in the failed storage block. Then, new check information can be generated according to the data in the super block other than the target page, such as by using a bitwise XOR operation on the check information and the data in the failed storage block.

[0089] After the new check information is obtained, the storage block serving as a check can be updated by using the new check information, i.e., the original check information is erased and the new check information is written.

[0090] As shown in Figure 4 , the parity page in the parity block can store check information, and the user page (i.e., the target page) is extracted from the failed user block. Then, the user page and the parity page can be combined to obtain an updated parity page (i.e., containing new check information), and the updated parity page is written into the parity block by erasing the original parity page in the parity block.

[0091] In an embodiment of the present application, writing the data in the target page into the storage blocks other than the failed storage block can include:

[0092] The data in the target page is written into the storage blocks other than the failed storage block in the super block, or the data in the target page is written into the storage blocks in other super blocks.

[0093] In a specific implementation, the data in the target page can be written into other storage blocks in the super block, or the data in the target page can be written into storage blocks in other super blocks.

[0094] In the embodiment of the application, by constructing one or more super blocks in the solid state disk, each super block is composed of a plurality of storage blocks, the plurality of storage blocks composing the super block are storage blocks contained in a plurality of storage units, and the failed storage block in the composed plurality of storage blocks is marked, so that the super block uses the storage blocks in the composed plurality of storage blocks except the failed storage block, the optimization of the bad block management in the solid state disk is realized, and the influence on the solid state disk during the bad block management is reduced.

[0095] Referring to Figure 5 , a step flow chart of another control method of a solid state disk is shown, the solid state disk can have a plurality of storage units, each storage unit has a plurality of storage blocks, and the method can specifically include the following steps:

[0096] Step 501, one or more super blocks are constructed, each super block is composed of a plurality of storage blocks, and the plurality of storage blocks composing the super block are part of the storage blocks contained in a plurality of storage units.

[0097] Step 502, during the use of the super block, when a failure occurs in the composed plurality of storage blocks, a target page with data written in the failed storage block is read, and in the case that the target page with data written in the failed storage block cannot be read, the target page with data written in the failed storage block is recovered by using the check information in the storage block as a check, each super block has a storage block as a check for other storage blocks in the super block.

[0098] Step 503, the target page is recycled, and the data in the target page is written into the storage blocks except the failed storage block.

[0099] Step 504, new check information is generated for the data in the super block other than the target page, and the storage block as a check is updated by using the new check information.

[0100] Step 505, the failed storage block in the composed plurality of storage blocks is marked, so that the super block uses the storage blocks in the composed plurality of storage blocks except the failed storage block.

[0101] Referring to Figure 6 , a step flow chart of another control method of a solid state disk is shown, the solid state disk can have a plurality of storage units, each storage unit can have a plurality of storage blocks, and the method can specifically include the following steps:

[0102] Step 601, one or more super blocks are constructed, each super block is composed of a plurality of storage blocks, and the plurality of storage blocks composed of the super block are part of the storage blocks contained in the plurality of storage units.

[0103] Step 602, in the use process of the super block, when a fault occurs in the composed plurality of storage blocks, if the fault occurring in the composed plurality of storage blocks is a read fault, it is determined that there is a target page of data writing in the storage block where the fault occurs, and it is recycled.

[0104] Step 603, write the data in the target page to the storage blocks other than the storage block where the fault occurs.

[0105] Step 604, mark the storage block where the fault occurs in the composed plurality of storage blocks, so that the super block uses the storage blocks other than the storage block where the fault occurs in the composed plurality of storage blocks.

[0106] Referring to Figure 7 , a step flow chart of another control method of a solid state disk is shown, the solid state disk can have a plurality of storage units, each storage unit can have a plurality of storage blocks, and can include the following steps:

[0107] Step 701, one or more super blocks are constructed, each super block is composed of a plurality of storage blocks, and the plurality of storage blocks composed of the super block are part of the storage blocks contained in the plurality of storage units.

[0108] Step 702, in the use process of the super block, when a fault occurs in the composed plurality of storage blocks, if the composed storage block has a write fault, the storage block where the fault occurs is set to a read-only state until a read fault occurs or the super block is garbage collected, it is determined that there is a target page of data writing in the storage block where the fault occurs, and it is recycled.

[0109] Step 703, write the data in the target page to the storage blocks other than the storage block where the fault occurs.

[0110] Step 704, mark the storage block where the fault occurs in the composed plurality of storage blocks, so that the super block uses the storage blocks other than the storage block where the fault occurs in the composed plurality of storage blocks.

[0111] It should be noted that for the method embodiments, the sequences of the actions described for implementing the methods are merely illustrative and do not limit the present application. In some embodiments, the sequences of the actions can be performed in other sequences or at the same time. In some embodiments, additional or even alternative actions can be performed.

[0112] Referring to Figure 8 , a structural schematic diagram of a control device of a solid state disk is shown, the solid state disk can have a plurality of storage units, each of the storage units can have a plurality of storage blocks, and the solid state disk can include the following modules:

[0113] A super block construction module 801 is configured to construct one or more super blocks, each of the super blocks is composed of a plurality of storage blocks, and the plurality of storage blocks composing the super block are part of the storage blocks included in the plurality of storage units.

[0114] A failed block marking module 802 is configured to mark the storage blocks that have failed in the composed plurality of storage blocks, so that the super block uses the storage blocks in the composed plurality of storage blocks except the storage blocks that have failed.

[0115] In an embodiment of the present application, the plurality of storage units can have storage blocks that have failed as spare storage blocks, and the solid state disk can further include:

[0116] A reserved space setting module is configured to set the storage blocks that have failed as spare storage blocks as reserved space of the solid state disk.

[0117] In an embodiment of the present application, the solid state disk can further include:

[0118] A target page recycling module is configured to determine the target page in which data is written in the storage block that has failed when the composed plurality of storage blocks have failed during use of the super block, and recycle the target page.

[0119] A page data writing module is configured to write the data in the target page into the storage blocks except the storage block that has failed.

[0120] In an embodiment of the present application, the solid state disk can further include:

[0121] A read failure processing module is configured to call the target page recycling module if the failure in the composed plurality of storage blocks is a read failure.

[0122] The write failure processing module is configured to set the failed storage block to a read-only state if a write failure occurs in the composed storage block, and to call the target page recovery module when a read failure occurs or garbage collection is performed on the super block.

[0123] In an embodiment of the present application, each super block has a storage block used as a check for other storage blocks in the super block, and the target page recovery module can include:

[0124] The target page reading submodule is configured to read the target page in which data is written in the failed storage block.

[0125] The target page recovery submodule is configured to recover the target page in which data is written in the failed storage block by using the check information in the storage block used as a check if the target page in which data is written in the failed storage block cannot be read.

[0126] In an embodiment of the present application, the method can further include:

[0127] The new check information generation module is configured to generate new check information for data in the super block other than the target page.

[0128] The check information updating module is configured to update the storage block used as a check by using the new check information.

[0129] In an embodiment of the present application, the page data writing module can include:

[0130] The writing submodule writes the data in the target page to a storage block other than the failed storage block in the super block, or writes the data in the target page to a storage block in another super block.

[0131] In an embodiment of the present application, one or more super blocks are constructed in the solid state disk, each super block is composed of a plurality of storage blocks, the plurality of storage blocks composing the super block are storage blocks contained in a plurality of storage units, and then a failed storage block in the composed plurality of storage blocks is marked, so that the super block uses a storage block other than the failed storage block in the composed plurality of storage blocks, thereby optimizing the management of bad blocks in the solid state disk and reducing the impact on the solid state disk when the bad block management is performed.

[0132] An embodiment of the present application further provides an electronic device, which can include a processor, a memory, and a computer program stored on the memory and capable of running on the processor, and the computer program is executed by the processor to implement the control method of the solid state disk.

[0133] An embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the control method of the solid state disk.

[0134] For apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and the relevant parts are referred to the part of the method embodiments.

[0135] Each of the embodiments in the specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other.

[0136] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application can be in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0137] The embodiments of the present application are described with reference to flowcharts and / or block diagrams of the method, terminal device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the computer or other programmable data processing terminal device produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that performs the functions specified in one or more blocks.

[0138] These computer program instructions can also be stored in a computer-readable memory that can guide the computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including instruction devices that implement the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that performs the functions specified in one or more blocks.

[0139] These computer program instructions can also be loaded into a computer or other programmable data processing terminal device, so that a series of operation steps are performed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide a process for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1the functions specified in the one or more blocks.

[0140] While the preferred embodiments of the application have been described, additional variations and modifications can be made to the embodiments by those skilled in the art once they have the benefit of the present disclosure. Therefore, it is intended that the appended claims shall cover all such changes and modifications which fall within the true spirit of the application. Accordingly, although the preferred embodiments of the application have been described, it is intended that the application be not limited to the embodiments described, but that it includes all modifications and alterations within the scope of the present application.

[0141] Finally, it should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. It is further noted that, as used herein, the singular forms "a", "an" and "the" include plural references unless the context clearly dictates otherwise. The terms "comprises", "comprising", "includes", "including" and "contains", "containing" as used herein, are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that comprises, includes, or contains one or more elements or steps does not include only those one or more elements or steps but can include other elements or steps not expressly listed or inherent to such process, method, article, or apparatus. The use of the terms "first", "second", and the like does not imply any physical or logical ordering of the modified elements such that one element precedes another element, but indicates the occurrence of certain actions or steps at a certain time.

[0142] The above provides a solid state disk control method and device, and the principle and implementation of the application are described by specific examples. The above examples are used to help understand the method and core idea of the application. For those skilled in the art, the specific implementation and application range can be changed according to the idea of the application. The above description should not be understood as a limitation of the application.

Claims

1. A control method of a solid state drive, characterized by, The solid-state drive has multiple storage units, each storage unit has multiple storage blocks, and the method includes: Construct one or more superblocks, each superblock consisting of multiple storage blocks, wherein the multiple storage blocks constituting the superblock are a portion of the storage blocks contained in the multiple storage units; The faulty storage blocks in the multiple storage blocks are marked so that the superblock can use the storage blocks in the multiple storage blocks except for the faulty storage blocks; Before marking the faulty memory blocks among the multiple memory blocks, the method further includes: During the use of the superblock, when a failure occurs in one of the multiple storage blocks, the target page for data writing is identified in the failed storage block and reclaimed; wherein, the target page includes valid pages and invalid pages; The data in the target page is written to storage blocks other than the faulty storage block.

2. The method of claim 1, wherein, The plurality of storage units include storage blocks for use as backups for failed storage blocks, and further include: For the backup storage block, it is set as reserved space for the solid-state drive; the reserved space is a capacity that cannot be operated by the user.

3. The method of claim 1, wherein, Before reclaiming the target page for data writing in the determined faulty storage block, the process also includes: If the failure occurring in the multiple storage blocks is a read failure, the target page in the storage block where the failure occurred is determined to contain data to be written, and it is then reclaimed. If a write failure occurs in a storage block, the faulty storage block is set to read-only until a read failure occurs or the superblock is garbage collected. Then, the target page in the faulty storage block containing data is determined to be written to and is reclaimed.

4. The method of claim 2, wherein, Each superblock has a storage block used for verification of other storage blocks in the superblock, wherein the storage block that is determined to have a target page for data writing exists, including: Read the target page from the faulty storage block where data has been written; If it is impossible to read the target page in the faulty storage block where data has been written, the verification information in the storage block used for verification is used to recover the target page in the faulty storage block where data has been written.

5. The method of claim 4, wherein, After writing the data from the target page to storage blocks other than the faulty storage block, the method further includes: For the data in the superblock that is outside the target page, generate new verification information; The new verification information is used to update the storage block used for verification.

6. The method of claim 1, wherein, The step of writing the data from the target page to storage blocks other than the faulty storage block includes: The data in the target page is written to a storage block in the superblock other than the faulty storage block, or the data in the target page is written to a storage block in another superblock.

7. A control device of a solid state drive, characterized by comprising: The solid-state drive has multiple storage units, each storage unit has multiple storage blocks, and the device includes: A superblock construction module is used to construct one or more superblocks. Each superblock consists of multiple storage blocks, and the multiple storage blocks that make up the superblock are a portion of the storage blocks contained in the multiple storage units. a failed block marking module, configured to mark a failed storage block in the plurality of storage blocks, so that the super block uses the plurality of storage blocks except the failed storage block; a target page recycling module, configured to, during use of the super block, when a failed storage block in the plurality of storage blocks occurs, determine a target page in which data is written in the failed storage block, and recycle the target page; wherein the target page includes a valid page and an invalid page; a page data writing module, configured to write data in the target page to a storage block except the failed storage block.

8. An electronic device, comprising: A computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the control method of the solid state disk according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the control method of the solid state disk according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • A bad block processing method and device for a combined block

    CN109445715A

  • System, method, and device for data recovery

    CN113641529A

  • Storage control system with data management mechanism of parity and method of operation thereof

    US20140156966A1