Resetting method and device of storage equipment, electronic equipment and physical machine system

By querying the reset status information on the storage device and performing asynchronous event reporting, only the abnormal function engine is reset, which solves the impact of the storage device reset process on system stability and reliability, and achieves timely and reliable reset of the storage device.

CN118567457APending Publication Date: 2024-08-30SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411045862.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In the existing technology, the storage device resetting process affects system stability and reliability. In particular, the storage device cannot be reset in time due to delays or errors in detecting abnormal conditions by the host, affecting system stability and reliability.

Method used

On the storage device side, query the reset status information of the function engine at a preset time interval, use the reset status bitmap to determine the function engine that needs to be reset, perform the reset operation on the storage device, and send an asynchronous event report to the host to trigger the preset operation. , ensuring that only the abnormal engine is reset to reduce the impact of interruption on the host IO.

Benefits of technology

It achieves timely and reliable reset of storage devices, reduces the impact of the reset process on system stability and reliability, and avoids the problem of storage devices not being reset in time due to host failure or detection errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567457A
    Figure CN118567457A
Patent Text Reader

Abstract

The invention provides a reset method and device of storage equipment, electronic equipment and a physical machine system, and relates to the technical field of computers. The reset method of the storage equipment comprises the following steps: in response to determining that any function engine needs to be reset, executing a reset operation on the function engine; and sending an asynchronous event report carrying the information of the reset operation to a host connected with the storage device, so that the host executes a preset operation corresponding to the reset operation. According to the invention, the reset operation can be timely and reliably carried out on the storage equipment, so that the influence of the reset process of the storage equipment on the stability and reliability of the whole system is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for resetting a storage device, an electronic device, and a physical machine system. Background Art

[0002] In the prior art, the host detects whether a storage device (e.g., an NVMe (Non-Volatile Memory Express) device) is in an abnormal state by polling or interrupt processing, such as the device being unresponsive, the error count exceeding a threshold, or other abnormal states. After detecting that the storage device is in an abnormal state, the host system sends a reset command to the storage device, and the storage device performs a reset operation as a whole. The host waits for the storage device to complete the reset operation and then reinitializes and resumes normal communication with the storage device.

[0003] This method of relying on the host to detect abnormalities and initiate a reset will affect the stability and reliability of the system. First, the reset process of the storage device takes a certain amount of time. During the reset period, the storage device cannot respond to the data read and write requests of the host system, which will interrupt the normal data read and write operations of the host. In addition, the reset of the storage device depends on whether the host can detect the abnormal state of the storage device in time. If the host itself fails or cannot correctly detect the abnormal state of the storage device, the storage device cannot be reset in time, which will affect the stability and reliability of the entire system.

[0004] Therefore, how to timely and reliably reset the storage device to reduce the impact of the storage device reset process on the stability and reliability of the entire system is a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of the problems existing in the prior art, the present invention provides a storage device resetting method, apparatus, electronic device and physical machine system, which are used to reset the storage device in a timely and reliable manner to reduce the impact of the storage device resetting process on the stability and reliability of the entire system.

[0006] The present invention provides a storage device resetting method, which is applied to a storage device end and includes the following steps.

[0007] In response to determining that any of the function engines needs to be reset, a reset operation is performed on the function engine; and an asynchronous event report carrying information about the reset operation is sent to a host connected to the storage device, so that the host performs a preset operation corresponding to the reset operation.

[0008] According to a reset method of a storage device provided by the present invention, it is determined that any of the function engines needs to be reset in the following manner: at preset time intervals, the reset status information of each of the function engines stored in a read-only storage medium is queried; wherein the reset status includes a first status indicating that no reset is required, and a second status indicating that a reset is required, and the second status is set when the function engine is determined to be in an abnormal state; when the query results in that the reset status corresponding to any of the function engines is the second status, it is determined that the function engine needs to be reset.

[0009] According to a reset method for a storage device provided by the present invention, the reset status information of all the function engines is stored in a reset status bitmap represented in binary; wherein each bit in the reset status bitmap corresponds to one of the function engines; in response to determining that any of the function engines needs to be reset, performing a reset operation on the function engine, comprising: in response to querying that any bit in the reset status bitmap is in the second state, performing a reset operation on the function engine in the storage device corresponding to the bit.

