A storage management method, apparatus, program, and device

By detecting and downgrading the storage mode of the storage cells to be adjusted in the SSD, the problem of shortened lifespan and deadlock caused by the increase in SSD storage chip stacking is solved, thus extending the lifespan of the SSD and improving its reliability.

CN114661237BActive Publication Date: 2025-12-02HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210306759.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2025-12-02
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

As the number of stacked layers of SSD storage chips increases, although the amount of information that can be stored in each cell increases, the number of write cycles decreases, resulting in a shorter lifespan for the SSD. Furthermore, the SSD becomes unusable after the reserved spare blocks are exhausted.

Method used

By detecting target storage cells in the SSD that require adjustment of their storage mode and downgrading their current storage mode, the number of information bits that the downgraded target storage cell can store is reduced, thereby avoiding deadlock and extending the lifespan of the SSD.

Benefits of technology

It extends the lifespan of SSDs, avoids the problem of storage units becoming unusable due to deadlock, and improves the reliability and lifespan of SSDs by downgrading and adjusting the storage mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114661237B_ABST
    Figure CN114661237B_ABST
Patent Text Reader

Abstract

This application discloses a storage management method, apparatus, program, and device. When a target storage cell in an SSD is detected to have a storage mode that needs adjustment, the current storage mode of the target storage cell is downgraded. The number of information bits that the downgraded target storage cell can store is lower than the number of information bits that the target storage cell could store before the downgrade, and the lifespan of the downgraded target storage cell is increased. Furthermore, this application's solution determines the storage mode of a storage cell to be adjusted when it detects read errors, write errors, and / or erase errors in any storage cell that meet the corresponding storage mode downgrade adjustment conditions, or when it detects that the number of reserved physical blocks in the die corresponding to the storage cell meets a preset block condition. This allows for adjusting the storage mode of the storage cell before it may deadlock, thus preventing the storage cell from becoming unusable due to deadlock.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage, and in particular to a storage management method, apparatus, program and device. Background Technology

[0002] With technological advancements, the number of stacked storage chips in SSDs (Solid State Disks) has continuously increased, and the storage mode of each chip has evolved from SLC, MLC, TLC, QLC to PLC. Specifically, in SLC (Single-Level Cell) mode, each cell can store 1 bit of information; in MLC (Multi-Level Cell) mode, each cell can store 2 bits of information; in TLC (Trinary-Level Cell) mode, each cell can store 3 bits of information; in QLC (Quad-Level Cell) mode, each cell can store 4 bits of information; and in PLC (Penta-Level Cell) mode, each cell can store 5 bits of information.

[0003] However, as the number of stacked layers of SSD storage chips increases, although the amount of information that can be stored per cell increases, the number of write cycles (i.e., lifespan) of the SSD decreases. Related technologies, to ensure the lifespan of the SSD, increase its capacity and reserve some spare blocks. These spare blocks are used for remapping after the primary block fails, replacing the damaged primary block for continued storage. However, once the number of reserved spare blocks for remapping is exhausted, the SSD will deadlock and become unusable. Summary of the Invention

[0004] This application discloses a storage management method, apparatus, program, and device to further improve the lifespan of SSDs and avoid SSD deadlock.

[0005] According to a first aspect of the embodiments of this application, a storage management method is provided, the method comprising:

[0006] Determine whether there is a target storage cell in the solid-state drive (SSD) whose storage mode needs to be adjusted; wherein, when any storage cell has a corresponding specified event, the storage cell is determined to be the target storage cell whose storage mode needs to be adjusted; the specified event includes at least: read error, write error and / or erase error satisfying the corresponding storage mode downgrade adjustment condition; or, the number of reserved physical blocks in the wafer die corresponding to the target storage cell satisfies the preset block condition;

[0007] If it is determined that there is a target storage unit in the SSD whose storage mode needs to be adjusted, the current storage mode of the target storage unit is downgraded, wherein the number of information bits that the target storage unit can store after downgrading is lower than the number of information bits that the target storage unit can store before downgrading.

[0008] According to a second aspect of the embodiments of this application, a storage management apparatus is provided, the apparatus comprising:

[0009] The target storage cell determination module is used to determine whether there is a target storage cell in the solid-state drive (SSD) whose storage mode needs to be adjusted; wherein, when any storage cell has a corresponding specified event, the storage cell is determined to be the target storage cell whose storage mode needs to be adjusted; the specified event includes at least: read error, write error and / or erase error satisfying the corresponding storage mode downgrade adjustment condition; or, the number of reserved physical blocks in the wafer die corresponding to the target storage cell satisfies the preset block condition;

[0010] The storage mode degradation module is used to downgrade the current storage mode of the target storage unit when it is determined that there is a target storage unit in the SSD whose storage mode needs to be adjusted. The number of information bits that the target storage unit can store after downgrading is lower than the number of information bits that the target storage unit can store before downgrading.

[0011] The target storage unit determination module determines whether there is a target storage unit in the solid-state drive (SSD) whose storage mode needs to be adjusted, including:

[0012] Obtain the system log of the SSD within a specified time period, and determine the value of at least one indicator item in each storage unit that caused the specified event based on the system log;

[0013] For each storage cell, if the value of at least one indicator item in the storage cell that causes the specified event is greater than a preset first threshold, it is determined that there is a target storage cell in the solid-state drive (SSD) whose storage mode needs to be adjusted.

[0014] The target storage unit is determined in the following way:

[0015] For each storage cell, the storage cell whose value of at least one indicator that causes the specified event is greater than a preset first threshold is determined as the target storage cell.

[0016] The SSD consists of multiple storage units forming a higher-level storage unit; the target storage unit determination module determines whether there is a target storage unit in the SSD whose storage mode needs to be adjusted, including:

[0017] Obtain the system log of the SSD within a specified time period, and determine the value of at least one indicator item in the upper-level storage unit that caused the specified event based on the system log;

[0018] If the value of at least one indicator that causes the specified event is greater than a preset second threshold, it is determined that there is a target storage cell in the solid-state drive (SSD) whose storage mode needs to be adjusted.

[0019] The target storage unit is determined in the following way:

[0020] If the value of at least one indicator that causes the specified event in any upper-level storage unit is greater than a preset second threshold, the storage unit with the largest value of at least one indicator that causes the specified event in each storage unit that constitutes the upper-level storage unit, as recorded in the system log, is determined as the target storage unit.

[0021] The at least one indicator that causes the specified event includes at least: a first indicator for recording the number of uncorrectable errors, and / or, a second indicator for recording the number of sectors with problems to be determined, and / or, a third indicator for recording the number of access verification errors, and / or, a fourth indicator for recording the number of programming failures, and / or, a fifth indicator for recording the number of erasure failures.

[0022] The SSD is composed of at least one wafer die, and the die includes at least a main block and a reserved block; the reserved block is used to replace the main block.

[0023] The target storage unit determination module determines whether there is a target storage unit in the solid-state drive (SSD) whose storage mode needs to be adjusted, including:

[0024] If the number of verification failures during a write operation on a major block in any die exceeds the preset number of rewrites, check whether the number of reserved blocks in that die is less than the preset minimum number of reserved blocks.

[0025] If so, then it is determined that there is a target storage unit in the SSD whose storage mode needs to be adjusted;

[0026] The target storage unit is determined in the following way:

[0027] Dies with a number of reserved blocks less than the preset minimum number of reserved blocks are identified as target storage units;

[0028] The target storage unit can be any one of the following types: SSD, NAND flash memory, die, plane, block, page, or cell.

[0029] The target storage unit is composed of multiple lower-level storage units;

[0030] The storage mode downgrade module downgrades the current storage mode of the target storage unit, including:

