Storage block management method of storage device and storage device
By using faulty word line marks instead of bad block marks in storage devices, the storage space utilization rate of NAND flash storage media is improved, the storage space waste caused by erasing wear is solved, and more efficient storage management is achieved.
Patent Information
- Application Number
- CN202411470206.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-01-07
AI Technical Summary
In existing storage devices, the memory blocks of NAND flash memory media increase bad blocks due to erectile wear and tear, which reduces the utilization rate of storage space, and as the storage space expands, the problem of space waste becomes more serious.
Using the storage block management method, by setting fault marking methods, including memory block marking and word line marking, and determining fault word line based on operation failure information, updating fault word line table, avoiding marking the entire memory block as bad blocks, and improving storage space utilization rate.
By replacing bad block marking, the storage space utilization of flash storage media is improved, space waste is reduced, and the associated word line number threshold is set through different operations to accurately mark faulty word lines to avoid too many or too few Fault marking.
Smart Images

Figure CN119271147A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a storage block management method of a storage device and a storage device. Background Art
[0002] Currently, many storage devices use flash memory storage media, especially NAND flash memory storage media, as their main storage media. Figure 1 It is an exemplary structural diagram of a solid-state drive that uses NAND flash memory storage media as storage media. As shown in the reference figure, the NAND flash memory storage medium 130 is composed of at least one flash memory particle, and these flash memory particles include four dies from Die0 to Die3. The size of each Die is, for example, 32GB / 64GB / 128GB. The structure of each Die is consistent, and they are all composed of two planes (plane0 to plane1), and the number of storage blocks (blocks) on each plane is also the same. The controller 120 of the solid-state drive operates the data of each storage block through channels (channels channel0 to channel3 are shown in the figure).
[0003] As shown in the figure above, storage blocks include storage blocks that can be read, written, erased, etc. normally (i.e., good blocks) and storage blocks that cannot be read, written, erased, etc. normally (i.e., bad blocks). Bad blocks are mainly divided into: (1) Factory Bad Block, which is a bad block generated during the production process. Generally, the manufacturer of flash memory particles will assign a value not equal to 0xff to the sixth byte of the spare area of the first storage page of the bad block to mark the bad block when the memory is shipped from the factory; (2) Grown Bad Block, which is a factory good block that becomes a bad block due to erase and write wear during use. The inability to complete ECC error correction recovery, erase failure, write failure, etc. can all be manifestations of the appearance of grown bad blocks.
[0004] Bad blocks will reduce the utilization rate of storage medium space, and as the storage space of storage blocks in flash storage media becomes larger and larger, the problem of storage space waste will become more serious. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a storage block management method of a storage device and a storage device to solve the existing technical problems.
[0006] According to a first aspect of the present disclosure, a storage block management method of a storage device is provided, wherein the storage device comprises a controller and a flash memory storage medium, wherein the flash memory storage medium comprises a plurality of storage blocks, wherein the storage block comprises a plurality of storage pages connected by a plurality of word lines, and the storage block management method is executed by the controller and comprises the following steps:
[0007] Setting fault marking modes for various operations on storage blocks respectively, the fault marking modes including storage block marking and word line marking, and setting an associated word line number threshold for the operation with the word line marking;
[0008] According to the failure information fed back by the first operation for the first storage block, if the failure marking mode of the first operation is storage block marking, the first storage block is marked as a bad block or all word lines in the first storage block are marked as failed word lines; if the failure marking mode of the first operation is word line marking, at least one designated word line in the first storage block is determined from the failure information, and the at least one designated word line is marked as a failed word line, and the number of the at least one designated word line is equal to the associated word line number threshold value corresponding to the first operation;
[0009] The failed wordline is updated to a failed wordline table.
[0010] In some embodiments, the multiple operations include: host read, firmware read, firmware write, host write, and firmware erase.
[0011] In some embodiments, the fault marking method for the firmware erase is a storage block marking, and the fault marking method for other operations is a word line marking.
[0012] In some embodiments, the failed wordline table records the status of all wordlines of all memory blocks, where the status includes failed and non-failed.
[0013] In some embodiments, the method further includes: moving data in a storage page connected to the failed word line to another location.
[0014] According to a second aspect of the present disclosure, a write operation method of a storage device is provided, comprising:
[0015] For a write command received from a host or a write operation initiated by firmware, judging whether a storage block to which data is to be written has a faulty word line according to the faulty word line table in any of the above storage block management methods, and if so, writing the write data into a storage page connected to a non-faulty word line of the corresponding storage block, and writing invalid data into the storage page connected to the faulty word line; and
[0016] If the write operation fails, the failure information is fed back.
[0017] According to a third aspect of the present disclosure, a host read operation method of a storage device is provided, comprising:
[0018] For a read command received from the host, reading data from a corresponding memory page in a corresponding memory block;
[0019] If the read fails, the above failure information is fed back.
[0020] According to a fourth aspect of the present disclosure, a firmware read operation method of a storage device is provided, comprising:
[0021] Reading data from a storage page of a non-faulty word line of a specified storage block according to the faulty word line table in the storage block management method described in any one of the above items;
[0022] If the read fails, the above failure information is fed back.
[0023] According to a fifth aspect of the present disclosure, there is provided a storage device, comprising: a coupled controller and a flash memory storage medium, wherein the controller executes any one of the methods described above.
[0024] According to a sixth aspect of the present disclosure, a controller of a storage device is provided, which is coupled to a flash memory storage medium, and the controller executes any one of the methods described above.
[0025] The storage block management method provided by the embodiment of the present invention uses a faulty word line mark instead of a bad block mark for some operation failures of the flash memory storage medium, thereby improving the utilization rate of the flash memory storage medium and reducing space waste. Furthermore, different associated word line number thresholds are set for different operations, and when marking faulty word lines, the number of faulty word lines to be marked is determined by the corresponding associated word line number threshold, thereby avoiding marking too many or too few faulty word lines. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0027] Figure 1 is a structural diagram of an exemplary solid state drive using a NAND flash memory storage medium as a main storage medium;
[0028] Figure 2 is a flow chart of a storage block management method of a storage device provided by an embodiment of the present disclosure;
[0029] Figure 3 is a schematic diagram of an exemplary storage block structure;
[0030] Figure 4 is a flowchart of a write operation method of a storage device provided by an embodiment of the present disclosure;
[0031] Figure 5 It is a flowchart of a host read operation method of a storage device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] The present invention will be described in more detail below with reference to the accompanying drawings. In each of the accompanying drawings, the same elements are represented by similar reference numerals. For the sake of clarity, the various parts in the accompanying drawings are not drawn to scale. In addition, some well-known parts may not be shown.
[0033] The present invention is described below based on embodiments, but the present invention is not limited to these embodiments. In the detailed description of the present invention below, some specific details are described in detail. It is possible for a person skilled in the art to fully understand the present invention without the description of these details. In order to avoid confusing the essence of the present invention, known methods, processes, flows, components and circuits are not described in detail.
[0034] Unless the context clearly requires otherwise, the words "include", "comprising" and the like throughout the specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, as "including but not limited to". In the description of the present invention, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, "plurality" means two or more.
[0035] The core problem of the existing solution is that for the failure feedback of different operations on the flash storage medium, the bad blocks are uniformly marked according to the storage block as the basic unit. For example, for a read or write operation, if one or several storage pages fail to read or write, the corresponding storage block is marked as a bad block. This processing method loses a lot of storage space. The solution of the embodiment of the present disclosure is to use a faulty word line mark instead of a bad block mark for the failure feedback of some operations, thereby improving the utilization rate of the flash storage medium and reducing space waste. The various embodiments of the present disclosure are described in detail below.
[0036] Figure 2 A flow chart of a storage block management method for a storage device provided by an embodiment of the present disclosure is given. The storage block management method can be formed into an independent computer program or a module in an independent computer program, and can be implemented by, for example Figure 1 The processor (not shown in the figure) in the controller 120 of the storage device 100 shown in the figure is executed, and the corresponding program code can be stored in the cache unit (not shown in the figure) of the controller 120, and can be formed into firmware loaded and executed when the storage device 100 is powered on. At the same time, the target of the storage block management method is, for example Figure 3The structure of each storage block in the flash storage medium 130 shown in FIG. Figure 3 As shown, Figure 3 An example diagram of a storage block 300 is given, from Figure 3 It can be seen that the storage block 300 includes multiple word lines WL1 to WLm, which are electrically connected to the gates of multiple floating gate transistors that constitute the storage page. At the same time, the sources of the multiple floating gate transistors are correspondingly electrically connected to the bit lines BL1 to BLn, and m and n are integers greater than or equal to 1.
[0037] The storage block management method specifically includes the following steps.
[0038] In step S201, fault marking modes are respectively set for various operations on a storage block, the fault marking modes including storage block marking and word line marking, and a threshold value of the number of associated word lines is set for the operation with word line marking.
[0039] Among them, the various operations include but are not limited to: host read, firmware read, firmware write, host write, and firmware erase according to the source and operation type. Due to the inherent differences of these operations, the scope of influence when the operation fails is also different, so it is necessary for the system to set different fault marking methods for different operations. For example, the actual operation of firmware erase is to apply voltage to the substrate for a long enough time to absorb electrons from the floating gate transistor. Because a storage block shares a substrate, only one or more storage blocks can be erased at a time; while the firmware and host read / write operations are to apply different voltages to the word lines of the target storage page and the word lines of the remaining storage pages. Therefore, the fault marking method of firmware erase is set to storage block marking, and the firmware and host read / write operations are set to word line marking. In addition, when the previous word line fails to read / write, at the time when the problem occurs, the nearby word lines may not immediately fail to read / write at the same time, but due to the influence of the failed word line, the probability of failure of the nearby word lines in subsequent use will be greater, so the system sets the associated word line number threshold for the read / write operation to indicate the maximum number of peripheral word lines affected.
[0040] In steps S202 to S204, based on the failure information fed back by the first operation for the first storage block, if the fault marking method of the first operation is storage block marking, the first storage block is marked as a bad block or all word lines in the first storage block are marked as faulty word lines; if the fault marking method of the first operation is word line marking, at least one designated word line in the first storage block is determined based on the failure information, and at least one designated word line is marked as a faulty word line.
[0041] Specifically, firstly, feedback failure information about a first operation is received from a program for processing various operations, where the first operation is one of the multiple operations defined in step S201, and the processing program defines failure and success for the result of the first operation (for example, a read operation is considered a failure if the error bit ratio exceeds a set threshold, otherwise it is considered a success), and a failure information is sent in the event of a failure. The format of the failure information is also defined in advance by the processing program. For example, the failure information of firmware erasure indicates the number of the first storage block erased, and the failure information of the read / write operation indicates the storage page or word line where the read / write failed. The failure information of the write / read operation can also be a directly fed back FAIL, and the failure information of the read operation can also indicate the error bit ratio and whether it exceeds a threshold.
[0042] Then, the fault marking mode corresponding to the first operation is obtained according to the relationship between various operations and fault marking modes recorded in step S201. If the fault marking mode of the first operation is a storage block marking, the first storage block is marked as a bad block, or all word lines in the first storage block are marked as faulty word lines. If the fault marking mode of the first operation is a word line marking, at least one designated word line in the first storage block is determined from the failure information, and the at least one designated word line is marked as a faulty word line, wherein the number of at least one word line is equal to the threshold value of the number of associated word lines corresponding to the above-mentioned certain operation. For example, if data writing fails for word line 0, the threshold value of the number of associated word lines is set to 4, and word line 0 and word lines 1 to 4 are all marked as faulty word lines by 4.
[0043] In step S205 , the failed word line is updated to the failed word line table.
[0044] The faulty wordline information marked in steps S203 to S204 is written into the faulty wordline table. The faulty wordline table can be stored in certain fixed storage blocks of the flash storage medium, but this is not mandatory in the embodiments of the present disclosure.
[0045] Furthermore, the method further includes: before or after marking a non-faulty word line as a faulty word line, moving data stored in a storage page connected to the faulty word line to another location. For example, when a firmware or host read operation fails from a storage page connected to a word line, data of word lines surrounding the word line need to be moved together.
[0046] Figure 4 It is a flowchart of a write operation method of a storage device provided by an embodiment of the present disclosure, which specifically includes the following steps.
[0047] In step S401, a write command is received from a host or a write operation is initiated by firmware.
[0048] In step S402, the faulty word line table is retrieved, and it is determined whether the memory block to which data is to be written has a faulty word line. If yes, step S403 is executed, and if not, step S406 is executed.
[0049] In step S403, write data is written into the storage pages connected to the non-faulty word lines of the corresponding storage block, and invalid data is written into the storage pages connected to the faulty word lines.
[0050] In step S404, it is determined whether the writing fails, and if so, step S405 is executed.
[0051] In step S405, failure information is fed back.
[0052] In step S406 , the write data is written into the storage page of the corresponding storage block.
[0053] According to this embodiment, for firmware write or host write operation, it is determined based on the fault word line table whether the targeted storage block has a faulty word line. If the storage block is a storage block without a faulty word line, it will not be affected by the bad block management mechanism of the present disclosure, and data can be directly written to the entire storage block according to the existing scheme. If the storage block is a storage block with a faulty word line, then when a faulty word line is encountered during data writing, valid data will not be filled in this position, but invalid (Dummy) data will be directly filled in. Due to the characteristics of the flash memory storage medium, it is required that data must be written from word line 0 to word line m, so invalid data will be interspersed in the host data. If data writing to a storage page of a non-faulty word line fails, the failure information is fed back to the implementation. Figure 2 The procedure of the memory block management method shown is to perform fault marking.
[0054] In order to implement the above storage block management method, the faulty wordline table can be organized as shown in Table 1. Table 1 is a wordline fault table organized by taking a 4-plane flash storage medium as an example, and the flash storage medium has 16 dies. Based on the different specifications of flash memory particles, a flash memory particle may have 1 die (ie, SDP), 2 dies (DDP), 4 dies (QDP), etc.
[0055] Table 1
[0056] In Table 1, Dxx represents the die number, Px represents the plane number, WLx represents the word line number, BlockN represents the storage block number, the gray background of the flash memory represents that the corresponding word line is a faulty word line, and the white background represents that the corresponding word line is a normal word line (non-faulty word line). The data in Table 1 indicates that the word line WL0 in the storage block BlockN of plane D09P0 and the word line WL0 in the storage block BlockN of plane D10P1 are both faulty word lines.
[0057] Figure 5 It is a flowchart of a host read operation method of a storage device provided by an embodiment of the present disclosure, which specifically includes the following steps.
[0058] In step S501, a read command is received from a host.
[0059] In step S502, data is read from a specified storage page of a specified storage block.
[0060] In step S503, it is determined whether the reading fails, and if so, step S504 is executed.
[0061] In step S504, failure information is fed back.
[0062] The host does not need to check the fault word line table when reading, because the host must read the valid data that has been written, and the host data will not be written to the fault word line. Therefore, when the host reads the command, it only needs to read the specified position. If the reading of a certain storage page fails, the failure information will be fed back to the implementation. Figure 2 The procedure of the memory block management method shown is to perform fault marking.
[0063] Firmware read operation method and Figure 5 The difference between the host read operation method shown in the figure is that when performing firmware reading, it is necessary to query the fault word line table, because when the firmware reads a storage block, it does not know which data in the storage block is the host valid data, which is the host invalid data, and which is the firmware invalid data (non-faulty word lines are sometimes filled with dummy data). Therefore, it is necessary to query the fault word line table and read data from the storage page of the non-faulty word line of the specified storage block according to the faulty word line table to prevent invalid data from being read and errors from occurring. If the read fails, the failure information is fed back to the implementation Figure 2 The procedure of the memory block management method shown is to perform fault marking.
[0064] The storage block management method and the read operation and write operation methods provided in various embodiments of the present disclosure can greatly improve the utilization rate of the flash memory storage medium, especially when facing poor quality flash memory particles. This solution will greatly improve the yield of flash memory particle products.
[0065] According to the embodiments of the present invention as described above, these embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made based on the above description. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can make good use of the present invention and the modified use based on the present invention. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A storage block management method for a storage device, characterized in that: The storage device includes a controller and a flash memory storage medium, the flash memory storage medium includes a plurality of storage blocks, the storage block includes a plurality of storage pages connected by a plurality of word lines, the storage block management method is executed by the controller, and includes the following steps: Setting fault marking modes for various operations on storage blocks respectively, the fault marking modes including storage block marking and word line marking, and setting an associated word line number threshold for the operation with the word line marking; According to the failure information fed back by the first operation for the first storage block, if the failure marking mode of the first operation is storage block marking, the first storage block is marked as a bad block or all word lines in the first storage block are marked as failed word lines; if the failure marking mode of the first operation is word line marking, at least one designated word line in the first storage block is determined from the failure information, and the at least one designated word line is marked as a failed word line, and the number of the at least one designated word line is equal to the associated word line number threshold value corresponding to the first operation; The failed wordline is updated to a failed wordline table.
2. The storage block management method according to claim 1, wherein: The multiple operations include: host read, firmware read, firmware write, host write, and firmware erase.
3. The storage block management method according to claim 2, wherein: The fault marking mode of the firmware erasing is a storage block marking, and the fault marking mode of other operations is a word line marking.
4. The storage block management method according to claim 1, wherein: The faulty wordline table records the status of all wordlines of all memory blocks, where the status includes faulty and non-faulty.
5. The storage block management method according to claim 1, further comprising: The data in the memory page connected to the faulty word line is moved to another location.
6. A write operation method for a storage device, characterized in that: include: For a write command received from a host or a write operation initiated by firmware, the faulty wordline table in the storage block management method according to any one of claims 1 to 5 determines whether the storage block to which data is to be written has a faulty wordline, and if so, writes the write data to a storage page connected to a non-faulty wordline of the corresponding storage block, and writes invalid data to the storage page connected to the faulty wordline; and If the writing fails, the failure information as described in claim 1 is fed back.
7. A host read operation method for a storage device, characterized in that: include: For a read command received from the host, reading data from a corresponding memory page in a corresponding memory block; If the reading fails, the failure information as claimed in claim 1 is fed back.
8. A firmware read operation method for a storage device, characterized in that: include: The faulty word line table in the memory block management method according to any one of claims 1 to 5 reads data from the memory pages of the non-faulty word lines of the specified memory block; If the reading fails, the failure information as claimed in claim 1 is fed back.
9. A storage device comprising: A coupled controller and a flash storage medium, wherein the controller executes the method according to any one of claims 1 to 8.
10. A controller of a storage device, coupled to a flash storage medium, the controller executing the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Bad block management method and system for storage equipment, and computer readable storage medium
CN113986120A
Semiconductor memory device, contreller and operating methods thereof
KR1020180051341A
Memory management method and storage controller
US10515712B1
Reusing partial bad blocks in NAND memory
US20150187442A1
Dynamic cache row fail accumulation due to catastrophic failure
US20160239375A1
Cited By
Memory management method and memory controller
CN121687154A