[0010] According to a method for resetting a storage device provided by the present invention, the storage device is an NVMe device; in response to querying that any bit in the reset state bitmap is in the second state, performing a reset operation on a function engine in the storage device corresponding to the bit, comprising: In response to querying that any bit in the reset state bitmap is in the second state, a reset operation is performed on the function engine in the NVMe device corresponding to the bit.

[0011] According to a storage device resetting method provided by the present invention, before performing a reset operation on the function engine, the method further includes: switching the task performed by the function engine to a backup module of the function engine; after performing a reset operation on the function engine, the method further includes: switching the task performed by the backup module to the function engine.

[0012] The present invention provides a storage device resetting method, which is applied to a host side and includes the following steps.

[0013] During the initialization phase, an asynchronous event reporting request is sent to a storage device connected to the host to instruct the storage device to send an asynchronous event report to the host after a reset operation is performed on any function engine in the storage device; wherein the storage device includes a plurality of independently running function engines, and the reset operation is performed on the function engine after it is determined that the function engine needs to be reset; in response to receiving an asynchronous event report carrying information about the reset operation from the storage device, a preset operation corresponding to the reset operation is performed.

[0014] The present invention also provides a storage device resetting device, which is arranged at the storage device end, and the storage device includes a plurality of independently running function engines, including the following modules.

[0015] A reset module is used to perform a reset operation on any of the function engines in response to determining that any of the function engines needs to be reset; a reporting module is used to send an asynchronous event report carrying information about the reset operation to a host connected to the storage device, so that the host performs a preset operation corresponding to the reset operation.

[0016] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for resetting the storage device as described above is implemented.

[0017] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for resetting the storage device as described in any one of the above is implemented.

[0018] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for resetting a storage device as described above is implemented.

[0019] The present invention also provides a physical machine system, including a host and a storage device, wherein the storage device includes a plurality of independently running function engines.

[0020] During the initialization phase, the host sends an asynchronous event report request to the storage device to instruct the storage device to send an asynchronous event report to the host after a reset operation is performed on any function engine in the storage device; the independent function reset system of the storage device, in response to determining that any function engine needs to be reset, performs a reset operation on the function engine; the independent function reset system of the storage device sends an asynchronous event report carrying information about the reset operation to the host; the host, in response to receiving the asynchronous event report carrying information about the reset operation from the storage device, performs a preset operation corresponding to the reset operation.

[0021] The storage device reset method provided by the present invention performs a reset operation on any function engine in response to determining that any function engine needs to be reset. Since the reset operation is performed only on the function engine that needs to be reset in the storage device, it will not affect the task execution of other function engines that work normally, thus effectively reducing the impact of the storage device reset on the host IO execution interrupt. Therefore, the storage device can be reset in a timely and reliable manner to reduce the impact of the storage device reset process on the stability and reliability of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 This is one of the flowcharts of the method for resetting a storage device provided by the present invention.

[0024] Figure 2 It is a flow chart of the method for determining whether a function engine needs to be reset provided by the present invention.

[0025] Figure 3 This is the second flowchart of the method for resetting a storage device provided by the present invention.

[0026] Figure 4 It is a structural schematic diagram of the physical machine system provided by the present invention.

[0027] Figure 5 It is a schematic diagram of the architecture of the interaction between the host and the NVMe storage device in the prior art.

[0028] Figure 6 It is a schematic diagram of the architecture of the interaction between the host and the NVMe storage device in the present invention.

[0029] Figure 7 It is a schematic diagram of the reset state bitmap provided by the present invention.

[0030] Figure 8 It is a schematic diagram of the interaction process between the host and the storage device provided by the present invention.

[0031] Fig. 9 It is a structural schematic diagram of a resetting device for a storage device provided by the present invention.

[0032] Fig.10 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0034] Combine the following Figure 1-Figure 8 A method for resetting a storage device according to the present invention is described.

[0035] Figure 1 is one of the flowcharts of the method for resetting a storage device provided by the present invention, the method is applied to a storage device end, the storage device includes a plurality of independently running function engines, such as Figure 1 As shown, the method includes the following: Step 101: In response to determining that any function engine needs to be reset, a reset operation is performed on the function engine.

[0036] A storage device is a software or hardware component used to store and retrieve digital data based on a specific logical device interface specification. For example, a storage device may be a storage device such as an SDI card that is implemented based on the NVMe storage protocol.