[0031] The SSD's control chip formats the current storage mode of the configured target storage unit, and configures the storage mode of at least one lower-level storage unit in the formatted target storage unit to a storage mode at a lower level than the current storage mode of the target storage unit; the number of information bits stored in the lower-level storage unit in the storage mode at a lower level than the number of information bits stored in the lower-level storage unit in the current storage mode of the target storage unit is less than the number of information bits stored in the lower-level storage unit in the current storage mode of the target storage unit.

[0032] The storage mode downgrade module downgrades the current storage mode of the target storage unit, including:

[0033] According to the preset degradation step size N, the current storage mode of all lower-level storage units in the target storage unit is reduced by N levels;

[0034] Alternatively, based on the value of at least one indicator that causes the specified event in each of the target storage units, the lower-level storage units whose values ​​of at least one indicator that causes the specified event are greater than a preset third threshold are determined as target lower-level storage units, and the current storage mode of the target lower-level storage units is reduced by N levels according to a preset downgrade step size N.

[0035] The device further includes:

[0036] The testing module is used to write test data into the target storage unit after the storage mode has been downgraded. During the process of writing test data, it is determined whether there is a corresponding specified event in the target storage unit. If so, the downgraded storage mode is determined as the current storage mode of the target storage unit, and the current storage mode of the target storage unit is downgraded.

[0037] The device further includes:

[0038] The alarm module is used to determine whether the current storage mode level of the target storage unit is the lowest level. If so, an alarm reminder is sent.

[0039] The device further includes:

[0040] The SSD management module is used to set up logical volume LUNs corresponding to each storage mode in the SSD according to the various storage modes supported by the target storage unit, so as to manage the SSD through the LUNs;

[0041] The SSD management module is also used to, after downgrading the current storage mode of the target storage unit, notify the SSD to change the LUN corresponding to the target storage unit from the LUN corresponding to the current storage mode to the LUN corresponding to the downgraded storage mode.

[0042] The device further includes:

[0043] A write protection module is used to enable write protection for the target storage unit, which restricts write operations to the target storage unit; and to migrate the data in the target storage unit to other storage media other than the SSD.

[0044] According to a third aspect of the embodiments of this application, a computer program is provided, the computer program being stored in a machine-readable storage medium, which, when executed by a processor, causes the processor to implement the storage management method as described above.

[0045] According to a fourth aspect of the embodiments of this application, an electronic device is provided, the electronic device comprising: a processor and a memory;

[0046] The memory is used to store machine-executable instructions;

[0047] The processor is configured to read and execute machine-executable instructions stored in the memory to achieve the desired result.

[0048] The technical solutions provided by the embodiments of this application may include the following beneficial effects:

[0049] As can be seen from the above technical solutions, the solution provided in this application can downgrade the current storage mode of a target storage unit when a target storage unit with an adjusted storage mode is detected in the SSD. Since the number of information bits that the downgraded target storage unit can store is lower than the number of information bits that the target storage unit can store before being downgraded, the lifespan of the downgraded target storage unit will be increased. In addition, the solution in this application determines the storage unit as the target storage unit with an adjusted storage mode when it is detected that there are read errors, write errors, and / or erase errors in any storage unit that meet the corresponding storage mode downgrade adjustment conditions, or when it is detected that the number of reserved physical blocks in the die corresponding to the storage unit meets the preset block conditions. This is to adjust the storage mode of the storage unit before it may be deadlocked, so as to avoid the storage unit becoming unusable due to deadlock.

[0050] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0051] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.

[0052] Figure 1 This is a flowchart illustrating an implementation of a storage management method provided in an embodiment of this application;

[0053] Figure 2 This is a schematic diagram of a process for determining a target storage unit provided in an embodiment of this application;

[0054] Figure 3 This is a schematic diagram of another process for determining a target storage unit provided in an embodiment of this application;

[0055] Figure 4 This is a schematic diagram of another process for determining a target storage unit provided in an embodiment of this application;

[0056] Figure 5 This is a schematic block diagram of a storage management device provided in an embodiment of this application;

[0057] Figure 6 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0058] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0059] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0060] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," "in the circumstances," or "in response to determination."

[0061] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, and to make the above-mentioned objectives, features, and advantages of the embodiments of this application more apparent and understandable, the structure of the SSD in the embodiments of this application will be briefly described below before introducing the solutions provided in the embodiments of this application:

[0062] In this embodiment, the solid-state drive (SSD) includes at least several types of storage units such as SSD, NAND (flash memory), die, plane, block, page, and cell. The storage unit in this embodiment can be any of the above-mentioned types. As an example, the above-mentioned storage units have the following hierarchical relationship: an SSD consists of at least one NAND, a NAND consists of at least one die, a die consists of at least one plane, a plane consists of at least one block, a block consists of at least one page, and a page consists of at least one cell.

[0063] In an SSD, a Cell is the smallest storage unit, also known as a storage particle. Storage particles are classified into different types based on the density of electrons within them. A higher electron density allows the particle to store more bits of information. Therefore, storage particles can be categorized into various storage modes such as SLC, MLC, TLC, QLC, and PLC based on the number of bits they can store. In this embodiment, since all other types of storage units besides Cells in the SSD are composed of multiple Cells, when all Cells in any given storage unit share the same storage mode, that storage unit can be considered to have the same storage mode corresponding to all the aforementioned Cells.

[0064] As an example, based on the number of information bits that the aforementioned storage particles can store, the storage mode levels corresponding to different types of storage particles can be pre-classified. For instance, if the current SSD has at least 5 storage modes (this application does not limit the number of storage mode levels; if a new storage mode appears in related technologies, a level can also be set for the new storage mode): SLC, MLC, TLC, QLC, and PLC, where each storage cell in SLC mode can store 1 bit of information, each cell in MLC mode can store 2 bits of information, each cell in TLC mode can store 3 bits of information, each cell in QLC mode can store 4 bits of information, and each cell in PLC mode can store 5 bits of information, then these 5 storage modes are classified according to their level from lowest to highest as: SLC, MLC, TLC, QLC, and PLC, with SLC having the lowest level and PLC having the highest level.

[0065] It should be noted that in this embodiment, the lower the storage mode level of the storage particles, the longer the P / E (Program / Erase) lifetime of the storage particles (i.e., the more write cycles the storage particles can have), and the longer the P / E lifetime of the storage cell composed of the storage particles (i.e., the more write cycles the storage cell can have), and the faster the read and / or write speed of the storage cell (i.e., the better the write performance). However, since the number of storage particles in the storage cell is constant, and since the lower the storage mode level of the storage particles, the fewer bits of information the storage particles can store, the lower the storage mode level of the storage particles, the smaller the total capacity of the storage cell. For example, in terms of capacity, the capacity of the same storage cell under storage mode SLC is half the capacity under storage mode MLC, the capacity of the storage cell under storage mode MLC is half the capacity under storage mode TLC, the capacity of the storage cell under storage mode TLC is half the capacity under storage mode QLC, and the capacity of the storage cell under storage mode QLC is half the capacity under storage mode PLC.

[0066] The above completes the description of the SSD in the embodiments of this application.

[0067] The technical solutions in the embodiments of this application will be further described in detail below with reference to the accompanying drawings. See also Figure 1 , Figure 1 This is a schematic flowchart illustrating a storage management method as provided in an embodiment of this application. As one embodiment, Figure 1The illustrated process can be applied to the controller chip of an SSD, which manages and controls the solid-state drive (SSD). This controller chip, together with at least one Nand flash chip, forms the SSD, where the Nand flash chip stores externally input data. As another embodiment, Figure 1 The illustrated process can be applied to the central memory in an SSD storage system. The central memory manages all SSDs in the system. An SSD storage system typically consists of a central memory and at least one SSD. The central memory manages the SSDs by sending instructions to the control chip in the SSD control system. The central processing unit (CPU) in the SSD storage system can be located in the same device as the SSDs or in a different device.

