A solid state disk management method and electronic device

By pre-allocating pre-configured blocks to the super logic unit during the power-on phase of the solid-state drive and monitoring the response in real time, the problem of conflict between health detection and abnormal power-off is solved, ensuring a balance between system reliability and performance and avoiding data corruption and system crashes.

CN121597135BActive Publication Date: 2026-04-10INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2026-01-29
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies can cause inconsistencies in hard drive status and system crashes when the health detection mechanism conflicts with abnormal power-down scenarios during the power-on initialization process of a solid-state drive.

Method used

During the power-on phase of the solid-state drive, pre-allocate blocks to be pre-configured for multiple super logical units, intelligently determine whether a health check is required, and monitor the response in real time during the check process; if an abnormal power-off causes the check to be interrupted, suspend pending operations to ensure that the hard drive enters a write-prohibited state.

Benefits of technology

By introducing deterministic and global collaborative control mechanisms, data corruption or system crashes caused by inconsistent resource states are avoided, thus improving the balance between system robustness and initialization performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597135B_ABST
    Figure CN121597135B_ABST
Patent Text Reader

Abstract

The application discloses a solid state disk management method and electronic equipment, and relates to the technical field of servers, and comprises the following steps: in the power-on initialization stage of the solid state disk, preallocating to-be-prepositioned blocks for each super logical unit; intelligently judging whether health detection is needed according to the block state, and monitoring the response in real time during the detection process. When the detection is interrupted due to abnormal power-off, all pending operations are suspended and waited for completion, and finally the hard disk is placed in a safe state of write prohibition, so that the problem of data damage or system freezing caused by inconsistent resource states is avoided. By introducing the determinacy of the abnormal process and the global collaborative control mechanism, the technical problem that the system behavior is uncontrollable and the reliability is reduced when the power-on initialization process conflicts with the abnormal power-off scene in the solid state disk supporting health detection is solved, the technical effects of guaranteeing data security, improving system robustness, and realizing the best balance between initialization performance and reliability are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of servers, and in particular to a solid state disk management method and electronic equipment. BACKGROUND

[0002] With the development of high-density technologies such as QLC (Quad-Level Cell) and PLC (Penta-Level Cell) of flash memory, the size of storage units continues to shrink, and the problem of charge leakage is increasingly prominent, resulting in the "rest effect after erasing": when the flash memory block is idle for a long time after erasing, the next write may cause uncorrectable errors due to unstable charge state. To address this problem, the industry has introduced a detection mechanism to perform a health scan on idle blocks when the solid state disk is powered on, and to predict risks by reading data characteristics at a specific voltage, so as to isolate potential faulty blocks before writing and improve data reliability. However, this detection mechanism prolongs the power-on initialization time and increases the probability of conflict with abnormal power-off scenarios. When the detection process is interrupted by sudden power-off, the related blocks may be in an inconsistent state. The related design does not fully consider this compound failure scenario, which may cause firmware state machine confusion, write request processing failure, and even system crash. Therefore, how to implement active health detection while ensuring the determinism and robustness of the solid state disk in extreme situations such as abnormal power-off has become a problem to be solved in high-density flash memory management. SUMMARY

[0003] The present application provides a solid state disk management method and electronic equipment to at least solve the problem of inconsistent state of the hard disk and system crash when the detection mechanism in the related art conflicts with the abnormal power-off scenario.

[0004] The present application provides a solid state disk management method, which comprises: in response to the solid state disk entering a power-on phase, allocating a plurality of to-be-prepared blocks for a plurality of super logical units of the solid state disk; traversing the plurality of to-be-prepared blocks, in response to the current to-be-prepared block being a partially used space block or an idle erased block, determining whether the current to-be-prepared block meets a preset detection trigger condition; in response to the current to-be-prepared block meeting the preset detection trigger condition, generating a health detection request and sending the health detection request to the current to-be-prepared block to obtain a response message returned by the current to-be-prepared block based on the health detection request; in response to the response message being an abort message, suspending subsequent operations of a write management module in the solid state disk until a plurality of response messages returned by the plurality of to-be-prepared blocks are obtained, wherein the plurality of response messages correspond one-to-one to the plurality of to-be-prepared blocks; in response to obtaining the plurality of response messages, sending a power-on completion message to an upstream module of the write management module and triggering the solid state disk to enter a state of prohibiting receiving a write request.