[0037] The IO (Input / Output) operations of the host are processed by the internal modules of the storage device to realize data storage and reading operations on the non-volatile storage medium.

[0038] As the core component of a software or hardware system, the function engine is responsible for implementing and supporting a set of specific functions or business logic in the application system.

[0039] Just as an example, for NVMe devices such as Figure 6As shown, the following functional engines may be included: CPQ (Command Parsing and Queuing), DTBM (Data Transfer and Buffer Management), CQP (Completion Queue Processing), and DPED (Data Protection and Error Detection). Among them, the CPQ module is responsible for parsing the metadata of the IO command (such as command type, address, length, etc.) and converting it into the format inside the storage device for subsequent processing. In addition, CPQ is also responsible for queuing commands according to priority and scheduling policies so that the storage device can effectively handle multiple concurrent IO commands. The DTBM module is responsible for managing data transmission between the host and the NVMe device, as well as managing the buffer inside the device and the data buffer between the host and the device. The CQP module is used to store the queue of the completion status and results of the IO operation and pass it to the host system. In addition, CQP is also responsible for managing the status of the completion queue and maintaining the validity of the queue. The DPED module ensures the integrity and reliability of data during transmission and storage, and provides data protection functions, such as error detection and correction coding to detect and repair errors that may occur in data transmission.

[0040] In the embodiments provided by the present invention, Figure 6 As shown, each function engine of the storage device is independently designed and operated, and the function engines interact with each other through common communication methods, and separate reset controls are provided for these independently operated function engines.

[0041] In the specific implementation process, the function engine can be implemented by software or hardware logic, and is not limited by the description of this specification. The reset operation of the function engine can be executed by software or hardware, and is not limited by the description of this specification.

[0042] In a specific implementation process, the reset operation of each function engine of the storage device may be performed by an independent function reset system. The independent function reset system may be a combination of a group of processes and / or threads for performing the storage device reset operation.

[0043] In some embodiments, the independent function reset system includes a backup module for each function engine in the storage device, and the backup module is used to perform the main tasks of the corresponding function engine. The function engine and its corresponding backup module can be implemented in different ways. For example, Figure 6The CPQ function engine shown is implemented by hardware logic, and the backup module of the function engine can be implemented by software. Figure 6 The DTBM function engine shown is implemented by software, and the backup module of the function engine can be implemented by hardware logic.

[0044] In a specific implementation process, before the function engine is reset, the task executed by the function engine is switched to the backup module of the function engine, and during the reset of the function engine, the backup module executes the task of the function engine. After the function engine is reset, the task executed by the backup module is switched to the function engine. Therefore, during the process of the storage device resetting the function engine, the host IO operation can be executed normally.

[0045] In the specific implementation process, for the function engine implemented by software, when it is determined that the function engine is in an abnormal state, the self-repair of the function engine can be achieved through software reset. Software reset is a reset process executed by the program code of the software, which aims to restore the internal state of the software module to a known initial state. For example, when a data transmission error or buffer overflow, a completion queue processing error or queue congestion or other errors occur in the software module, the current task can be switched to the backup module, the context information of the software module to be reset (for example, the value of the global variable, the entry of the function currently being executed, etc.) can be saved, and then the initialization function of the software module can be called to reinitialize the software module. After the initialization is completed, the saved context information of the software module is restored, and the current task is switched from the backup module to the software module, so that the software module is restored to the state of normal task processing and the reset operation is completed.

[0046] In the specific implementation process, for a function engine implemented by hardware, when it is determined that the function engine is in an abnormal state, a reset signal provided by the function engine can be triggered, and the reset operation can be completed through the reset function of the function engine itself, which is not limited by the description of this specification.

[0047] In the specific implementation process, whether the function engine needs to be reset can be determined in a variety of ways. For example, polling can be used to query whether each function engine is in an abnormal state, thereby determining whether each function engine needs to be reset.

[0048] For another example, an interrupt may be triggered when an abnormal state occurs in a function engine (eg, data overflow), and in the triggered interrupt processing function, it is determined whether each function engine needs to be reset.

[0049] For an embodiment of determining whether a function engine needs to be reset, see Figure 2 The relevant content in will not be repeated here.

[0050] Step 102: Send an asynchronous event report carrying information about the reset operation to a host connected to the storage device, so that the host executes a preset operation corresponding to the reset operation.