[0068] To facilitate differentiation, storage units with a lower level than the storage unit in this embodiment will be referred to as lower-level storage units, and storage units with a higher level than the storage unit in this embodiment will be referred to as upper-level storage units. For example, in this embodiment, if the storage unit is a plane, then Block, Page, and Cell are all lower-level storage units of the plane, and SSD, NAND, and Die are all upper-level storage units of the plane.

[0069] like Figure 1 As shown, the process may include the following steps:

[0070] Step 101: Determine whether there is a target storage unit in the solid-state drive (SSD) whose storage mode needs to be adjusted.

[0071] Step 102: If it is determined that there is a target storage unit in the SSD whose storage mode needs to be adjusted, the current storage mode of the target storage unit is downgraded, wherein the number of information bits that the target storage unit can store after downgrading is lower than the number of information bits that the target storage unit can store before downgrading.

[0072] As an example, when a corresponding specified event is detected in any storage cell, the storage cell with the corresponding specified event can be determined as the target storage cell for adjusting the storage mode in step 101. The specified event includes at least: read errors, and / or write errors, and / or erase errors that satisfy the corresponding storage mode degradation adjustment conditions; or, the number of reserved physical blocks in the wafer die corresponding to the target storage cell satisfies a preset block condition.

[0073] In the embodiments of this application, the above-mentioned storage mode downgrade adjustment conditions and preset block conditions are preset target storage units in the current storage mode. They are set according to the state of the target storage unit when the target storage unit does not meet normal business needs (such as performing one or more specified types of operations on the target storage unit (e.g., read operation, and / or write operation, and / or erase operation)).

[0074] For example, the above storage mode degradation adjustment conditions can be set for indicators that can characterize the operation status of a specified type of operation. For example, storage mode degradation adjustment conditions can be set for the following indicators: indicators that can characterize the operation failure status of one or more specified types of operations, and / or indicators that can characterize the operation success status of one or more specified types of operations.

[0075] Optionally, the metrics that characterize the failure status of one or more specified types of operations can be: metrics for recording the number of failures of one or more specified types of operations, and / or metrics for recording the failure rate of one or more specified types of operations. The metrics corresponding to the parameters that characterize the success status of one or more specified types of operations can be: metrics for recording the number of successes of one or more specified types of operations, and / or metrics for recording the success rate of one or more specified types of operations.

[0076] In this application embodiment, there are multiple ways to set storage mode degradation adjustment conditions for indicators that can characterize the operation of a specified type of operation. The following details two methods for setting storage mode degradation adjustment conditions provided in this application:

[0077] Method 1: As an example, the storage mode degradation adjustment conditions in step 101 above can be set based on the operation of one or more specified operations in the storage unit. The storage mode degradation adjustment conditions in this example are described below:

[0078] For example, if the storage mode degradation adjustment condition in this embodiment is set for an indicator that can characterize the failure of one or more specified types of operations, the storage mode degradation adjustment condition may include the following: for any storage cell, the bit error rate of write operations of the storage cell within a specified time period is greater than K; and / or, for any storage cell, the bit error rate of read operations of the storage cell within a specified time period is greater than M; and / or, for any storage cell, the failure rate of erase operations of the storage cell within a specified time period is greater than L; and / or, for any storage cell, the number of write operation failures of the storage cell within a specified time period is greater than 0; and / or, for any storage cell, the number of read operation failures of the storage cell within a specified time period is greater than P; and / or, for any storage cell, the number of erase operation failures of the storage cell within a specified time period is greater than Q.

[0079] Here, the bit error rate or failure rate refers to the ratio of the number of errors recorded in a specified type of operation within a specified time period to the total number of recorded operations of that specified type. For example, for write operations, the bit error rate is the ratio of the number of errors recorded in write operations within a specified time period to the total number of recorded write operations; for read operations, the bit error rate is the ratio of the number of errors recorded in read operations within a specified time period to the total number of recorded read operations; and for erase operations, the failure rate is the ratio of the number of failed erase operations recorded within a specified time period to the total number of recorded erase operations.

[0080] The specified time period mentioned above can refer to the period from the end of the previous monitoring cycle of the SSD to the current time. For example, if the SSD monitoring cycle is one week, and the previous monitoring cycle ended at 0:00 on Monday, then the specified time period refers to the period from 0:00 on Monday to the current time. The SSD monitoring cycle is used to record the SSD's performance during operations such as write operations, read operations, and / or erase operations within that monitoring cycle.

[0081] If the storage mode degradation adjustment conditions in this embodiment are set for an indicator that can characterize the success rate of one or more specified types of operations, then the storage mode degradation adjustment conditions may include the following: for any storage unit, the success rate of write operations of the storage unit within a specified time period is less than S; and / or, for any storage unit, the success rate of read operations of the storage unit within a specified time period is less than T; and / or, for any storage unit, the success rate of erase operations of the storage unit within a specified time period is less than U; and / or, for any storage unit, the number of successful write operations of the storage unit within a specified time period is greater than W; and / or, for any storage unit, the number of successful read operations of the storage unit within a specified time period is greater than V; and / or, for any storage unit, the number of successful erase operations of the storage unit within a specified time period is greater than Y.

[0082] Method 2: As another embodiment, the above-mentioned storage mode degradation adjustment conditions can also be set based on the operation of one or more specified operations in the storage unit and the parent storage unit. The storage mode degradation adjustment conditions in this embodiment are described below:

[0083] In this embodiment, if the storage mode degradation adjustment condition is set for an indicator that can characterize the failure of one or more specified types of operations, the storage mode degradation adjustment condition may include the following: For any storage cell, the bit error rate of write operations in the parent storage cell of the storage cell within a specified time period is greater than X, and the bit error rate of write operations in the storage cell within the specified time period is the maximum bit error rate among the bit error rates of write operations in all storage cells of the parent storage cell; and / or, for any storage cell, the bit error rate of read operations in the parent storage cell within a specified time period is greater than Z, and the bit error rate of read operations in the storage cell within the specified time period is the maximum bit error rate among the bit error rates of read operations in all storage cells of the parent storage cell; and / or, for any storage cell, the failure rate of erase operations in the parent storage cell within a specified time period is greater than R, and the failure rate of erase operations in the storage cell within the specified time period is the maximum failure rate among the failure rates of erase operations in all storage cells of the parent storage cell.

[0084] If the storage mode degradation adjustment conditions in this embodiment are set for an indicator that can characterize the success rate of one or more specified types of operations, then the storage mode degradation adjustment conditions may include the following: For any storage unit, the success rate of write operations in the parent storage unit where the storage unit is located is less than F within a specified time period, and the success rate of write operations in the storage unit within the specified time period is the lowest among the success rates of write operations in the parent storage units; and / or, for any storage unit, the success rate of read operations in the parent storage unit where the storage unit is located is less than G within a specified time period, and the success rate of read operations in the storage unit within the specified time period is the lowest among the success rates of read operations in the parent storage units; and / or, for any storage unit, the success rate of erase operations in the storage unit within a specified time period is less than H, and the success rate of erase operations in the storage unit within the specified time period is the lowest among the success rates of erase operations in the parent storage units.

[0085] For example, taking a die as the storage unit in this embodiment, the upper-level storage unit can be a NAND or SSD with a storage unit larger than a die (hereinafter, the upper-level storage unit is an SSD as an example). Then, the storage mode degradation adjustment condition in this embodiment can be set as follows: For any die, the bit error rate of the write operation of the SSD where the die is located is greater than X within a specified time period, and the bit error rate of the write operation of the die within the specified time period is the maximum bit error rate among the bit error rates of each die that makes up the SSD within the specified time period; and / or, for any die, the bit error rate of the read operation of the SSD where the die is located is greater than Z within a specified time period, and the bit error rate of the read operation of the die within the specified time period is the maximum bit error rate among the bit error rates of the read operation of each die in the SSD; and / or, for any die, the failure rate of the erase operation of the SSD where the die is located is greater than R within a specified time period, and the failure rate of the erase operation of the die within the specified time period is the maximum failure rate among the failure rates of the erase operation of each die in the SSD.