[0005] The application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement at least a solid state disk management method comprising the following steps: in response to the solid state disk entering a power-on stage, allocating a plurality of to-be-prepared blocks for a plurality of super logical units of the solid state disk; traversing the plurality of to-be-prepared blocks, in response to a current to-be-prepared block being a partial space used block or an idle erased block, judging whether the current to-be-prepared block meets a preset detection trigger condition; in response to the current to-be-prepared block meeting the preset detection trigger condition, generating a health detection request and sending the health detection request to the current to-be-prepared block to obtain a response message returned by the current to-be-prepared block based on the health detection request; in response to the response message being an abort message, suspending a subsequent operation of a write management module in the solid state disk until a plurality of response messages returned by the plurality of to-be-prepared blocks are obtained, wherein the plurality of response messages correspond to the plurality of to-be-prepared blocks one by one; and in response to the plurality of response messages being obtained, sending a power-on completion message to an upstream module of the write management module and triggering the solid state disk to enter a state of prohibiting reception of a write request.

[0006] Through the application, to-be-prepared blocks are pre-allocated for each super logical unit in the power-on initialization stage of the solid state disk; whether health detection needs to be performed is intelligently judged according to the block state, and the response is monitored in real time during the detection process. When an abnormal power-off causes interruption of the detection, all pending operations are suspended until they are completed, and finally the hard disk is placed in a safe state of prohibiting writing, thereby avoiding problems of data damage or system freezing possibly caused by inconsistent resource states. Through the introduction of the determinacy of the abnormal flow and the global collaborative control mechanism, the technical problem of uncontrollable system behavior and reduced reliability when the power-on initialization flow and the abnormal power-off scene conflict in the solid state disk supporting health detection is solved, and the technical effects of guaranteeing data safety, improving system robustness, and achieving the best balance between initialization performance and reliability are achieved. BRIEF DESCRIPTION OF DRAWINGS

[0007] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creating any creative labor.

[0008] Figure 1 a flowchart of the solid state disk management method in the first embodiment;

[0009] Figure 2 an internal structure diagram of the electronic device in the second embodiment. DETAILED DESCRIPTION

[0010] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, any other embodiments obtained by a person of ordinary skill in the art without creative effort should be within the protection scope of the present application.

[0011] It should be noted that, in the description of the present application, the terms "comprising", "containing" or any other variants thereof are intended to cover non-exclusive containing, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0012] In order for those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0013] In the first embodiment, as shown in Figure 1 A solid state disk management method is provided, which comprises: in response to the solid state disk entering a power-on stage, allocating a plurality of to-be-prepared blocks for a plurality of super logical units of the solid state disk; traversing the plurality of to-be-prepared blocks, in response to a current to-be-prepared block being a partial space used block or a free erased block, judging whether the current to-be-prepared block meets a preset detection trigger condition; in response to the current to-be-prepared block meeting the preset detection trigger condition, generating a health detection request and sending the health detection request to the current to-be-prepared block to obtain a response message returned by the current to-be-prepared block based on the health detection request; in response to the response message being an abort message, suspending subsequent operations of a write management module in the solid state disk until a plurality of response messages returned by the plurality of to-be-prepared blocks are obtained, wherein the plurality of response messages correspond to the plurality of to-be-prepared blocks one by one; in response to the plurality of response messages being obtained, sending a power-on completion message to an upstream module of the write management module and triggering the solid state disk to enter a state of prohibiting receiving a write request.

[0014] Specifically, the above method establishes a deterministic safety response mechanism in the case of abnormal power-off. When the initialization detection process is abnormally interrupted, the method forces to suspend all operations until all responses are obtained, and then the system enters a safe write-prohibited state, completely avoiding the risk of data damage or system freezing caused by resource inconsistency.

