Method and device for reducing SSD reset failure rate, equipment and medium

By introducing an internal timer and an active error status reporting mechanism into the SSD, the reset problem caused by the failure of the abort command is solved, improving the stability and reliability of the storage system and avoiding forced reset caused by the failure of the abort command.

CN121455413APending Publication Date: 2026-02-03成都芯忆联信息技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511580049.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Solid-state drives (SSDs) may force a reset when processing timeout commands due to command abort failure, resulting in interruption of input/output operations and potential data loss or corruption.

Method used

Upon receiving a command from the host, an internal timer is started, with a duration shorter than the command timeout duration set by the host. The timer monitors the command processing progress in real time and proactively reports error status information to the host before completion, thus avoiding the issuance of a stop command and clearing related data.

Benefits of technology

This effectively avoids forced resets caused by SSD abort command failures, improving the stability and reliability of the storage system and preventing data loss and damage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121455413A_ABST
    Figure CN121455413A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a device, equipment and a medium for reducing the SSD reset failure rate, and relates to the technical field of solid state disks, and the method comprises the steps that if a command issued by a host is received, an internal timer is started, and the timing duration of the internal timer is smaller than the command timeout duration set by the host for the command; judging whether the processing of the command is completed before the timing duration of the internal timer is overtime; and if the processing of the command is not completed before the timing duration of the internal timer is overtime, reporting state information indicating that the command is executed wrongly to the host before the overtime duration of the command is reached, the host is configured to perform error processing based on the status information without issuing an abortion command for aborting the command. According to the method and the device, the forced SSD reset caused by failure of processing the interrupt command after the SSD command is overtime can be avoided, so that the stability of a storage system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of solid state disk, and particularly relates to a method and device for reducing the reset failure rate of SSD, equipment and medium. BACKGROUND

[0002] In a computer data storage system, a solid state disk (SSD) as a high-performance storage device communicates with a host. In this communication architecture, the host is responsible for issuing two main types of commands to the SSD: one type is an IO command for data read / write operation, and the other type is an admin command for performing device management and control functions. To ensure that the system can respond and handle abnormal situations in a timely manner, the host side will start an internal timing mechanism, i.e. a timeout timer, simultaneously after issuing each command, to set a maximum allowable time limit for the execution of the command.

[0003] Under this mechanism, the SSD needs to complete the processing of the command within the predetermined timeout window and notify the host that the command has been executed by returning a specific completion state data structure (i.e. Completion Queue Entry, CQE). This is the ideal interaction process under normal circumstances. However, in actual operation, the SSD may fail to complete the command processing and feedback the CQE signal within the timeout period set by the host due to internal firmware processing congestion, flash access delay, or temporary hardware resource conflicts and other complex factors.

[0004] Once the host monitors that the preset timeout time has been consumed without receiving the CQE response from the SSD, it will determine that the command execution has timed out. To clean up this abnormal state and release related resources, the standard operation process of the host is to issue a specific abort command to the SSD, which aims to request the SSD to immediately terminate the execution of the timeout command. In theory, the SSD should successfully process this abort command and confirm to the host that the abort operation has been completed, so that the host can safely end the tracking and management of the command.

[0005] However, the problem is that the SSD side may also face the risk of failure when processing this abort command. When the SSD fails to successfully process the abort command, it will return an abort fail status indication to the host.

[0006] After receiving the notification of the failure of the abort command execution, the host will determine it as a serious communication failure that cannot be recovered by a regular command according to its error handling strategy and the design of the driver. In this scenario, the host usually takes the highest level of recovery measures, i.e., initiates a hardware reset operation on the SSD, to ensure the stability and data consistency of the overall system. The reset operation forces the SSD to enter a reinitialization process, which inevitably causes all ongoing input / output operations to be interrupted, temporarily unavailable, and may even cause potential data loss or damage in extreme cases. SUMMARY

[0007] Embodiments of the present application provide a method, device, equipment and medium for reducing the reset failure rate of an SSD, aiming to solve the technical problem of how to avoid the forced reset of the SSD caused by the failure of the abort command after the timeout of the SSD command, thereby improving the stability of the storage system.