[0086] As an example, if method one is used to set the storage mode downgrade adjustment conditions in this embodiment, then determining whether there is a target storage unit in the SSD whose storage mode needs to be adjusted in step 101 above can be done as follows: Figure 2 The following method is shown.

[0087] like Figure 2 As shown, this method includes the following steps:

[0088] Step 201: Obtain the system log of the SSD within a specified time period, and determine the value of at least one indicator item in each storage unit that caused the specified event based on the system log.

[0089] In this embodiment, the specified time period is the period from the end of the previous monitoring cycle of the SSD to the current time. The SSD's system log in this embodiment records the operation results of write, read, and / or erase operations performed on the SSD, and statistically analyzes the operation results of write, read, and / or erase operations using various indicators used to characterize the SSD's operating status. The SSD's system log is generated by monitoring the SSD through the SSD's control chip.

[0090] Optionally, the at least one indicator that causes the specified event includes at least: a first indicator for recording the number of uncorrectable errors, and / or a second indicator for recording the number of sectors with unresolved problems, and / or a third indicator for recording the number of access verification errors, and / or a fourth indicator for recording the number of programming failures, and / or a fifth indicator for recording the number of erase failures. In this embodiment, if read errors, write errors, and / or erase errors satisfy the corresponding storage mode degradation adjustment conditions, the above indicator will be greater than a preset first threshold.

[0091] In this embodiment, since the above-mentioned storage mode degradation adjustment conditions are set for storage units, when determining at least one indicator item that causes a specified event from the system log in step 301, the value of at least one indicator item that causes a specified event in the storage unit can be determined according to the unit identifier of each storage unit in the SSD. For example, when the storage unit is a Die, the value of the indicator item used to characterize the operation results of write operations, read operations and / or erase operations of the Die in each Die in the system log can be found according to the unit identifier set in the SSD to identify the Die.

[0092] For example, the aforementioned indicator items may refer to the Smart (Self-Monitoring Analysis and Reporting Technology) indicator items in the hard disk status determination technology specified in related technologies.

[0093] The first indicator used to record the number of uncorrectable errors can be the Uncorrectable ErrorCount indicator, primarily used to record errors occurring during write operations; the second indicator used to record the number of sectors with pending problems can be the Pending Sector Count indicator, primarily used to record errors occurring during read operations; the third indicator used to record the number of access verification errors can be the CRC ErrorCount indicator, primarily used to record verification errors occurring during data transmission; the fourth indicator used to record the number of programming failures can be the Program Fail Count indicator, primarily used to record errors occurring during programming operations; and the fifth indicator used to record the number of erasure failures can be the Erase Fail Count indicator, primarily used to record errors occurring during erasure operations. The above-mentioned indicators are merely examples, and this application does not limit them.

[0094] The Smart indicators mentioned above, which are used as indicators for triggering the specified event in this embodiment, are all statistics on operation failures caused by storage medium damage. The reason why these Smart indicators are selected as indicators for triggering the specified event in this embodiment is that the operation failures recorded by these Smart indicators are not operation errors that can be successfully written by rewriting and erasing, but rather physical damage to the SSD (here referring to permanent wear of the storage medium oxide layer caused by programming and erasing operations), which will prevent the rewriting and erasing operations from being successfully executed according to the write command.

[0095] Step 202: For each storage cell, if the value of at least one indicator item that causes a specified event in the storage cell is greater than a preset first threshold, determine that there is a target storage cell in the solid-state drive (SSD) whose storage mode needs to be adjusted.

[0096] The thresholds corresponding to the first indicator and the third to fifth indicators can be set according to the minimum requirements for the bit error rate and failure rate of the storage unit when the storage unit can normally perform write operations, read operations and / or erase operations. The threshold corresponding to the second indicator can be set according to the number of reserved backup blocks when the die corresponding to the target storage unit can normally perform write operations, read operations and / or erase operations.

[0097] Step 203: For each storage cell, the storage cell whose value of at least one indicator that causes a specified event is greater than a preset first threshold is determined as the target storage cell.

[0098] Optionally, when there are two or more indicator items that cause the specified event in this embodiment, the thresholds preset in the first threshold for each indicator item that causes the specified event in the above embodiment can be the same or different. Also, when there are two or more indicator items that cause the specified event, the storage unit is determined to be the target storage unit for the storage mode to be adjusted only when the values ​​of the indicator items that cause the specified event in the storage unit are all greater than the corresponding thresholds.

[0099] For example, taking the storage unit as a die in this embodiment, the first indicator and the second indicator that cause a specified event in each die in the SSD can be monitored through the SSD's system log. For any die, when the values ​​of the first indicator and the second indicator that cause a specified event in the die are both greater than the corresponding threshold, the die is determined to be the target storage unit for which the storage mode needs to be adjusted.

[0100] This concludes the process. Figure 2 The process is shown below.

[0101] As an example, if method two is used to set the storage mode downgrade adjustment conditions in this embodiment, then determining whether there is a target storage unit in the SSD whose storage mode needs to be adjusted in step 101 above can be done as follows: Figure 3 The following methods are described:

[0102] like Figure 3 As shown, this method includes the following steps:

[0103] Step 301: Obtain the system log of the SSD within a specified time period, and determine the value of at least one indicator item in the upper-level storage unit that caused the specified event based on the system log.

[0104] In this embodiment, since the aforementioned storage mode degradation adjustment conditions are set for both the storage unit and the upper-level storage unit, when determining the value of at least one indicator item that causes the specified event based on the system log in step 301, the value of at least one indicator item that causes the specified event in the upper-level storage unit can be determined based on the unit identifier of each upper-level storage unit in the SSD. For example, when the upper-level storage unit is NAND and the storage unit is Die, the value of the indicator item used to characterize the operation results of write, read, and / or erase operations of each NAND in the system log can be found based on the unit identifier set in the SSD to identify the NAND. Alternatively, when the upper-level storage unit is SSD and the storage unit is Die, the value of the indicator item representing the operation results of write, read, and / or erase operations of the SSD in the specified time period can be directly obtained from the system log of the SSD.

[0105] The indicators in this embodiment can be referred to the above description. Figure 2 The flowchart shown introduces the indicator items, which will not be repeated here.

[0106] Step 302: If the value of at least one indicator item that causes a specified event in any upper-level storage unit is greater than a preset second threshold, it is determined that there is a target storage unit in the solid-state drive (SSD) whose storage mode needs to be adjusted.

[0107] The second threshold in step 302 is set based on the minimum requirements for the bit error rate, failure rate, etc. of the upper-level storage unit when the upper-level storage unit can normally perform write operations, read operations, and / or erase operations.

[0108] Step 303: Based on the values ​​of at least one indicator item that causes the specified event in each storage unit that constitutes the upper-level storage unit, as recorded in the system log, the storage unit with the largest value of at least one indicator item that causes the specified event is determined as the target storage unit.

[0109] As an example, when a parent storage unit is detected in step 302 where the value of at least one indicator that causes a specified event is greater than a preset second threshold, the storage unit belonging to the parent storage unit can be found from each storage unit recorded in the system log according to the unit identifier of the parent storage unit. Then, the value of at least one indicator that causes the specified event in the storage unit belonging to the parent storage unit can be found, and the storage unit with the largest value of at least one indicator that causes the specified event can be determined as the target storage unit.

[0110] As an example, if at least one indicator item that causes the specified event in step 303 is an item, then the storage unit with the largest value of at least one indicator item that causes the specified event can be determined as the target storage unit.