[0015] In specific embodiments, when the solid state disk is powered on, the write management module goes to the drive loading stage. If the write management module initiates health detection on the block, it reads the fast page of the corresponding word line with a VTH1=-32 voltage, obtains the number of zero bits in the read data, and sends a read message. The write management module waits for the return of the completion message from the back-end flash channel controller, which is responsible for transmitting I / O transactions between the front-end control unit and the back-end flash chip. If the hard disk abnormally powers off during the drive loading process, the flash channel controller will return an abort message for the erase request and read request sent by the write management module. If the write management module receives the abort message, it determines whether it has received all response messages from the flash channel controller for all blocks on the super logic unit, including completion messages or abort messages. During this period, the write management module does not perform other tasks and waits for the return of all response messages. When it is determined that all response messages for blocks on the super logic unit have been received, the write management module returns a drive loading completion message. At this time, the write management module may not have any blocks in an open state and cannot accept write requests. The hard disk normally powers off and unloads the drive.

[0016] Further, the solid state disk management method further comprises: in response to the current to-be-prepared block being an idle block, performing an erase operation on the current to-be-prepared block, and obtaining an execution result returned by the current to-be-prepared block based on the erase operation; and in response to the execution result being execution success, suspending subsequent operations of the write management module until a plurality of response messages returned by a plurality of to-be-prepared blocks are obtained.

[0017] Specifically, the above method optimizes the initialization process of the idle block. By directly performing the erase operation instead of redundant detection, the power-on time is shortened, and at the same time, the erase operation is included in the unified abnormal response framework, ensuring the overall consistency and reliability of resource management.

[0018] Further, the solid state disk management method further comprises: in response to the response message being a completion message, comparing the number of data zero bits in the completion message with a preset zero bit quantity threshold to determine the health status of the current to-be-prepared block; performing a corresponding first processing sub-operation, a second processing sub-operation or a third processing sub-operation on the current to-be-prepared block according to the health status of the current to-be-prepared block; and suspending subsequent operations of the write management module until a plurality of response messages returned by a plurality of to-be-prepared blocks are obtained.

[0019] Specifically, the above method realizes predictive health management of sensitive blocks. By actively reading and analyzing the number of zero bits, potential bad blocks (such as forced recycling or erasing) are identified and processed in advance, preventing data write errors caused by the rest effect after erasing from the source, and improving long-term reliability.

[0020] In specific embodiments, if the flash channel controller returns a completion message normally, the write management module determines the health status of the block according to the number of zeros in the completion message. Different manufacturers have different thresholds for the number of zeros, and the manufacturer's data is used for judgment, and the corresponding processing is performed on the block. If there is no abnormal power down, the write management module also needs to wait for the flash channel controller to return the response message of all the blocks on the super logical unit before returning the drive load completion message. This ensures that all blocks on the write management module have completed the health detection process and are healthy blocks that can be used. The drive is normally loaded, and the subsequent hard disk can be used for normal write request reception.

[0021] Further, the solid state disk management method further comprises: in response to obtaining a plurality of response messages returned by a plurality of to-be-preconfigured blocks, and the plurality of response messages being completion messages, sending a power-on completion message to an upstream module, and triggering the solid state disk to enter a state of allowing receiving write requests; in response to obtaining a plurality of response messages returned by a plurality of to-be-preconfigured blocks, and there being an abort message in the plurality of response messages, sending a power-on completion message to an upstream module, and triggering the solid state disk to enter a state of prohibiting receiving write requests.

[0022] Specifically, the above method constructs a globally unified initialization completion decision mechanism. The method decides whether the system is ready based on the final result (all success or failure exists) of all background operations (erasing, detecting), ensuring that the foreground service (write request) is only opened when the underlying resources are completely healthy and available, and achieving strict state isolation.