[0008] In a first aspect, embodiments of the present application provide a method for reducing the reset failure rate of an SSD, comprising: starting an internal timer if a command issued by a host is received, the timing duration of the internal timer being less than the command timeout duration set by the host for the command; determining whether the processing of the command is completed before the timing duration of the internal timer expires; if the processing of the command is not completed before the timing duration of the internal timer expires, reporting state information indicating the execution error of the command to the host before the command timeout duration arrives, so that the host performs error handling based on the state information without issuing an abort command for aborting the command.

[0009] Further technical solutions are that the reporting of the state information indicating the execution error of the command to the host comprises: marking the command as an invalid command; setting a state field in a state data structure for indicating the completion of a command to an error state; returning the state data structure carrying the error state to the host.

[0010] Further technical solutions are that the method further comprises: discarding all data associated with the command on the internal processing link of the solid state disk.

[0011] Further technical solutions are that the method further comprises: if the processing of the command is completed before the timing duration of the internal timer expires, clearing the internal timer. setting a status field in a status data structure indicating completion of the command to a success status; returning the status data structure carrying the success status to the host.

[0012] Further, a timing duration of the internal timer is set and adjusted by a firmware configuration parameter.

[0013] Further, the command issued by the host is an input / output command or a management command defined by an NVMe protocol.

[0014] Further, the status information is reported to the host by a CQE data structure.

[0015] In a second aspect, the embodiments of the present application further provide a device for reducing the reset failure rate of an SSD, which comprises units for executing the above method.

[0016] In a third aspect, the embodiments of the present application further provide a computer device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the above method when executing the computer program.

[0017] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, which stores a computer program, and the computer program can implement the above method when executed by a processor.

[0018] The embodiments of the present application provide a method, device, equipment and medium for reducing the reset failure rate of an SSD. The method comprises: if a command issued by a host is received, starting an internal timer, the timing duration of the internal timer is shorter than the command timeout duration set by the host for the command; determining whether the processing of the command is completed before the timing duration of the internal timer expires; if the processing of the command is not completed before the timing duration of the internal timer expires, reporting status information indicating that the command execution is erroneous to the host before the command timeout duration arrives, so that the host performs error processing based on the status information without issuing a stop command for stopping the command. The present application starts an internal timer shorter than the timeout duration of the host to actively monitor after the solid state disk receives the command of the host. If the command processing is not completed within the time, the solid state disk actively reports the command error status to the host in advance. This makes the host call the conventional error processing flow before the command timeout is perceived, thereby completely avoiding the issuance of the stop command and the chain reaction of triggering the forced reset of the solid state disk due to the processing failure, fundamentally and significantly reducing the reset failure rate of the solid state disk and improving the stability and reliability of the storage system. BRIEF DESCRIPTION OF DRAWINGS

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

[0020] Figure 1 A flowchart of a method for reducing the reset failure rate of an SSD is provided for the embodiments of the present application. Figure 2 A schematic block diagram of a computer device is provided for the embodiments of the present application. DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present application.

[0022] It should be understood that the terms “comprise” and “include” as used in the specification and the appended claims indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0023] It should also be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, unless otherwise clearly indicated by the context, the singular forms “a”, “an” and “the” are intended to include the plural forms.

[0024] It should be further understood that the term “and / or” as used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0025] As used in the present application specification and the appended claims, the term “if’ can be interpreted as “when” or “upon” or “in response to determining” or “in response to detecting” depending on the context. Similarly, the phrases “if it is determined” or “if [the described condition or event] is detected” can be interpreted to mean “upon determining” or “in response to determining” or “upon detecting [the described condition or event]” or “in response to detecting [the described condition or event]” depending on the context.

[0026] Referring to Figure 1 The embodiment of the present application provides a method for reducing the reset failure rate of an SSD, which can effectively avoid the forced reset caused by the command timeout of the solid state disk and the failure of the command abortion in the process, thereby significantly improving the overall stability of the storage system. Specifically, the method comprises the following steps: S1, if a command issued by a host is received, an internal timer is started, and the timing duration of the internal timer is less than the command timeout duration set by the host for the command.

[0027] In specific implementation, when the solid state disk receives a command issued by a host, an internal timer is immediately started, and the timing duration of the internal timer is set to be shorter than the command timeout duration set by the host for the command. The embodiment of the present application provides a key time buffer window by setting the internal timer, so that the solid state disk can perceive the potential timeout risk before the host, thereby transferring the monitoring initiative of the command processing state from the host to the solid state disk itself. This is the premise for the whole method to take effect, which changes the situation that the solid state disk is passively waiting for the judgment of the host in the traditional architecture.