[0111] As an example, if there are multiple indicators that cause the specified event in step 303, then for each indicator that causes the specified event, the storage unit with the largest value of at least one indicator that causes the specified event can be determined as the target storage unit. For example, if there are three indicators that cause the specified event, and the value of one indicator that causes the specified event in a storage unit is the largest among all the values ​​of the indicators that cause the specified event in all storage units, then that storage unit is determined as the target storage unit.

[0112] For example, taking the storage unit (i.e., storage cell) as a die and the upper-level storage unit as a NAND in this embodiment as an example, the first indicator and the second indicator that cause the specified event in each NAND in the SSD can be monitored through the SSD's system log. For any NAND, when the values ​​of the first indicator and the second indicator that cause the specified event are both greater than the corresponding threshold, it is determined that there is a target die in the NAND whose storage mode needs to be adjusted. Then, according to the values ​​of at least one indicator that causes the specified event in each die in the NAND recorded in the system log, the die with the largest value of at least one indicator that causes the specified event is determined as the target die.

[0113] This concludes the process. Figure 3 The process is shown below.

[0114] It should be noted that if the system log in this embodiment is obtained through the aforementioned Smart hard drive status determination technology, then the values ​​of at least one indicator item that caused the specified event, obtained in the two embodiments for determining the target storage unit, can be obtained by sending a custom Smart instruction to the controller chip in the SSD to retrieve the value from the system log stored in the SSD's controller chip. Alternatively, the value can be retrieved from the system log obtained from the SSD's controller chip based on a custom Smart instruction. The custom Smart instruction can be implemented using the user-defined instructions reserved in the Smart technology.

[0115] As another embodiment, the SSD is based on the fact that it consists of at least one die, which includes at least a main block and reserved blocks. The reserved blocks are used to replace the main block when write, read, and / or erase operations on the main block fail. However, if the number of reserved blocks in the die is insufficient, it will lead to die-locking. Therefore, in this embodiment, determining whether there is a target storage cell in the SSD with an adjusted storage mode can also be done by detecting whether the number of reserved physical blocks in the wafer die corresponding to the storage cell meets a preset block condition. The specific steps for determining whether there is a target storage cell in the SSD with an adjusted storage mode in this embodiment can be referred to... Figure 4 .

[0116] like Figure 4 As shown, this method includes the following steps:

[0117] Step 401: If the number of verification failures during a write operation on the main block of any die exceeds the preset number of rewrites, check whether the number of reserved blocks in the die is less than the preset minimum number of reserved blocks.

[0118] As an example, if the number of verification failures during a write operation on the primary block of any die exceeds the preset number of rewrites, it indicates that the primary block has failed and needs to be replaced by a reserved block. The data in the primary block is then migrated to the reserved backup block. If the number of reserved blocks in the die is less than the preset minimum number of reserved blocks, it indicates that the die is about to enter a deadlock.

[0119] The following method can be used to determine whether a verification failure occurs during a write operation: When a write operation is performed on a Block in the Die according to the write instruction, if the verification data carried in the write instruction is used to verify the written data and the verification is successful, the write operation is considered successful. If the verification fails, the number of verification failures is recorded. If the number of verification failures is less than the preset number of rewrites, the write operation and verification are performed on the Block in the Die again according to the write instruction.

[0120] Step 402: If yes, then determine that there is a target storage unit in the solid-state drive (SSD) whose storage mode needs to be adjusted.

[0121] Step 403: The die with a number of reserved blocks less than the preset minimum number of reserved blocks is determined as the target storage unit.

[0122] As an example, step 403 may choose to downgrade the current storage mode of all storage particles (i.e., cells) in the die, or may choose to downgrade the current storage mode of at least one cell in at least one undamaged block in the die.

[0123] This concludes the process. Figure 4 The process is shown below.

[0124] It should be noted that, in the specific implementation of the above three methods for determining whether there is a target storage unit in the solid-state drive (SSD) that needs to be adjusted in terms of storage mode, one of the above methods can be applied alone, or two or three of the above methods can be applied in combination. This application does not limit this.

[0125] Optional, in application Figure 2 or Figure 3 The method shown can be pre-set with a period to trigger execution at regular intervals. Figure 2 or Figure 3 The method flow is shown below. Alternatively, execution can be triggered upon detection of a read error, write error, and / or erase error. Figure 2 or Figure 3 The method flow is shown.

[0126] Optional, in application Figure 4 The method shown can be triggered by a write operation on any die. Figure 4 The method shown applies simultaneously Figure 2 or Figure 3 The method shown can also trigger execution simultaneously if a write error or erase error occurs during a write operation on any die. Figure 2 or Figure 3 The method flow is shown.

[0127] Preferably, based on the size of the storage unit die and the ease of management of its quantity within the SSD, the target storage unit in this embodiment can preferably be a target die. However, the target storage unit in this embodiment is not limited to a target die; it can also be an SSD, NAND, block, or other storage unit. It should be noted that when the target storage unit is a relatively small storage unit such as a plane, block, page, or cell, the number of target storage units determined from the SSD in this embodiment can be set to be at least greater than a preset threshold to reduce management costs.

[0128] In this application embodiment, after determining the target storage unit to be adjusted according to any of the above embodiments, the current storage mode of the target storage unit can be downgraded. The specific downgrade method can be referred to in the following embodiments:

[0129] As an example, optionally, before downgrading the current storage mode of the target storage unit, it can be determined whether the current storage mode level of the target storage unit is the lowest level. If it is not the lowest level, the current storage mode of the configured target storage unit can be formatted through the control chip in the SSD, configuring the storage mode of at least one storage chip in the formatted target storage unit to a storage mode with a lower level than the current storage mode of the target storage unit. In this embodiment, the number of information bits stored in the storage mode with a lower level than the current storage mode of the target storage unit is less than the number of information bits stored in the storage chips of the current storage mode of the target storage unit. If it is the lowest level, an alarm can be sent to remind the user that the target storage unit cannot be downgraded further.

[0130] Optionally, if this embodiment is applied to a control chip, the control chip can directly format the current storage mode of the target storage unit. If this embodiment is applied to a central processing unit in an SSD system, the central processing unit needs to send an adjustment instruction to the control chip in the SSD where the target storage unit is located, so that the control chip can downgrade the current storage mode of the target storage unit.

[0131] Optionally, in this embodiment, after downgrading the current storage mode of the target storage unit, a write test can be performed on the target die. By writing test data into the target storage unit after the storage mode has been downgraded, during the process of writing test data, it is determined whether there is a corresponding specified event in the target storage unit. If so, the downgraded storage mode is determined as the current storage mode of the target storage unit, and the current storage mode of the target storage unit is downgraded.

[0132] Optionally, the step size N for each downgrade of the current storage mode of the target storage unit can be preset. When the step size N is 1, it means that the current storage mode of the target storage unit is downgraded by one level each time. When the step size N is 2, it means that the current storage mode of the target storage unit is downgraded by two levels each time. Optionally, this embodiment can also accept externally input levels to adjust the step size of the storage mode downgrade.

[0133] After determining the degradation step size, when degrading the current storage mode of the target storage unit, since the target storage unit will consist of multiple lower-level storage units if it is not the storage unit corresponding to the smallest storage unit Cell in the SSD, the current storage mode of all lower-level storage units in the target storage unit can be reduced by N levels according to the preset degradation step size N. Alternatively, the lower-level storage unit whose value of at least one indicator that causes a specified event is greater than a preset third threshold can be determined as the target lower-level storage unit based on the value of at least one indicator that causes a specified event in each lower-level storage unit of the target storage unit, and the current storage mode of the target lower-level storage unit can be reduced by N levels according to the preset degradation step size N.

[0134] It should be noted that if the downgrade step size is 2, and if the current storage mode of the target storage unit or the target lower-level storage unit is MLC, and there are no other storage modes two levels lower than MLC, then the current storage mode of the target storage unit or the target lower-level storage unit can be directly adjusted to the lowest level. If the adjustment step size is other values, the method described above for an adjustment step size of 2 can also be used.