[0023] Further, the write request at least includes a first type of write request and a second type of write request, and a plurality of to-be-preconfigured blocks are allocated for a plurality of super logical units of the solid state disk, comprising: traversing the plurality of super logical units; allocating a first preset number of to-be-preconfigured blocks corresponding to the first type of write request for the current super logical unit, wherein the first type of write request is a data write request corresponding to the host; allocating a first preset number of to-be-preconfigured blocks corresponding to the second type of write request for the current super logical unit, wherein the second type of write request is a data write request corresponding to the solid state disk; wherein the super logical unit is composed of a second preset number of logical units, and the second preset number is twice the first preset number.

[0024] Specifically, the above method realizes resource isolation and performance guarantee for the host and internal tasks. By pre-allocating dedicated blocks for the two types of write requests, the competition for resources between the background tasks (such as garbage collection) and the foreground host I / O is avoided, the user-perceived write performance is guaranteed, and the resource scheduling logic is simplified.

[0025] In specific embodiments, the first type of write request is a data write request issued by a host, and the second type of write request is a data write request executed by a background task such as garbage collection or wear leveling in the solid state disk. For the same super logical unit, 2 blocks are opened for the first type of write request, and 2 blocks are also opened for the second type of write request, that is, 4 blocks to be pre-configured are opened for a super logical unit. For example, in the case of 8 super logical units in the hard disk, the write management module needs to open 32 blocks in total. Before performing the opening action on each block, the write management module will determine whether it needs to perform health state detection on the block according to the block state.

[0026] Further, the method further includes: obtaining a historical running record of the solid state disk, and determining a plurality of events that have occurred in the solid state disk within a preset historical time window according to the historical running record; obtaining physical state metadata of the current block to be pre-configured, and parsing state duration timing information of the current block to be pre-configured from the physical state metadata, wherein the state duration timing information is used to represent a length of continuous physical time accumulated since the current block to be pre-configured was last successfully executed an erase operation and thus changed to an acceptable programming write physical base state; comparing the historical running record with a preset event record to obtain an event comparison result, and generating a first trigger indication signal according to the event comparison result, wherein the event comparison result is used to represent whether an offline event has occurred in the solid state disk within the preset historical time window, and the offline event represents an event in which the solid state disk is converted from a powered-on working state to a completely powered-off state without internal maintenance power supply; comparing the state duration timing information with a preset time threshold to obtain a time comparison result, and generating a second trigger indication signal according to the time comparison result; and determining whether the current block to be pre-configured meets the preset detection trigger condition according to the first trigger indication signal and the second trigger indication signal.

[0027] Specifically, the above method provides a set of fine and adaptive detection trigger strategies. By combining the system offline event and the block idle time length double conditions, it is intelligently determined whether to perform time-consuming health detection, the unnecessary detection overhead is minimized on the premise of ensuring data reliability, and the initialization efficiency is optimized.

[0028] Further, the method further includes: comparing the historical running record with a preset event record to obtain an event comparison result, and generating a first trigger indication signal according to the event comparison result, including: in response to the event comparison result indicating that at least one offline event has occurred in the solid state disk within the preset historical time window, generating the first trigger indication signal for indicating triggering; and in response to the event comparison result indicating that the solid state disk has been in an online state within the preset historical time window, generating the first trigger indication signal for indicating not triggering.

[0029] Further, the state duration timing information is compared with a preset time threshold to obtain a time comparison result, and a second trigger indication signal is generated according to the time comparison result, including: in response to the time comparison result indicating that the value of the continuous physical time length is greater than or equal to the preset time threshold, generating the second trigger indication signal for indicating triggering; and in response to the time comparison result indicating that the value of the continuous physical time length is less than the preset time threshold, generating the second trigger indication signal for indicating non-triggering.