[0051] The reset operation information may include identification information of the reset function engine, etc. As an example only, for an NVMe device, the reset operation information carried by the reported asynchronous event may be as shown in Table 1 below.

[0052] Table 1 Reset operation information

[0053] As an example only, the storage device is an NVMe device, such as Figure 5 As shown, the communication between the host and the NVMe storage device is usually based on the PCIe bus and uses the NVMe protocol to communicate. The communication process uses SQ (Submission Queue, NVMe protocol instruction submission queue) and CQ (Completion Queue, NVMe protocol instruction completion queue). SQ and CQ are two queues in the host memory. The host informs the controller of the NVMe storage device through SQ to process the commands to be processed, and the controller informs the host of the commands that have been processed and the execution status of these commands through CQ. During the execution of a host I / O command, the host initiates a read request for read I / O, the NVMe device responds to the request, and writes the data to the memory address specified by the host. The host writes the data to the memory address specified by the host, initiates a write request, the NVMe device responds to the request, and reads the data from the memory address specified by the host. All instructions in the NVMe storage device are initiated by the host, and the storage device responds to the request. The asynchronous event reporting AER (Asynchronous Event Request) message for the storage device is also based on this method. The traditional reset method is initiated by the host, and the controller of the NVMe device performs the reset operation of the entire NVMe device.

[0054] In the embodiment provided by the present invention, in the storage device, in response to determining that any function engine needs to be reset, a reset operation is performed on the function engine. Since the reset operation is performed only on the function engine that needs to be reset in the storage device, it will not affect the task execution of other function engines that work normally. Therefore, the impact of the storage device reset on the host IO execution interruption is effectively reduced. In addition, since the reset operation is initiated by the storage device itself, the problem that the storage device cannot be reset in time due to a failure of the host itself or the inability to correctly detect the abnormality of the storage device is solved. Therefore, the storage device can be reset in a timely and reliable manner to reduce the impact of the reset process of the storage device on the stability and reliability of the entire system.

[0055] Figure 2 is a flow chart of a method for determining whether a function engine needs to be reset provided by the present invention, such as Figure 2 As shown, the method includes the following: Step 201: query reset status information of each function engine stored in a read-only storage medium at a preset time interval.

[0056] The reset state includes a first state indicating that a reset is not required, and a second state indicating that a reset is required. The second state is set when the function engine is determined to be in an abnormal state.

[0057] In the specific implementation process, a thread in the independent function reset system can monitor the operation status of each function engine of the storage device in a common manner, for example, by querying the status register or the thread status information of the function engine, etc., which is not limited by the description of this specification. When it is determined that any function engine is in an abnormal state, the reset state of the function engine is set to the second state; after completing the reset operation of the function engine, the reset state of the function engine is set to the first state.

[0058] In the specific implementation process, the reset state information of each function engine stored in the read-only storage medium can be queried at a preset time interval by polling. In order to avoid unexpected situations such as system downtime or power failure, the reset state information of each function engine can be stored in the read-only storage medium.

[0059] In some embodiments, reset state information of all function engines is stored in a reset state bitmap represented in binary format, wherein each bit in the reset state bitmap corresponds to a function engine.

[0060] When setting the reset state bitmap, a bit value of 1 may correspond to the second state, and a bit value of 0 may correspond to the first state; or a bit value of 0 may correspond to the second state, and a bit value of 1 may correspond to the first state. Both of the above setting methods are acceptable and are not limited by other statements in this specification.

[0061] As an example only, for NVMe devices, the reset status bitmap is as follows Figure 7As shown, there are 8 bits in total, among which, bit0~bit3, each bit corresponds to a function engine: CPQ, DTBM, DPED and CQP, and the remaining bits are reserved. In the reset status bitmap, 0 is the first state and 1 is the second state. For example, when the independent function reset system detects that a data transmission error or buffer overflow occurs in the storage device, bit1 of the reset status bitmap is set to 1; after completing the reset operation of the DTBM function engine, the independent function reset system sets bit1 of the reset status bitmap to 0. For another example, when the independent function reset system detects that a completion queue processing error or queue congestion occurs in the storage device, bit3 of the reset status bitmap is set to 1; after completing the reset operation of the CQP function engine, the independent function reset system sets bit3 of the reset status bitmap to 0.

[0062] Step 202: When it is found that the reset state corresponding to any function engine is the second state, it is determined that the function engine needs to be reset.