[0135] For example, assuming the current storage mode downgrade step size is 1, the current storage mode of the target storage unit is QLC, and the current downgrade is to downgrade all lower-level storage units in the target storage unit, then the current storage mode of the target storage unit can be downgraded by one level to TLC. Since each cell in QLC stores 4 bits of information, while each cell in TLC stores 3 bits of information, the maximum number of writes to the target die under QLC is generally 500 times, while the maximum number of writes to the target die under TLC is generally 3000 times. Therefore, after the storage mode of the target die is downgraded by one level, the capacity of the target die will be halved, but the P / E lifetime of the target die will increase.

[0136] As an example, before adjusting the target storage unit, write protection can be enabled on the target storage unit. This write protection restricts write operations to the target storage unit, and then the data in the target storage unit is migrated to another storage medium outside the SSD where the target storage unit is located, to prevent the loss of valid data stored in the target storage unit. In this embodiment, the other storage medium can be another SSD in the storage system where this SSD is located, or other storage media of a different type than the SSD; this application does not impose any limitations on this.

[0137] Optionally, after the storage mode of the target storage unit is downgraded, write protection of the target storage unit can be turned off, and then the valid data that was originally migrated out of the target storage unit can be migrated back to the target storage unit.

[0138] Alternatively, after the storage mode of the target storage unit is downgraded, write protection of the target die can be disabled, and then the target storage unit can be used to process new written data.

[0139] As an example, to facilitate the management of storage units with different storage modes in an SSD, corresponding logical volume LUNs can be set in the SSD according to the various storage modes supported by the target storage unit, so as to manage the SSD through LUNs. In this example, after downgrading the current storage mode of the target storage unit, the SSD will be further notified to modify the LUN corresponding to the current storage mode of the target storage unit to the LUN corresponding to the downgraded target storage unit.

[0140] For example, taking storage modes including QLC, TLC, MLC, and SLC as an example, since the basic storage unit for LUN management in related technologies is a block, in order to facilitate the management of blocks storing data using different storage modes, this embodiment divides the SSD controller chip into four different logical LUNs according to the different block sizes in the four storage modes: QLC, TLC, MLC, and SLC. These four logical LUNs are presented with different logical drive letters in the SSD controller chip, and each LUN corresponds to an independent block management linked list. This is just an example; in actual implementation, the level of each storage mode can be set according to the number of storage modes supported by the SSD.

[0141] If the target storage unit in this embodiment is a Die, then since the basic storage unit managed by the LUN in this embodiment is a Block, the unit of the target lower-level storage unit that can be downgraded in this embodiment is a Block. Taking the downgrade of the current working mode of the target Die in this embodiment as an example, which downgrades the current working mode of all Blocks in the target Die, the following details the modification of the LUN corresponding to the target Die in this embodiment:

[0142] Since the target die's capacity will be halved when its operating mode is reduced by one level in this embodiment, and the capacity of each block in the target die will also be halved, in this embodiment, after the target die is downgraded, the SSD can be notified to modify the LUN corresponding to each block in the target die in the current storage mode to the LUN corresponding to the adjusted storage mode.

[0143] For example, in this embodiment, the four logical LUNs are: LUNq, LUNt, LUNm, and LUNs. LUNq is used to manage blocks in QLC mode; LUNt is used to manage blocks in TLC mode; LUNm is used to manage blocks in MLC mode; and LUNs is used to manage blocks in SLC mode. If the storage mode of the target die is downgraded from QLC to TLC, the LUNs corresponding to each block in the target die will change from LUNq to LUNt.

[0144] As another embodiment, if we take the downgrade of the current working mode of the target Die in this embodiment as an example, when downgrading the current working mode of the target Die, the LUN corresponding to the target Block in the current storage mode can be directly modified to the LUN corresponding to the adjusted storage mode.

[0145] This concludes the process. Figure 1 The process is shown below.

[0146] pass Figure 1 As shown in the flowchart, this application embodiment can downgrade the current storage mode of a target storage unit when it detects that there is a target storage unit in the SSD whose storage mode needs to be adjusted. Since the number of information bits that the target storage unit can store after downgrading is lower than the number of information bits that the target storage unit can store before downgrading, the lifespan of the target storage unit will be increased. In addition, the solution of this application is to determine the storage unit as the target storage unit whose storage mode needs to be adjusted when it is detected that there are read errors, write errors and / or erase errors in any storage unit that meet the corresponding storage mode downgrading adjustment conditions, or when it is detected that the number of reserved physical blocks in the die corresponding to the storage unit meets the preset block conditions. This is to adjust the storage mode of the storage unit before it may be deadlocked, so as to avoid the storage unit becoming unusable due to deadlock.

[0147] The methods provided in the embodiments of this application have been described above. The apparatus provided in the embodiments of this application is described below:

[0148] See Figure 5 , Figure 5 This application provides a schematic diagram of an apparatus for implementing storage management, the apparatus comprising:

[0149] The target storage unit determination module 501 is used to determine whether there is a target storage unit in the solid-state drive (SSD) whose storage mode needs to be adjusted; wherein, when any storage unit has a corresponding specified event, the storage unit is determined to be the target storage unit whose storage mode needs to be adjusted; the specified event includes at least: read error, write error and / or erase error satisfying the corresponding storage mode downgrade adjustment condition; or, the number of reserved physical blocks in the wafer die corresponding to the target storage unit satisfies the preset block condition;

[0150] The storage mode downgrade module 502 is used to downgrade the current storage mode of the target storage unit when it is determined that there is a target storage unit in the SSD whose storage mode needs to be adjusted. The number of information bits that the target storage unit can store after downgrading is lower than the number of information bits that the target storage unit can store before downgrading.

[0151] The target storage unit determination module 501 determines whether there is a target storage unit in the solid-state drive (SSD) whose storage mode needs to be adjusted, including:

[0152] Obtain the system log of the SSD within a specified time period, and determine the value of at least one indicator item in each storage unit that caused the specified event based on the system log;

[0153] For each storage cell, if the value of at least one indicator item in the storage cell that causes the specified event is greater than a preset first threshold, it is determined that there is a target storage cell in the solid-state drive (SSD) whose storage mode needs to be adjusted.

[0154] The target storage unit is determined in the following way:

[0155] For each storage cell, the storage cell whose value of at least one indicator that causes the specified event is greater than a preset first threshold is determined as the target storage cell.

[0156] The SSD comprises multiple storage units forming a higher-level storage unit; the target storage unit determination module 501 determines whether there is a target storage unit in the SSD whose storage mode needs to be adjusted, including:

[0157] Obtain the system log of the SSD within a specified time period, and determine the value of at least one indicator item in the upper-level storage unit that caused the specified event based on the system log;

[0158] If the value of at least one indicator that causes the specified event is greater than a preset second threshold, it is determined that there is a target storage cell in the solid-state drive (SSD) whose storage mode needs to be adjusted.

[0159] The target storage unit is determined in the following way:

[0160] If the value of at least one indicator that causes the specified event in any upper-level storage unit is greater than a preset second threshold, the storage unit with the largest value of at least one indicator that causes the specified event in each storage unit that constitutes the upper-level storage unit, as recorded in the system log, is determined as the target storage unit.

[0161] The at least one indicator that causes the specified event includes at least: a first indicator for recording the number of uncorrectable errors, and / or a second indicator for recording the number of sectors with problems to be determined, and / or a third indicator for recording the number of access verification errors, and / or a fourth indicator for recording the number of programming failures, and / or a fifth indicator for recording the number of erasure failures.

[0162] The SSD is composed of at least one wafer die, and the die includes at least a main block and a reserved block; the reserved block is used to replace the main block.

[0163] The target storage unit determination module 501 determines whether there is a target storage unit in the solid-state drive (SSD) whose storage mode needs to be adjusted, including:

[0164] If the number of verification failures during a write operation on a major block in any die exceeds the preset number of rewrites, check whether the number of reserved blocks in that die is less than the preset minimum number of reserved blocks.

[0165] If so, then it is determined that there is a target storage unit in the SSD whose storage mode needs to be adjusted;

[0166] The target storage unit is determined in the following way:

[0167] Dies whose number of reserved blocks is less than the preset minimum number of reserved blocks are identified as target storage units.

[0168] The target storage unit can be any one of the following types: SSD, NAND flash memory, die, plane, block, page, or cell.

[0169] The target storage unit is composed of multiple lower-level storage units;

[0170] The storage mode downgrade module 502 downgrades the current storage mode of the target storage unit, including:

[0171] The SSD's control chip formats the current storage mode of the configured target storage unit, and configures the storage mode of at least one lower-level storage unit in the formatted target storage unit to a storage mode at a lower level than the current storage mode of the target storage unit; the number of information bits stored in the lower-level storage unit in the storage mode at a lower level than the current storage mode of the target storage unit is less than the number of information bits stored in the lower-level storage unit in the current storage mode of the target storage unit.

[0172] The storage mode downgrade module 502 downgrades the current storage mode of the target storage unit, including:

[0173] According to the preset degradation step size N, the current storage mode of all lower-level storage units in the target storage unit is reduced by N levels;

[0174] Alternatively, based on the values ​​of at least one indicator that causes the specified event in each of the target storage units, the lower-level storage units whose values ​​of at least one indicator that causes the specified event are greater than a preset third threshold are determined as target lower-level storage units, and the current storage mode of the target lower-level storage units is reduced by N levels according to a preset downgrade step size N.

[0175] The device further includes:

[0176] The testing module is used to write test data into the target storage unit after the storage mode has been downgraded. During the process of writing test data, it determines whether there is a corresponding specified event in the target storage unit. If so, the downgraded storage mode is determined as the current storage mode of the target storage unit, and the current storage mode of the target storage unit is downgraded.

[0177] The device further includes:

[0178] The alarm module is used to determine whether the current storage mode level of the target storage unit is the lowest level. If so, an alarm reminder is sent.

[0179] The device further includes:

[0180] The SSD management module is used to set up logical volume (LUN) corresponding to each storage mode in the SSD according to the various storage modes supported by the target storage unit, so as to manage the SSD through the LUN.

[0181] The SSD management module is also used to, after downgrading the current storage mode of the target storage unit, notify the SSD to change the LUN corresponding to the target storage unit from the LUN corresponding to the current storage mode to the LUN corresponding to the downgraded storage mode.

[0182] The device further includes:

[0183] A write protection module is used to enable write protection for the target storage unit, which restricts write operations to the target storage unit; and to migrate the data in the target storage unit to other storage media other than the SSD.

[0184] This concludes the process. Figure 5 The diagram shows a structural embodiment of the device.

[0185] Correspondingly, embodiments of this application also provide a computer program stored in a machine-readable storage medium, which, when executed by a processor, causes the processor to implement the storage management method described above.

[0186] A corresponding hardware structure diagram of an electronic device, specifically as follows: Figure 6 As shown, the electronic device can be a device that implements the storage management method described above. For example... Figure 6 As shown, the hardware architecture includes a processor and memory.

[0187] The memory is used to store machine-executable instructions;

[0188] The processor is used to read and execute machine-executable instructions stored in the memory to implement the memory management method embodiment shown above.

[0189] As one embodiment, the memory can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, etc. For example, the memory can be volatile memory, non-volatile memory, or similar storage media. Specifically, the memory can be RAM (Random Access Memory), flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0190] This concludes the process. Figure 6 Description of the electronic device shown.

[0191] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A storage management method, characterized in that, This method is applied to the controller chip of a solid-state drive (SSD); the SSD is divided into corresponding logical volumes (LUNs) according to different storage modes, each LUN is represented by a different logical drive letter, and each LUN corresponds to an independent block management linked list; the method includes: Determine whether there is a target storage cell in the solid-state drive (SSD) whose storage mode needs to be adjusted; wherein, when any storage cell has a corresponding specified event, the storage cell is determined to be the target storage cell whose storage mode needs to be adjusted; the specified event includes at least: read error, write error and / or erase error satisfying the corresponding storage mode downgrade adjustment condition; or, the number of reserved physical blocks in the wafer die corresponding to the target storage cell satisfies the preset block condition; If it is determined that there is a target storage unit in the SSD whose storage mode needs to be adjusted, the current storage mode of the target storage unit is downgraded, wherein the number of information bits that the target storage unit can store after downgrading is lower than the number of information bits that the target storage unit can store before downgrading. Before downgrading the current storage mode of the target storage unit, write protection is enabled for the target storage unit to restrict write operations to the target storage unit; the data in the target storage unit is then migrated to other storage media besides the SSD. After downgrading the current storage mode of the target storage unit, the SSD is notified to change the LUN corresponding to the target storage unit from the LUN corresponding to the current storage mode to the LUN corresponding to the downgraded storage mode; the write protection of the target storage unit is turned off, and the target storage unit is used to process new written data, wherein the new written data is not valid data that was originally migrated out of the target storage unit.

2. The method according to claim 1, characterized in that, Determining whether a target storage unit with an adjusted storage mode exists in the solid-state drive (SSD) includes: Obtain the system log of the SSD within a specified time period, and determine the value of at least one indicator item in each storage unit that caused the specified event based on the system log; For each storage cell, if the value of at least one indicator item in the storage cell that causes the specified event is greater than a preset first threshold, it is determined that there is a target storage cell in the solid-state drive (SSD) whose storage mode needs to be adjusted. The target storage unit is determined in the following way: For each storage cell, the storage cell whose value of at least one indicator that causes the specified event is greater than a preset first threshold is determined as the target storage cell.

3. The method according to claim 1, characterized in that, The SSD consists of multiple storage units forming a higher-level storage unit; determining whether there is a target storage unit in the SSD whose storage mode needs to be adjusted includes: Obtain the system log of the SSD within a specified time period, and determine the value of at least one indicator item in the upper-level storage unit that caused the specified event based on the system log; If the value of at least one indicator that causes the specified event in any upper-level storage unit is greater than a preset second threshold, it is determined that there is a target storage unit in the solid-state drive (SSD) whose storage mode needs to be adjusted. The target storage unit is determined in the following way: If the value of at least one indicator that causes the specified event in any upper-level storage unit is greater than a preset second threshold, the storage unit with the largest value of at least one indicator that causes the specified event in each storage unit that constitutes the upper-level storage unit, as recorded in the system log, is determined as the target storage unit.

4. The method according to claim 3, characterized in that, The at least one indicator that causes the specified event includes at least: a first indicator for recording the number of uncorrectable errors, and / or a second indicator for recording the number of sectors with problems to be determined, and / or a third indicator for recording the number of access verification errors, and / or a fourth indicator for recording the number of programming failures, and / or a fifth indicator for recording the number of erasure failures.

5. The method according to claim 1, characterized in that, The SSD is composed of at least one wafer die, and the die includes at least a main block and a reserved block; The reserved block is used to replace the main block; Determining whether a target storage unit with an adjusted storage mode exists in the solid-state drive (SSD) includes: If the number of verification failures during a write operation on a major block in any die exceeds the preset number of rewrites, check whether the number of reserved blocks in that die is less than the preset minimum number of reserved blocks. If so, then it is determined that there is a target storage unit in the SSD whose storage mode needs to be adjusted; The target storage unit is determined in the following way: Dies whose number of reserved blocks is less than the preset minimum number of reserved blocks are identified as target storage units.

6. The method according to any one of claims 1 to 5, characterized in that, The target storage unit can be any one of the following types: SSD, NAND flash memory, die, plane, block, page, or cell.