[0030] Further, according to the first trigger indication signal and the second trigger indication signal, it is determined whether the current to-be-preconfigured block meets the preset detection trigger condition, including: in response to the first trigger indication signal indicating triggering, it is determined that the current to-be-preconfigured block meets the preset detection trigger condition; in response to the first trigger indication signal indicating non-triggering and the second trigger indication signal indicating triggering, it is determined that the current to-be-preconfigured block meets the preset detection trigger condition; and in response to the first trigger indication signal and the second trigger indication signal both indicating non-triggering, it is determined that the current to-be-preconfigured block does not meet the preset detection trigger condition.

[0031] In specific embodiments, if the block does not meet the preset detection trigger condition, it indicates that the block is in a trusted state, and the state of the block is directly set to an open state, which can be used for data writing.

[0032] In addition, according to the health state of the current to-be-preconfigured block, corresponding first processing sub-operation, second processing sub-operation or third processing sub-operation is performed on the current to-be-preconfigured block, including: in response to the current to-be-preconfigured block being in a healthy state, the first processing sub-operation is performed, wherein the first processing sub-operation includes setting the state of the current to-be-preconfigured block to an open state for receiving data writing; in response to the current to-be-preconfigured block being in a non-healthy state and the current to-be-preconfigured block being a partially used block, the second processing sub-operation is performed, wherein the second processing sub-operation includes performing a forced data recycling operation on the current to-be-preconfigured block to migrate valid data stored in the current to-be-preconfigured block, and after completing the forced data recycling operation, another idle block is set to an open state, the other idle block being one idle block outside the to-be-preconfigured blocks allocated by the plurality of super logical units; and in response to the current to-be-preconfigured block being in a non-healthy state and the current to-be-preconfigured block being an idle erased block, the third processing sub-operation is performed, wherein the third processing sub-operation includes performing an erasing operation on the current to-be-preconfigured block, and after completing the erasing operation, setting the state of the current to-be-preconfigured block to an open state.

[0033] Specifically, the above method determines the differential repair strategy after health detection. The healthy block is directly enabled to maximize resource utilization efficiency; the data rescue and replacement are performed on the non-healthy block with data to ensure data security; and the "refresh" erasure is performed on the non-healthy idle block to restore its reliability. This fine operation system optimizes the service life and overall performance of the block resource while repairing potential media defects.

[0034] In specific embodiments, if the detection result is that the block is healthy, the block can be directly opened for use; if the detection result is that the block is in a non-healthy state, the effective data on some used blocks is forcibly recycled, and an idle block is opened; and if the detection result is that the block is in a non-healthy state, the erasing action is performed on the idle erased block, and then the block is opened.

[0035] It should be understood that, although Figure 1 The steps in the flowchart of the method are shown in sequence according to the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps in the method can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be alternately executed with other steps or at least part of the sub-steps or stages of other steps.

[0036] In a second embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program: in response to the solid state disk entering a power-on phase, a plurality of to-be-prepared blocks are allocated to a plurality of super logical units of the solid state disk; a plurality of to-be-prepared blocks are traversed, and in response to a current to-be-prepared block being a partially space-used block or an idle erased block, it is determined whether the current to-be-prepared block satisfies a preset detection trigger condition; in response to the current to-be-prepared block satisfying the preset detection trigger condition, a health detection request is generated and sent to the current to-be-prepared block to obtain a response message returned by the current to-be-prepared block based on the health detection request; in response to the response message being an abortion message, the subsequent operation of a write management module in the solid state disk is suspended until a plurality of response messages returned by the plurality of to-be-prepared blocks are obtained, wherein the plurality of response messages correspond one-to-one to the plurality of to-be-prepared blocks; in response to obtaining the plurality of response messages, a power-on completion message is sent to an upstream module of the write management module, and the solid state disk is triggered to enter a state of prohibiting receiving a write request.

[0037] The program instructions, when read and executed by one or more processors, can also perform operations corresponding to the various steps in the above-described method embodiments. Reference can be made to the above description, which will not be repeated here. Reference Figure 2 An exemplary architecture of the electronic device is shown, which can specifically include a processor 210, a video display adapter 211, a disk drive 212, an input / output interface 213, a network interface 214, and a memory 220. The processor 210, the video display adapter 211, the disk drive 212, the input / output interface 213, the network interface 214, and the memory 220 can be communicatively connected through a communication bus 230.