[0028] In some preferred embodiments, the timing duration of the internal timer is set and adjusted through a firmware configuration parameter.

[0029] In specific implementation, different host systems, different application scenarios, and even different solid state disk models may have different tolerances for command processing delay and different command timeout durations set by the host. A fixed and rigid internal timing duration cannot meet such diversified requirements, and may cause unnecessary performance degradation due to the early reporting of errors in some scenarios, or fail to prevent reset due to the late reporting of errors in other scenarios. By setting the timing duration as a firmware-configurable parameter, the solid state disk manufacturer, system integrator and even end user are provided with a flexible strategy adjustment switch. They can dynamically adjust the width of the time window according to the specific hardware performance, software load characteristics and reliability requirements. For example, in a high-performance computing environment that is extremely sensitive to delay, the value can be set relatively loose to reduce false positives, and in a data center storage node that requires absolute stability, the value can be set more aggressively to maximize the prevention of reset.

[0030] In some preferred embodiments, the command issued by the host is an input / output command or a management command defined in the NVMe protocol.

[0031] In specific implementation, the NVMe protocol is the mainstream industry standard for communication between the solid state disk and the host at present, and the input / output commands and management commands defined by the protocol cover all key operations of the solid state disk.

[0032] S2, determining whether the processing of the command is completed before the timing duration of the internal timer expires.

[0033] In specific implementation, the solid state disk continuously determines whether the processing of the command can be completed before the internal timer expires. This determination step is the decision pivot of triggering different processing paths, which ensures that the system can evaluate the execution progress of the command in real time and guide the flow to the most suitable branch according to the evaluation result. If the determination result is that the processing can be completed before the internal timer expires, the flow enters the normal successful response path.

[0034] S3, if the processing of the command is not completed before the timing duration of the internal timer expires, reporting state information indicating that the command execution is an error to the host before the timeout duration of the command arrives, so that the host performs error processing based on the state information without issuing a stop command for stopping the command.

[0035] In specific implementation, if the determination result is that the processing cannot be completed before the internal timer expires, the method performs the most critical operation step, that is, actively reporting state information indicating that the command execution is an error to the host before the timeout duration of the command of the host actually arrives.

[0036] This active reporting step is the direct reason for the decisive effect of the entire technical solution. Instead of simply reporting a failure, it performs a standardized and advanced communication interaction. By reporting the error state in advance, the solid state disk essentially transmits a clear and understandable processing completion signal to the host, although the signal carries an error state. This behavior makes the host driver receive a definite completion feedback about the command before the timeout timer of the host is triggered. Therefore, based on the state information, the host will call its regular error processing flow and will not rely on the issuance of a stop command, which is an extreme intervention measure aimed at forcibly terminating the unknown state command.

[0037] Since the stop command will not be issued at all, all risks that may be caused by the stop command in the future are completely eliminated. This includes the case that the solid state disk may fail to successfully process the stop command due to internal state disorder or resource lock contention, and the final consequence that the host finally triggers a forced reset operation due to the failure to process the stop command. The entire chain of cascading failures caused by the delay of the initial command is actively truncated before reaching the step of the stop command.

[0038] In some preferred embodiments, the step of "reporting the status information indicating the error of the command execution to the host" specifically comprises the following steps: marking the command as an invalid command; setting a status field in a status data structure used to indicate the completion of a command to an error status; and returning the status data structure carrying the error status to the host.

[0039] In specific implementation, through the step of "marking the command as an invalid command", the solid state disk can systematically isolate the faulty command, prevent its invalid state from polluting the subsequent command processing flow or resource allocation, and ensure the consistency of the internal state of the hard disk. Then, the operation of "setting a status field in a status data structure used to indicate the completion of a command to an error status" is the key to building a standardized communication. It uses the preset and commonly understood state exchange protocol between the host and the solid state disk, i.e. the status data structure, to transmit an explicit and unambiguous error signal to the host by accurately setting the status field in it. Finally, "returning the status data structure carrying the error status to the host" completes the closed loop of the entire error reporting. This series of coherent actions ensures that the host receives not a simple fault notification, but a complete and clear command completion response, except that it is a failed completion response. This allows the host's driver to process this error according to the established protocol process as it would handle other regular completion responses, greatly improving the efficiency and certainty of error handling and avoiding secondary abnormalities that may be caused by the confusion of error information format or unclear meaning.