[0063] In a specific implementation process, when it is queried that any bit in the reset state bitmap is in the second state (for example, 1), it is determined that the function engine needs to be reset, and a reset operation is performed on the function engine in the storage device corresponding to the bit.

[0064] In some embodiments, the storage device is an NVMe device. After querying and obtaining that any bit in the reset state bitmap is in the second state, a reset operation is performed on the function engine in the NVMe device corresponding to the bit.

[0065] In the embodiment provided by the present invention, the reset state information of each function engine stored in the read-only storage medium is queried at a preset time interval; when the reset state corresponding to any function engine is obtained as the second state, it is determined that the function engine needs to be reset. Since the reset state information of the function engine is stored in the read-only storage medium, when an unexpected situation (for example, system downtime or sudden power failure, etc.) is encountered, the reset operation of the abnormal function engine can be completed while the independent function reset system can operate normally, avoiding the hidden danger caused by not resetting the reset function engine in time under unexpected circumstances, and effectively maintaining the stability of the system.

[0066] Figure 3 FIG. 2 is a flow chart of the method for resetting a storage device provided by the present invention. Figure 3 As shown, the method includes the following: Step 301: During the initialization phase, an asynchronous event reporting request is sent to a storage device connected to a host.

[0067] The storage device includes a plurality of independently running function engines, and the reset operation is performed on the function engine after it is determined that the function engine needs to be reset.

[0068] For a detailed description of the function engine of the storage device and the reset operation performed on the function engine, see Figure 1 The relevant content in will not be repeated here.

[0069] The host sends a function reset asynchronous event reporting request (Function Reset Asynchronous Event Request) to the storage device during the initialization phase to instruct the storage device to send an asynchronous event report to the host after any function engine in the storage device is reset.

[0070] In the specific implementation process, for storage devices that support specific interface specifications (such as the non-volatile memory host controller interface specification, NVMe), the host can send asynchronous event requests through the mechanism defined by the interface specification, or can request asynchronous event reporting by sending a custom command to the storage device or calling a specific API, which is not limited to the description of this specification.

[0071] Step 302: In response to receiving an asynchronous event report carrying information about a reset operation from a storage device, executing a preset operation corresponding to the reset operation.

[0072] For a detailed description of asynchronous event reporting that carries reset operation information, see Figure 1 The relevant content in will not be repeated here.

[0073] In a storage device, after a reset operation is performed on any functional engine, an asynchronous event carrying information about the reset operation is reported to the host, so that the host executes the preset operation corresponding to the reset operation, for example, recording the reset status and reason of the storage device, and performing corresponding troubleshooting and monitoring.

[0074] In the embodiment provided by the present invention, the reset operation is initiated and executed by the storage device itself, and the host learns the reset status of the storage device by receiving an asynchronous event report carrying information about the reset operation from the storage device. The asynchronous event reporting effectively solves the problem that the storage device cannot directly report the reset event to the host after being reset, so that the host can timely understand the reset status and cause of the storage device so as to take corresponding measures in time.

[0075] Figure 4 Schematic diagram of the structure of the physical machine system provided by the present invention. Figure 4 The physical machine system shown includes a host and a storage device, and the storage device includes multiple independently running function engines. In the physical system, the reset operation of the storage device is performed in the following manner: The host, during the initialization phase, sends an asynchronous event reporting request to the storage device to instruct the storage device to send an asynchronous event reporting to the host after any function engine in the storage device is reset; The independent function reset system of the storage device performs a reset operation on any function engine in response to determining that the function engine needs to be reset.

[0076] For a detailed description of the function engine in the storage device, see Figure 1 The relevant content in will not be repeated here.

[0077] For a detailed description of the independent function reset system, see Figure 1 The relevant content in will not be repeated here.

[0078] In some embodiments, the reset status information of each function engine stored in a read-only storage medium can be queried at preset time intervals; wherein the reset status includes a first status indicating that no reset is required, and a second status indicating that a reset is required, and the second status is set when the function engine is determined to be in an abnormal state; when the query results in that the reset status corresponding to any function engine is the second status, it is determined that the function engine needs to be reset.

[0079] In some embodiments, the reset state information of all function engines is stored in a reset state bitmap represented in binary format, wherein each bit in the reset state bitmap corresponds to a function engine. In response to querying that any bit in the reset state bitmap is in the second state, a reset operation is performed on the function engine in the storage device corresponding to the bit.