[0038] The processor 210 can be implemented in the form of a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits, etc., for executing related programs to implement the technical solutions provided in the present application.

[0039] The memory 220 can be implemented in the form of a read only memory (ROM), a random access memory (RAM), a static storage device, a dynamic storage device, etc. The memory 220 can store an operating system 221 for controlling the operation of the electronic device 200, a basic input / output system (BIOS) 222 for controlling the low-level operation of the electronic device 200. In addition, a web browser 223, a data storage management 224, and an icon font processing system 225, etc. can also be stored. The icon font processing system 225 can be an application program that specifically implements the above-mentioned steps in the embodiments of the present application. In summary, when the technical solutions provided in the present application are implemented by software or firmware, the related program codes are stored in the memory 220 and executed by the processor 210.

[0040] The input / output interface 213 is used to connect input / output modules to realize information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. The input devices can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices can include a display, a speaker, a vibrator, an indicator light, etc.

[0041] The network interface 214 is configured to connect a communication module (not shown in the figure) to realize the communication interaction between the device and other devices. The communication module can realize the communication through wired mode (such as USB, network cable, etc.), or through wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0042] The bus 230 includes a path for transmitting information between various components (such as the processor 210, the video display adapter 211, the disk drive 212, the input / output interface 213, the network interface 214, and the memory 220) of the device.

[0043] In addition, the electronic device 200 can also obtain the information of the specific obtaining condition from the virtual resource object obtaining condition information database (not shown in the figure) to be used for the condition judgment.

[0044] It should be noted that although the above electronic device 200 only shows the processor 210, the video display adapter 211, the disk drive 212, the input / output interface 213, the network interface 214, the memory 220, the bus 230, etc., in the specific implementation process, the electronic device can also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device can also only contain the components necessary to implement the scheme of the present application, and does not have to contain all the components shown in the figure.

[0045] From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and the necessary general hardware platform. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes a number of instructions to make an electronic device (which can be a personal computer, a cloud server, or a network device, etc.) execute the methods of various embodiments or some parts of the embodiments of the present application.

[0046] In a third embodiment, a computer readable storage medium is provided, and a computer program is stored on the computer readable storage medium. The computer program, when executed by a processor, implements the following steps: in response to the solid state disk entering a power-on phase, allocating a plurality of to-be-prepared blocks for a plurality of super logical units of the solid state disk; traversing the plurality of to-be-prepared blocks, in response to a current to-be-prepared block being a partially space-used block or an idle erased block, determining whether the current to-be-prepared block satisfies a preset detection trigger condition; in response to the current to-be-prepared block satisfying the preset detection trigger condition, generating a health detection request and sending the health detection request to the current to-be-prepared block to obtain a response message returned by the current to-be-prepared block based on the health detection request; in response to the response message being an abort message, suspending a subsequent operation of a write management module in the solid state disk until a plurality of response messages returned by the plurality of to-be-prepared blocks are obtained, wherein the plurality of response messages correspond to the plurality of to-be-prepared blocks one by one; and in response to the plurality of response messages being obtained, sending a power-on completion message to an upstream module of the write management module and triggering the solid state disk to enter a state of prohibiting reception of a write request.

[0047] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, storage, database or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct RAM bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0048] Any combination of the technical features of the above embodiments can be made. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.

[0049] The above examples only express several embodiments of the present application, and the description is more specific and detailed, but it should not be understood as limiting the scope of the patent. It should be noted that for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are within the scope of protection of the present application.