[0040] In some preferred embodiments, the status information is reported to the host through a CQE data structure.

[0041] In specific implementation, CQE is the abbreviation of Completion Queue Entry, which can be translated into Chinese as "completion queue entry". CQE is a "receipt" or "status report" used by a solid state disk (SSD) to report the final state of a certain command processing to a host (Host).

[0042] CQE is a standard data structure specified in the NVMe protocol, which is specifically used to carry the completion status of a command. The hardware and software stack on the host side are designed from the beginning to receive and process CQE. By using CQE to report the error status, the present application reuses the existing and highly optimized communication pipeline. This means that the host does not need to add new parsing logic, create new data structures, or open new interrupt paths to handle the error report of the present application; the existing driver program of the host can receive and interpret this early reported error as it would handle a normal, actively returned command completion status by the SSD.

[0043] In some preferred embodiments, the method further comprises the step of discarding all data associated with the command on the internal processing link within the solid state drive.

[0044] In implementation, when a command is marked as invalid, the data associated with it can have partially entered the complex processing pipeline within the solid state drive, for example, it can be waiting for flash access or in the process of data transmission. If these residual data are not cleaned up, they will continue to occupy valuable processing resources such as buffer, queue position or bus bandwidth, and can cause resource competition or state conflict with subsequent newly issued commands, thereby causing new unpredictable errors. By actively and thoroughly discarding these associated data, the solid state drive performs a cleanup for the invalid command, immediately releases all occupied internal resources, and enables the hard drive to quickly recover to a clean and usable ready state to welcome new commands.

[0045] In some preferred embodiments, the method further comprises the steps of: if the processing of the command is completed before the timing duration of the internal timer expires, clearing the internal timer; setting a status field in a status data structure indicating completion of the command to a success status; and returning the status data structure carrying the success status to the host.

[0046] In implementation, when the command is successfully completed before the internal timer expires, the operation of "clearing the internal timer" immediately prevents unnecessary timeout triggering of the timer and avoids any error handling process that can be started due to the false triggering, thereby saving the processing capacity and time that would otherwise be occupied by the error process. Subsequently, "setting a status field in a status data structure indicating completion of the command to a success status" and "returning it to the host" constitute a standard success response process that fully meets the expectations of the host. This shows that the active monitoring mechanism of the present application improves the robustness of system exception handling while not interfering with or slowing down the efficiency of command execution under normal circumstances. The success path and the error path are clearly and independently processed, so that the solid state drive can make the most appropriate response under any scenario. This coordinated management of normal and abnormal processes ensures that the system still maintains high performance in most successful scenarios, and intelligently degrades in a small number of abnormal scenarios, achieving the best balance between system performance and reliability as a whole.

[0047] The embodiment of the present application provides a method for reducing the reset failure rate of an SSD, which comprises the following steps: if a command issued by a host is received, starting an internal timer, wherein the timing duration of the internal timer is shorter than the command timeout duration set by the host for the command; determining whether the processing of the command is completed before the timing duration of the internal timer expires; if the processing of the command is not completed before the timing duration of the internal timer expires, reporting state information indicating that the command execution is incorrect to the host before the command timeout duration arrives, so that the host performs error processing based on the state information without issuing a stop command for stopping the command. The solid state disk starts an internal timer shorter than the timeout duration of the host to actively monitor after receiving the command of the host. If the command processing cannot be completed within the time, the solid state disk actively reports the command error state to the host in advance. This makes the host call the conventional error processing flow before the command timeout is perceived, thereby completely avoiding the issuance of the stop command and the chain reaction of triggering the forced reset of the solid state disk due to the processing failure, and fundamentally and significantly reducing the reset failure rate of the solid state disk and improving the stability and reliability of the storage system.