[0080] In some embodiments, the storage device is an NVMe device. After querying and obtaining that any bit in the reset state bitmap is in the second state, a reset operation is performed on the function engine in the NVMe device corresponding to the bit.

[0081] The independent functional reset system of the storage device sends an asynchronous event report carrying information of the reset operation to the host.

[0082] In the specific implementation process, the host can send a function reset asynchronous event reporting request to the storage device during the initialization phase. In the storage device, after a reset operation is performed on any function engine, an asynchronous event carrying information about the reset operation is reported to the host, so that the host performs the preset operation corresponding to the reset operation, for example, recording the reset status and reason of the storage device, and performing corresponding troubleshooting and monitoring.

[0083] In response to receiving an asynchronous event report carrying information about a reset operation from the storage device, the host executes a preset operation corresponding to the reset operation.

[0084] For a detailed description of executing a preset operation corresponding to the reset operation in response to receiving an asynchronous event report carrying information of the reset operation from the storage device, see Figure 3 The relevant content in will not be repeated here.

[0085] As an example only, the following takes the storage device as an NVMe device as an example to illustrate the reset operation process of the storage device in the physical machine system provided by the present invention.

[0086] like Figure 6 As shown in Figure 1, each functional engine in the NVMe device is designed independently to minimize the coupling between functional engines. Figure 8 As shown, after power-on, the host and the NVMe device each complete the initialization operation, wherein the NVMe storage device completes the initialization of the controller and each functional engine during the initialization phase, and starts the independent functional reset system. During the initialization phase, the host sends an asynchronous event reporting request to the storage device to instruct the storage device to send an asynchronous event report to the host after any functional engine in the storage device is reset. Then, the NVMe storage device normally receives and processes IO services from the host, writes data from the host to the non-volatile storage medium, or reads data from the non-volatile storage medium and sends it to the host.

[0087] The independent function reset system monitors the status of each function engine of the NVMe device in real time, such as the running status of the command parsing and queuing function engine, the data transmission and buffer management function engine, the completion queue processing function engine, and the data protection and error detection function engine. In the independent function reset system, when it is determined that any function engine (for example, independent function engine 0-CPQ) needs to be reset, the corresponding bit position in the reset status bitmap is set to 1, and after the task performed by the function engine is switched to the backup module, the function engine is reset. Only the function engine in the NVMe device is reset, and other function engines perform tasks normally, so the impact of the storage device reset on the system stability can be effectively reduced. After the reset of the function engine in the abnormal state is completed, the independent function reset system restores the context of the function engine, switches the task of the backup module to the function engine, and sets the corresponding bit position in the reset status bitmap to 0, and reports the function reset asynchronous event to the host. After receiving the function reset asynchronous event report, the host performs the corresponding preset operation, such as troubleshooting. In the NVMe device, the IO operation from the host is performed normally, and the independent function reset system continues to monitor the status of each function engine.

[0088] In the physical system provided by the present invention, in the storage device, only the function engine that needs to be reset is reset, and the task execution of other function engines that work normally is not affected. Therefore, the impact of the storage device reset on the host IO execution interruption is effectively reduced. The reset operation is initiated and executed by the storage device itself, avoiding the problem that the storage device cannot be reset in time due to a failure of the host itself or the inability to correctly detect the abnormality of the storage device.

[0089] In the physical system provided by the present invention, the host sends an asynchronous event reporting request to the storage device during the initialization phase to instruct the storage device to send an asynchronous event report to the host after any function engine in the storage device is reset; then, the host learns the reset status of the storage device by receiving the asynchronous event report carrying information of the reset operation from the storage device. Through the reset asynchronous event reporting of the customized function engine, the reset event can be reported to the host in time after the storage device is reset, so that the host can timely understand the reset status and cause of the storage device and take corresponding measures in time.

[0090] The reset device of the storage device provided by the present invention is described below. The reset device of the storage device described below and the reset method of the storage device described above can be referred to each other.

[0091] Fig. 9 is a schematic diagram of the structure of a storage device reset device provided by the present invention, wherein the device is arranged at the storage device end, such as Fig. 9 As shown, the device 900 includes the following modules.

[0092] The reset module 910 is configured to, in response to determining that any of the function engines needs to be reset, perform a reset operation on the function engine.