[0050] In a fourth embodiment, a computer program product is provided, which stores a computer program. When the computer program is executed by a processor, the following steps are implemented: in response to the solid state disk entering a power-on phase, a plurality of pre-allocated blocks are allocated to a plurality of super logical units of the solid state disk; a plurality of pre-allocated blocks are traversed, and in response to the current pre-allocated block being a partially used space block or a free erased block, it is determined whether the current pre-allocated block meets a preset detection trigger condition; in response to the current pre-allocated block meeting the preset detection trigger condition, a health detection request is generated and sent to the current pre-allocated block to obtain a response message returned by the current pre-allocated block based on the health detection request; in response to the response message being an abort message, subsequent operations of a write management module in the solid state disk are suspended until a plurality of response messages returned by the plurality of pre-allocated blocks are obtained, wherein the plurality of response messages correspond one-to-one to the plurality of pre-allocated blocks; in response to obtaining the plurality of response messages, a power-on completion message is sent to an upstream module of the write management module, and the solid state disk is triggered to enter a state of prohibiting reception of a write request.

[0051] In a fourth embodiment, a computer program product is provided, which includes a non-volatile computer readable storage medium storing a computer program. When the computer program is executed by a processor, the following steps are implemented: in response to the solid state disk entering a power-on phase, a plurality of pre-allocated blocks are allocated to a plurality of super logical units of the solid state disk; a plurality of pre-allocated blocks are traversed, and in response to the current pre-allocated block being a partially used space block or a free erased block, it is determined whether the current pre-allocated block meets a preset detection trigger condition; in response to the current pre-allocated block meeting the preset detection trigger condition, a health detection request is generated and sent to the current pre-allocated block to obtain a response message returned by the current pre-allocated block based on the health detection request; in response to the response message being an abort message, subsequent operations of a write management module in the solid state disk are suspended until a plurality of response messages returned by the plurality of pre-allocated blocks are obtained, wherein the plurality of response messages correspond one-to-one to the plurality of pre-allocated blocks; in response to obtaining the plurality of response messages, a power-on completion message is sent to an upstream module of the write management module, and the solid state disk is triggered to enter a state of prohibiting reception of a write request.

[0052] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing relevant hardware, and the computer program can be stored in a computer program product. When the computer program is executed, the computer program can include the processes of the above-mentioned embodiment methods.

[0053] Any combination of the technical features in the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the description.

[0054] The above embodiments only express several implementation manners of the present application, the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application.

Claims

1. A solid state disk management method, characterized by, The method comprises: in response to the solid state disk entering a power-on phase, a plurality of to-be-prepared blocks are allocated for a plurality of super logical units of the solid state disk; traversing the plurality of to-be-prepared blocks, in response to a current to-be-prepared block being a partially space-used block or an idle erased block, judging whether the current to-be-prepared block meets a preset detection trigger condition; in response to the current to-be-prepared block meeting the preset detection trigger condition, generating a health detection request and sending the health detection request to the current to-be-prepared block to obtain a response message returned by the current to-be-prepared block based on the health detection request; in response to the response message being an abort message, suspending subsequent operations of a write management module in the solid state disk until a plurality of response messages returned by the plurality of to-be-prepared blocks are obtained, wherein the plurality of response messages correspond to the plurality of to-be-prepared blocks one by one; in response to obtaining the plurality of response messages, sending a power-on completion message to an upstream module of the write management module and triggering the solid state disk to enter a state of prohibiting receiving a write request.

2. The method of claim 1, wherein, The method further comprises: in response to the current to-be-prepared block being an idle block, performing an erase operation on the current to-be-prepared block and obtaining an execution result returned by the current to-be-prepared block based on the erase operation; in response to the execution result being execution success, suspending subsequent operations of the write management module until the plurality of response messages returned by the plurality of to-be-prepared blocks are obtained.

3. The method of claim 1, wherein, The method further comprises: in response to the response message being a completion message, comparing a number of zero bits in the completion message with a preset zero bit quantity threshold to judge a health status of the current to-be-prepared block; performing a corresponding first processing sub-operation, a second processing sub-operation or a third processing sub-operation on the current to-be-prepared block according to the health status of the current to-be-prepared block; suspending subsequent operations of the write management module until the plurality of response messages returned by the plurality of to-be-prepared blocks are obtained.