[0048] Corresponding to the above method for reducing the reset failure rate of an SSD, the present application also provides a device for reducing the reset failure rate of an SSD. The device for reducing the reset failure rate of an SSD comprises units for executing the above method for reducing the reset failure rate of an SSD, and the device for reducing the reset failure rate of an SSD can be configured in a desktop computer, a tablet computer, a laptop computer or the like. Specifically, the device for reducing the reset failure rate of an SSD comprises: a starting unit, configured to start an internal timer if a command issued by a host is received, wherein the timing duration of the internal timer is shorter than the command timeout duration set by the host for the command; a determining unit, configured to determine whether the processing of the command is completed before the timing duration of the internal timer expires; a reporting unit, configured to report state information indicating that the command execution is incorrect to the host before the command timeout duration arrives if the processing of the command is not completed before the timing duration of the internal timer expires, so that the host performs error processing based on the state information without issuing a stop command for stopping the command.

[0049] In some preferred embodiments, the reporting of the state information indicating that the command execution is incorrect to the host comprises the following steps: marking the command as an invalid command; setting a state field in a state data structure for indicating the completion of the command to an error state; returning the state data structure carrying the error state to the host. In some preferred embodiments, the reporting of the state information indicating that the command execution is incorrect to the host comprises the following steps:

[0050] In some preferred embodiments, the device for reducing the reset failure rate of the SSD further comprises: a discarding unit configured to discard all data associated with the command on an internal processing link of the SSD.

[0051] In some preferred embodiments, the device for reducing the reset failure rate of the SSD further comprises: a clearing unit configured to clear the internal timer if the processing of the command is completed before the timing duration of the internal timer expires; a setting unit configured to set a status field in a status data structure indicating completion of the command to a success status; a returning unit configured to return the status data structure carrying the success status to the host.

[0052] In some preferred embodiments, the timing duration of the internal timer is set and adjusted by a firmware configuration parameter.

[0053] In some preferred embodiments, the command issued by the host is an input / output command or a management command defined by the NVMe protocol.

[0054] In some preferred embodiments, the status information is reported to the host through a CQE data structure.

[0055] It should be noted that the specific implementation process of the above device for reducing the reset failure rate of the SSD and each unit can be clearly understood by those skilled in the art, which can be referred to the corresponding description in the foregoing method embodiments. For the convenience and brevity of description, it will not be repeated here.

[0056] The above device for reducing the reset failure rate of the SSD can be implemented in the form of a computer program, which can run on a computer device as shown in Figure 2 .

[0057] Please refer to Figure 2 , Figure 2 is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 can be a terminal or a server, wherein the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, and an electronic device with a communication function. The server can be a stand-alone server or a server cluster composed of multiple servers.

[0058] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, wherein the memory can include a non-volatile storage medium 503 and an internal memory 504.

[0059] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, can cause the processor 502 to perform a method for reducing the reset failure rate of an SSD.

[0060] The processor 502 is configured to provide computing and control capabilities to support the operation of the entire computer device 500.

[0061] The non-volatile storage medium 503 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503. The computer program 5032, when executed by the processor 502, can cause the processor 502 to perform a method for reducing the reset failure rate of an SSD.

[0062] The network interface 505 is configured to perform network communication with other devices. Those skilled in the art can understand that the above structure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device 500 to which the scheme of the present application is applied. The specific computer device 500 can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0063] The processor 502 is configured to run the computer program 5032 stored in the memory to implement the following steps: If a command issued by a host is received, start an internal timer, and the timing duration of the internal timer is less than the command timeout duration set by the host for the command; Determine whether the processing of the command is completed before the timing duration of the internal timer expires; If the processing of the command is not completed before the timing duration of the internal timer expires, report state information indicating that the command execution is erroneous to the host before the command timeout duration arrives, so that the host performs error processing based on the state information without issuing a stop command for stopping the command.

[0064] In some preferred embodiments, the reporting of the state information indicating that the command execution is erroneous to the host comprises: Marking the command as an invalid command; Setting a state field in a state data structure for indicating command completion to an error state; Returning the state data structure carrying the error state to the host.

[0065] In some preferred embodiments, the method further comprises: Discarding all data associated with the command on the internal processing link of the solid state disk.

[0066] In some preferred embodiments, the method further comprises: clearing the internal timer if the processing of the command is completed before the timing duration of the internal timer expires; setting a status field in a status data structure indicating completion of a command to a success status; returning the status data structure carrying the success status to the host.

[0067] In some preferred embodiments, the timing duration of the internal timer is set and adjusted by a firmware configuration parameter.

[0068] In some preferred embodiments, the command issued by the host is an input / output command or a management command defined by the NVMe protocol.