[0093] For a detailed description of performing a reset operation on the function engine in response to determining that any of the function engines needs to be reset, see Figure 1 The relevant content in will not be repeated here.

[0094] The reporting module 920 is used to send an asynchronous event report carrying information about the reset operation to a host connected to the storage device, so that the host executes a preset operation corresponding to the reset operation.

[0095] For a detailed description of sending an asynchronous event report carrying information about the reset operation to a host connected to the storage device so that the host performs a preset operation corresponding to the reset operation, see Figure 1 The relevant content in will not be repeated here.

[0096] In some embodiments, the following method is used to determine whether any of the function engines needs to be reset: at preset time intervals, the reset status information of each of the function engines stored in a read-only storage medium is queried; wherein the reset status includes a first status indicating that no reset is required, and a second status indicating that a reset is required, and the second status is set when the function engine is determined to be in an abnormal state; when the query results in that the reset status corresponding to any of the function engines is the second status, it is determined that the function engine needs to be reset.

[0097] In some embodiments, the reset state information of all the function engines is stored in a reset state bitmap represented in binary format; wherein each bit in the reset state bitmap corresponds to one of the function engines. In response to determining that any of the function engines needs to be reset, performing a reset operation on the function engine comprises: In response to querying that any bit in the reset state bitmap is in the second state, a reset operation is performed on the function engine in the storage device corresponding to the bit.

[0098] In the reset device of the storage device provided by the present invention, the reset operation is only performed on the function engine that needs to be reset, and the task execution of other function engines that work normally will not be affected. Therefore, the impact of the storage device reset on the host IO execution interruption is effectively reduced. The reset operation is initiated and executed by the storage device itself, avoiding the problem that the storage device cannot be reset in time due to a failure of the host itself or the inability to correctly detect the abnormality of the storage device.

[0099] Fig.10 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.10 As shown, the electronic device may include: a processor 1010, a communication interface 1020, a memory 1030 and a communication bus 1040, wherein the processor 1010, the communication interface 1020 and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 may call the logic instructions in the memory 1030 to execute a reset method for a storage device, the method comprising: in response to determining that any of the function engines needs to be reset, performing a reset operation on the function engine; sending an asynchronous event report carrying information about the reset operation to a host connected to the storage device, so that the host performs a preset operation corresponding to the reset operation.

[0100] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0101] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the storage device reset method provided by the above-mentioned methods, and the method includes: in response to determining that any of the function engines needs to be reset, performing a reset operation on the function engine; sending an asynchronous event report carrying information about the reset operation to a host connected to the storage device, so that the host performs a preset operation corresponding to the reset operation.

[0102] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the reset method of the storage device provided by the above-mentioned methods, the method comprising: in response to determining that any of the function engines needs to be reset, performing a reset operation on the function engine; sending an asynchronous event report carrying information about the reset operation to a host connected to the storage device, so that the host performs a preset operation corresponding to the reset operation.

[0103] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0104] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for resetting a storage device, characterized in that: Applied to a storage device, the storage device includes a plurality of independently running function engines, and the method includes: In response to determining that any of the function engines needs to be reset, performing a reset operation on the function engine; An asynchronous event report carrying information about the reset operation is sent to a host connected to the storage device, so that the host executes a preset operation corresponding to the reset operation.

2. The method for resetting a storage device according to claim 1, characterized in that: Determine whether any of the functional engines needs to be reset by: querying reset state information of each of the function engines stored in the read-only storage medium at a preset time interval; wherein the reset state includes a first state indicating that a reset is not required, and a second state indicating that a reset is required, and the second state is set when the function engine is determined to be in an abnormal state; When it is found through query that the reset state corresponding to any one of the function engines is the second state, it is determined that the function engine needs to be reset.

3. The method for resetting a storage device according to claim 2, wherein: The reset state information of all the function engines is stored in a reset state bitmap represented in binary format; wherein each bit in the reset state bitmap corresponds to one of the function engines; In response to determining that any of the function engines needs to be reset, performing a reset operation on the function engine includes: In response to querying that any bit in the reset state bitmap is in the second state, a reset operation is performed on the function engine in the storage device corresponding to the bit.

4. The method for resetting a storage device according to claim 3, characterized in that: The storage device is an NVMe device; In response to querying and obtaining that any bit in the reset state bitmap is in the second state, performing a reset operation on a function engine in the storage device corresponding to the bit, including: In response to querying that any bit in the reset state bitmap is in the second state, a reset operation is performed on the function engine in the NVMe device corresponding to the bit.