4. The method of claim 3, wherein, The method further comprises: in response to obtaining the plurality of response messages returned by the plurality of to-be-prepared blocks and the plurality of response messages all being the completion messages, sending the power-on completion message to the upstream module and triggering the solid state disk to enter a state of allowing receiving the write request; in response to obtaining the plurality of response messages returned by the plurality of to-be-prepared blocks and the abort message existing in the plurality of response messages, sending the power-on completion message to the upstream module and triggering the solid state disk to enter the state of prohibiting receiving the write request.

5. The method according to any one of claims 1 to 4, characterized in that, The write request at least comprises a first type of write request and a second type of write request, and the allocating a plurality of to-be-prepared blocks for a plurality of super logical units of the solid state disk comprises: traversing the plurality of super logical units; allocating a first preset number of to-be-prepared blocks corresponding to the first type of write request for a current super logical unit, wherein the first type of write request is a data write request corresponding to a host. allocating the first preset number of to-be-prepared blocks corresponding to the second type of write request to the current super logical unit, wherein the second type of write request is a data write request corresponding to the solid state disk; wherein the super logical unit is composed of a second preset number of logical units, and the second preset number is twice the first preset number.

6. The method of claim 1, wherein, The judgment whether the current to-be-prepared block meets the preset detection trigger condition comprises: obtaining a historical running record of the solid state disk, and determining a plurality of events that have occurred in a preset historical time window of the solid state disk according to the historical running record; obtaining physical state metadata of the current to-be-prepared block, and parsing state duration timing information of the current to-be-prepared block from the physical state metadata, wherein the state duration timing information is used to represent a length of continuous physical time accumulated since the current to-be-prepared block was last successfully executed an erase operation and thus changed to an acceptable programming write physical base state; comparing the historical running record with a preset event record to obtain an event comparison result, and generating a first trigger indication signal according to the event comparison result, wherein the event comparison result is used to represent whether an offline event has occurred in the preset historical time window of the solid state disk, and the offline event represents an event that the solid state disk is converted from a powered-on working state to a completely powered-off state without internal maintenance power supply; comparing the state duration timing information with a preset time threshold to obtain a time comparison result, and generating a second trigger indication signal according to the time comparison result; judging whether the current to-be-prepared block meets the preset detection trigger condition according to the first trigger indication signal and the second trigger indication signal.

7. The method of claim 6, wherein, The comparison of the historical running record with the preset event record to obtain an event comparison result, and the generation of a first trigger indication signal according to the event comparison result, comprises: in response to the event comparison result representing that the solid state disk has occurred at least once the offline event in the preset historical time window, generating the first trigger indication signal for indicating triggering; in response to the event comparison result representing that the solid state disk has been in an online state in the preset historical time window, generating the first trigger indication signal for indicating no triggering.

8. The method of claim 7, wherein, The comparison of the state duration timing information with a preset time threshold to obtain a time comparison result, and the generation of a second trigger indication signal according to the time comparison result, comprises: in response to the time comparison result representing that the value of the continuous physical time length is greater than or equal to the preset time threshold, generating the second trigger indication signal for indicating triggering; in response to the time comparison result representing that the value of the continuous physical time length is less than the preset time threshold, generating the second trigger indication signal for indicating no triggering.

9. The method of claim 8, wherein, The judgment whether the current to-be-prepared block meets the preset detection trigger condition according to the first trigger indication signal and the second trigger indication signal, comprises: in response to the first trigger indication signal indicating triggering, determining that the current block to be preset meets the preset detection trigger condition; in response to the first trigger indication signal indicating non-triggering and the second trigger indication signal indicating triggering, determining that the current block to be preset meets the preset detection trigger condition; in response to the first trigger indication signal and the second trigger indication signal both indicating non-triggering, determining that the current block to be preset does not meet the preset detection trigger condition.

10. An electronic device, comprising: comprising: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the solid state disk management method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Data integrity detection method, system and device for solid state disk and storage medium

    CN111653307A

  • Long-term stability test processing method and device for solid state disk

    CN118351922A