7. The method according to any one of claims 1 to 5, characterized in that, The target storage unit is composed of multiple lower-level storage units; The downgrading of the current storage mode of the target storage unit includes: The SSD's control chip formats the current storage mode of the configured target storage unit, and configures the storage mode of at least one storage sub-unit in the formatted target storage unit to a storage mode at a lower level than the current storage mode of the target storage unit; in the storage mode at a lower level than the current storage mode of the target storage unit, the number of information bits stored in the storage sub-unit is less than the number of information bits stored in the lower-level storage unit in the current storage mode of the target storage unit.

8. The method according to any one of claims 1 to 5, characterized in that, The target storage unit is composed of multiple lower-level storage units; The downgrading of the current storage mode of the target storage unit includes: According to the preset degradation step size N, the current storage mode of all lower-level storage units in the target storage unit is reduced by N levels; Alternatively, based on the values ​​of at least one indicator that causes the specified event in each of the target storage units, the lower-level storage units whose values ​​of at least one indicator that causes the specified event are greater than a preset third threshold are determined as target lower-level storage units, and the current storage mode of the target lower-level storage units is reduced by N levels according to a preset downgrade step size N.

9. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Write test data into the target storage unit after the storage mode has been downgraded; During the process of writing test data, it is determined whether there is a corresponding specified event in the target storage unit. If so, the downgraded storage mode is determined as the current storage mode of the target storage unit, and the current storage mode of the target storage unit is downgraded.

10. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Determine whether the current storage mode level of the target storage unit is the lowest level. If so, send an alarm notification.

11. A storage management device, characterized in that, This device is used in the controller chip of a solid-state drive (SSD); the SSD is divided into corresponding logical volumes (LUNs) according to different storage modes, each LUN is represented by a different logical drive letter, and each LUN corresponds to an independent block management linked list; the device includes: The target storage cell determination module is used to determine whether there is a target storage cell in the solid-state drive (SSD) whose storage mode needs to be adjusted; wherein, when any storage cell has a corresponding specified event, the storage cell is determined to be the target storage cell whose storage mode needs to be adjusted; the specified event includes at least: read error, write error and / or erase error satisfying the corresponding storage mode downgrade adjustment condition; or, the number of reserved physical blocks in the wafer die corresponding to the target storage cell satisfies the preset block condition; The storage mode degradation module is used to downgrade the current storage mode of the target storage unit when it is determined that there is a target storage unit in the SSD whose storage mode needs to be adjusted. The number of information bits that the target storage unit can store after downgrading is lower than the number of information bits that the target storage unit can store before downgrading. The target storage unit determination module determines whether there is a target storage unit in the solid-state drive (SSD) whose storage mode needs to be adjusted, including: Obtain the system log of the SSD within a specified time period, and determine the value of at least one indicator item in each storage unit that caused the specified event based on the system log; For each storage cell, if the value of at least one indicator item in the storage cell that causes the specified event is greater than a preset first threshold, it is determined that there is a target storage cell in the solid-state drive (SSD) whose storage mode needs to be adjusted. The target storage unit is determined in the following way: For each storage cell, the storage cell whose value of at least one indicator that causes the specified event is greater than a preset first threshold is determined as the target storage cell. The SSD consists of multiple storage units forming a higher-level storage unit; the target storage unit determination module determines whether there is a target storage unit in the SSD whose storage mode needs to be adjusted, including: Obtain the system log of the SSD within a specified time period, and determine the value of at least one indicator item in the upper-level storage unit that caused the specified event based on the system log; If the value of at least one indicator that causes the specified event is greater than a preset second threshold, it is determined that there is a target storage cell in the solid-state drive (SSD) whose storage mode needs to be adjusted. The target storage unit is determined in the following way: If the value of at least one indicator that causes the specified event in any upper-level storage unit is greater than a preset second threshold, the storage unit with the largest value of at least one indicator that causes the specified event in each storage unit that constitutes the upper-level storage unit, as recorded in the system log, is determined as the target storage unit. The at least one indicator that causes the specified event includes at least: a first indicator for recording the number of uncorrectable errors, and / or, a second indicator for recording the number of sectors with problems to be determined, and / or, a third indicator for recording the number of access verification errors, and / or, a fourth indicator for recording the number of programming failures, and / or, a fifth indicator for recording the number of erasure failures. The SSD is composed of at least one wafer die, and the die includes at least a main block and a reserved block; the reserved block is used to replace the main block. The target storage unit determination module determines whether there is a target storage unit in the solid-state drive (SSD) whose storage mode needs to be adjusted, including: If the number of verification failures during a write operation on a major block in any die exceeds the preset number of rewrites, check whether the number of reserved blocks in that die is less than the preset minimum number of reserved blocks. If so, then it is determined that there is a target storage unit in the SSD whose storage mode needs to be adjusted; The target storage unit is determined in the following way: Dies with a number of reserved blocks less than the preset minimum number of reserved blocks are identified as target storage units; The target storage unit can be any one of the following types: SSD, NAND flash memory, die, plane, block, page, or cell. The target storage unit is composed of multiple lower-level storage units; The storage mode downgrade module downgrades the current storage mode of the target storage unit, including: The SSD's control chip formats the current storage mode of the configured target storage unit, and configures the storage mode of at least one lower-level storage unit in the formatted target storage unit to a storage mode at a lower level than the current storage mode of the target storage unit; the number of information bits stored in the lower-level storage unit in the storage mode at a lower level than the number of information bits stored in the lower-level storage unit in the current storage mode of the target storage unit is less than the number of information bits stored in the lower-level storage unit in the current storage mode of the target storage unit. The storage mode downgrade module downgrades the current storage mode of the target storage unit, including: According to the preset degradation step size N, the current storage mode of all lower-level storage units in the target storage unit is reduced by N levels; Alternatively, based on the value of at least one indicator that causes the specified event in each of the target storage units, the lower-level storage units whose values ​​of at least one indicator that causes the specified event are greater than a preset third threshold are determined as target lower-level storage units, and the current storage mode of the target lower-level storage units is reduced by N levels according to a preset downgrade step size N. The device further includes: The testing module is used to write test data into the target storage unit after the storage mode has been downgraded. During the process of writing test data, it is determined whether there is a corresponding specified event in the target storage unit. If so, the downgraded storage mode is determined as the current storage mode of the target storage unit, and the current storage mode of the target storage unit is downgraded. The device further includes: The alarm module is used to determine whether the current storage mode level of the target storage unit is the lowest level. If so, an alarm reminder is sent. The device further includes: The SSD management module is used to set up logical volume LUNs corresponding to each storage mode in the SSD according to the various storage modes supported by the target storage unit, so as to manage the SSD through the LUNs; The SSD management module is also used to, after downgrading the current storage mode of the target storage unit, notify the SSD to change the LUN corresponding to the target storage unit from the LUN corresponding to the current storage mode to the LUN corresponding to the downgraded storage mode; disable write protection of the target storage unit; and use the target storage unit to process new written data, wherein the new written data is not valid data that was originally migrated out of the target storage unit. The device further includes: A write protection module is used to enable write protection for the target storage unit, which restricts write operations to the target storage unit; and to migrate the data in the target storage unit to other storage media other than the SSD.

12. A computer program, characterized in that, The computer program is stored in a machine-readable storage medium, and when the processor executes the computer program, it causes the processor to perform the method as described in any one of claims 1-10.

13. An electronic device, characterized in that, The electronic device includes: a processor and memory; The memory is used to store machine-executable instructions; The processor is configured to read and execute machine-executable instructions stored in the memory to implement the method as described in any one of claims 1-10.

Citation Information

Patent Citations

  • Data storage method, data storage device and storage device

    CN112068772A

  • Solid state disk management method and device, electronic equipment and solid state disk

    CN112927749A