5. The method for resetting a storage device according to any one of claims 1 to 4, characterized in that: Before performing a reset operation on the function engine, the method further includes: Switching the task executed by the function engine to the backup module of the function engine; After performing a reset operation on the function engine, the method further includes: The tasks performed by the backup module are switched to the function engine.

6. A method for resetting a storage device, characterized in that: Applied to the host side, the method includes: In the initialization phase, an asynchronous event reporting request is sent to a storage device connected to the host to instruct the storage device to send an asynchronous event report to the host after a reset operation is performed on any function engine in the storage device; wherein the storage device includes a plurality of independently running function engines, and the reset operation is performed on the function engine after it is determined that the function engine needs to be reset; In response to receiving an asynchronous event report carrying information about a reset operation from a storage device, a preset operation corresponding to the reset operation is executed.

7. A storage device resetting device, characterized in that: Set at the storage device end, the storage device includes a plurality of independently running function engines, and the device includes: a reset module, configured to, in response to determining that any of the function engines needs to be reset, perform a reset operation on the function engine; The reporting module is used to send an asynchronous event report carrying information about the reset operation to a host connected to the storage device, so that the host executes a preset operation corresponding to the reset operation.

8. The storage device resetting device according to claim 7, characterized in that: Determine whether any of the functional engines needs to be reset by: querying reset state information of each of the function engines stored in the read-only storage medium at a preset time interval; wherein the reset state includes a first state indicating that a reset is not required, and a second state indicating that a reset is required, and the second state is set when the function engine is determined to be in an abnormal state; When it is found through query that the reset state corresponding to any one of the function engines is the second state, it is determined that the function engine needs to be reset.

9. The storage device resetting device according to claim 8, characterized in that: The reset state information of all the function engines is stored in a reset state bitmap represented in binary format; wherein each bit in the reset state bitmap corresponds to one of the function engines; In response to determining that any of the function engines needs to be reset, performing a reset operation on the function engine includes: In response to querying that any bit in the reset state bitmap is in the second state, a reset operation is performed on the function engine in the storage device corresponding to the bit.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for resetting the storage device according to any one of claims 1 to 6 is implemented.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for resetting the storage device according to any one of claims 1 to 6 is implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for resetting the storage device according to any one of claims 1 to 6 is implemented.

13. A physical machine system, comprising a host and a storage device, wherein the storage device comprises a plurality of independently running function engines, characterized in that: The host, in an initialization phase, sends an asynchronous event reporting request to the storage device to instruct the storage device to send an asynchronous event report to the host after any function engine in the storage device is reset; The independent function reset system of the storage device, in response to determining that any of the function engines needs to be reset, performs a reset operation on the function engine; The independent function reset system of the storage device sends an asynchronous event report carrying information of the reset operation to the host; In response to receiving an asynchronous event report carrying information about a reset operation from the storage device, the host executes a preset operation corresponding to the reset operation.

14. The physical machine system according to claim 13, characterized in that: Determine whether any of the functional engines needs to be reset by: querying reset state information of each of the function engines stored in the read-only storage medium at a preset time interval; wherein the reset state includes a first state indicating that a reset is not required, and a second state indicating that a reset is required, and the second state is set when the function engine is determined to be in an abnormal state; When it is found through query that the reset state corresponding to any one of the function engines is the second state, it is determined that the function engine needs to be reset.

15. The physical machine system according to claim 14, characterized in that: The reset state information of all the function engines is stored in a reset state bitmap represented in binary format; wherein each bit in the reset state bitmap corresponds to one of the function engines; In response to determining that any of the function engines needs to be reset, performing a reset operation on the function engine includes: In response to querying that any bit in the reset state bitmap is in the second state, a reset operation is performed on the function engine in the storage device corresponding to the bit.

Citation Information

Patent Citations

  • Operation state reconstruction method after anti-instantaneous ionizing radiation reset suitable for sensitive circuit

    CN110007738A

  • Memory preset adjustment based on adaptive calibration

    CN110322910A

  • PCIe equipment recovery method and system, electronic equipment and storage medium

    CN112463446A

  • Non-volatile storage area access processing method and device during aviation software starting

    CN115658389A

  • Storage device exception IO processing method, system and device

    CN116010142A