[0069] In some preferred embodiments, the status information is reported to the host by a CQE data structure.

[0070] It should be understood that, in the embodiments of the present application, the processor 502 can be a central processing unit (CPU), and the processor 502 can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0071] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiments of the method can be completed by a computer program instructing related hardware. The computer program can be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the above-mentioned embodiments of the method.

[0072] Therefore, the present application further provides a storage medium. The storage medium can be a computer-readable storage medium. The storage medium stores a computer program. The computer program is executed by a processor to make the processor perform the following steps: if a command issued by a host is received, starting an internal timer, the timing duration of the internal timer being less than a command timeout duration set by the host for the command; determining whether the processing of the command is completed before the timing duration of the internal timer expires; if the processing of the command is not completed before the timing duration of the internal timer expires, reporting state information indicating that the command execution is erroneous to the host before the command timeout duration arrives, so that the host performs error processing based on the state information without issuing a cancel command for canceling the command.

[0073] In some preferred embodiments, the reporting state information indicating that the command execution is erroneous to the host comprises: marking the command as an invalid command; setting a status field in a status data structure indicating command completion to an error status; returning the status data structure carrying the error status to the host.

[0074] In some preferred embodiments, the method further comprises: discarding all data associated with the command on an internal processing link of the solid state disk.

[0075] In some preferred embodiments, the method further comprises: if the processing of the command is completed before the timing duration of the internal timer expires, clearing the internal timer; setting a status field in a status data structure indicating command completion to a success status; returning the status data structure carrying the success status to the host.

[0076] In some preferred embodiments, the timing duration of the internal timer is set and adjusted by a firmware configuration parameter.

[0077] In some preferred embodiments, the command issued by the host is an input / output command or a management command defined by the NVMe protocol.

[0078] In some preferred embodiments, the state information is reported to the host through a CQE data structure.

[0079] The storage medium is a physical, non-transient storage medium, which can be a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, etc. Various physical storage media that can store program codes. The computer readable storage medium can be non-volatile or volatile.

[0080] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in the above description in a general manner. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0081] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and actual implementation can have another division manner. For example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed.

[0082] The steps in the method embodiments of the present application can be adjusted, combined and deleted in sequence according to actual needs. The units in the device embodiments of the present application can be combined, divided and deleted according to actual needs. In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.

[0083] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a storage medium. Based on such understanding, the technical solutions of the present application essentially or say the parts that make contributions to the prior art, or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a terminal or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application.

[0084] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0085] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, these modifications and variations of the present application are intended to be included within the scope of the claims of the present application and their equivalent technologies. The present application also intends to include these modifications and variations.

[0086] The above merely illustrates the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any skilled person in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements shall be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for reducing the reset failure rate of an SSD, the method comprising: The method comprises: if a command issued by a host is received, starting an internal timer, wherein a time length of the internal timer is less than a command timeout length set by the host for the command; determining whether processing of the command is completed before the time length of the internal timer expires; if the processing of the command is not completed before the time length of the internal timer expires, reporting state information indicating that the command execution is erroneous to the host before the command timeout length arrives, so that the host performs error processing based on the state information without issuing a stop command for stopping the command.

2. The method of claim 1, wherein, The reporting of the state information indicating that the command execution is erroneous to the host comprises: marking the command as an invalid command; setting a state field in a state data structure indicating command completion to an error state; returning the state data structure carrying the error state to the host.

3. The method of claim 2, wherein, The method further comprises: discarding all data associated with the command on an internal processing link of a solid state disk.

4. The method of claim 1, wherein, The method further comprises: if the processing of the command is completed before the time length of the internal timer expires, clearing the internal timer; setting a state field in a state data structure indicating command completion to a success state; returning the state data structure carrying the success state to the host.

5. The method of claim 1, wherein, The time length of the internal timer is set and adjusted by a firmware configuration parameter.

6. The method of claim 1, wherein, The command issued by the host is an input / output command or a management command defined by an NVMe protocol.

7. The method of claim 1, wherein, The state information is reported to the host by a CQE data structure.

8. An apparatus for reducing a reset failure rate of an SSD, the apparatus comprising: The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method when executing the computer program.

9. A computer device, comprising: The storage medium stores a computer program, and the computer program can implement the method when executed by a processor.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program can implement the method when executed by a processor.