A time-out IO processing method, system, storage medium and device

By detecting IO timeouts in the storage system and issuing special IO to trigger the RAID module to go offline, the hot restart problem caused by IO timeouts in the storage system is solved, improving system stability and user experience.

CN115408232BActive Publication Date: 2026-03-03INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211046188.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-30
Publication Date
2026-03-03
Estimated Expiration
2042-08-30

AI Technical Summary

Technical Problem

In existing technologies, after a client host issues an I/O request, it may experience an excessively long wait for the result, leading to a hot restart of the storage node and reducing the stability of the storage system.

Method used

The system performs timeout checks on all modules in the IO stack of the storage system for IO issued by the host. When a timeout is detected, a special IO is issued to trigger the RAID module to go offline. The system then sends a go-off message to all modules and returns the offline processing result, thus avoiding IO suspension and hot restart.

Benefits of technology

This effectively avoids situations where the user's host experiences excessively long waiting times for results after issuing I/O requests, preventing I/O hangs, improving the stability of the storage system, and enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115408232B_ABST
    Figure CN115408232B_ABST
Patent Text Reader

Abstract

This invention provides a timeout I / O handling method, system, storage medium, and device. The method includes: performing timeout detection on I / O issued by the host through all modules on the I / O stack of the storage system; in response to a module detecting a timeout of the host-issued I / O, the module issues a special I / O; in response to the RAID module detecting the special I / O, the RAID module is triggered to go offline and sends a RAID offline message to all modules respectively; in response to all modules receiving the RAID offline message, they return their respective I / Os to be processed by the RAID module as offline processing results to the host. This invention avoids situations where the user host waits for an excessively long time for a return result after issuing I / O, further avoids I / O suspension causing node hot restarts, thereby effectively improving the stability of the storage system and contributing to a better user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of storage technology, and in particular to a timeout I / O processing method, system, storage medium, and device. Background Technology

[0002] The core function of a storage system is to handle I / O (input / output) and complete read / write interactions with the client host. To ensure that I / O requests from the host are completed within a valid time and return a result, the Host Layer (HL) module of the storage system, upon receiving I / O, obtains the current timestamp, adds 300 seconds to it to calculate the valid timeout (TTL), and records the TTL in the I / O data structure. Subsequently, during the processing of I / O through various forwarding layers, caches, storage pools, RAID (Redundant Arrays of Independent Disks), drivers, and other modules, the HL module uses the TTL in the I / O data structure to perform timeout checks on the sent I / O. If the sent I / O does not return within the valid timeout period, it is considered that the I / O is suspended in the storage array, triggering a hot restart of the storage node.

[0003] Triggering a warm restart of the storage node upon detecting a suspended I / O operation is intended to prevent client hosts from experiencing excessively long wait times for results after issuing I / O requests. It also allows the node restart to restore any modules in the storage system's I / O stack that have caused the blockage. However, this operation significantly reduces the stability of the storage system, leading to a poor user experience. Summary of the Invention

[0004] In view of this, the purpose of this invention is to propose a timeout IO processing method, system, storage medium and device to solve the problem in the prior art where the client host waits for an excessively long time for the return result after issuing IO, which is considered to be the IO being suspended in the storage array, thereby triggering a hot restart of the storage node and reducing the stability of the storage system.

[0005] To achieve the above objectives, the present invention provides a timeout I / O processing method, comprising the following steps:

[0006] Timeout detection is performed on I / O issued by the host by all modules on the I / O stack of the storage system;

[0007] In response to a module detecting a timeout of the IO sent by the host, the module sends a special IO;

[0008] In response to the RAID module detecting special I / O, the RAID module is triggered to go offline, and a RAID offline message is sent to all modules respectively;

[0009] In response to each module receiving a RAID offline message, the module returns the offline processing results of its respective I / O to be processed by the RAID module to the host.

[0010] In some embodiments, the method further includes:

[0011] In response to the RAID module going offline, start timeout monitoring;

[0012] In response to the monitoring indicating that the timeout period has reached the preset duration, the RAID module is triggered to come online, and a RAID online message is sent to all modules respectively.

[0013] In some embodiments, the method further includes:

[0014] Once all modules receive the RAID online message, normal IO processing resumes.

[0015] In some embodiments, initiating timeout monitoring in response to a RAID module going offline includes:

[0016] In response to the RAID module going offline, a timer is started to count the timeout period until the timeout period reaches the preset duration.

[0017] In some embodiments, triggering the RAID module offline in response to the RAID module detecting a special I / O includes:

[0018] The RAID module is taken offline in response to a timeout timestamp detected on a special I / O.

[0019] In some embodiments, the special I / O is a read operation I / O.

[0020] In some embodiments, the address corresponding to a specific I / O does not overlap with the address corresponding to an I / O issued by the host.

[0021] Another aspect of the present invention provides a timeout I / O processing system, comprising:

[0022] The detection module is configured to perform timeout detection on I / O issued by the host through all modules on the I / O stack of the storage system;

[0023] The dispatch module is configured to dispatch special IO in response to a timeout detected by a module when the IO dispatched by the host is detected.

[0024] The offline module is configured to respond to a specific I / O operation detected by the RAID module, triggering the RAID module to go offline and sending a RAID offline message to all modules; and

[0025] The processing module is configured to respond to each module receiving a RAID offline message and return the offline processing results of their respective IOs to be processed by the RAID module to the host.

[0026] In another aspect, the present invention provides a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the above-described method.

[0027] In another aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, performs the above-described method.

[0028] The present invention has at least the following beneficial technical effects:

[0029] The timeout I / O handling method of this invention performs timeout detection on I / O issued by the host through all modules on the I / O stack of the storage system. When a module detects that the I / O issued by the host has timed out, the module issues a special I / O. When the RAID module detects the special I / O, it triggers the RAID module to go offline and sends a RAID offline message to all modules. Then, when all modules receive the RAID offline message, they return the I / O to be processed by the RAID module as offline processing results to the host. This avoids the situation where the user host waits for an excessively long time for the return result after issuing I / O, further avoids I / O suspension that may cause node hot restart, and thus effectively improves the stability of the storage system and contributes to a better user experience. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.

[0031] Figure 1 This is a schematic diagram of a timeout I / O processing method provided according to an embodiment of the present invention;

[0032] Figure 2 This is a schematic diagram of a timeout I / O processing system provided according to an embodiment of the present invention;

[0033] Figure 3 A schematic diagram of a computer-readable storage medium for implementing a timeout I / O processing method according to an embodiment of the present invention;

[0034] Figure 4This is a schematic diagram of the hardware structure of a computer device for executing a timeout I / O processing method according to an embodiment of the present invention. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.

[0036] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two different entities or different parameters with the same name. Therefore, "first" and "second" are merely for convenience of expression and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as other steps or units inherent in a process, method, system, product, or device that includes a series of steps or units.

[0037] Based on the above objectives, a first aspect of the present invention provides an embodiment of a timeout I / O processing method. Figure 1 The diagram shown is a schematic representation of an embodiment of the timeout I / O processing method provided by the present invention. Figure 1 As shown, the embodiments of the present invention include the following steps:

[0038] Step S10: Timeout detection is performed on the I / O issued by the host through all modules on the I / O stack of the storage system;

[0039] Step S20: In response to a module detecting an IO timeout issued by the host, the module issues a special IO;

[0040] Step S30: In response to the RAID module detecting a special IO, the RAID module is triggered to go offline, and a RAID offline message is sent to all modules respectively;

[0041] Step S40: In response to all modules receiving the RAID offline message, each module returns its respective IO to be processed by the RAID module as an offline processing result to the host.

[0042] The timeout IO handling method of this invention involves all modules on the IO stack of the storage system performing timeout detection on IOs issued by the host. When a module detects a timeout of the host-issued IO, it issues a special IO. When the RAID module detects the special IO, it triggers the RAID module to go offline and sends a RAID offline message to all modules. Then, when all modules receive the RAID offline message, they return their respective IOs to be processed by the RAID module as offline processing results to the host. This avoids the user host waiting for an excessively long time to receive the return result after issuing IO, further preventing IO suspension that could cause node hot restarts, thereby effectively improving the stability of the storage system and contributing to a better user experience.

[0043] In some embodiments, the method further includes: initiating timeout monitoring in response to the RAID module going offline; triggering the RAID module to come online in response to the timeout period reaching a preset duration, and sending a RAID online message to all modules respectively.

[0044] In some embodiments, the method further includes: resuming normal IO processing flow in response to all modules receiving RAID online messages respectively.

[0045] In some embodiments, in response to the RAID module going offline, initiating timeout monitoring includes: in response to the RAID module going offline, starting a timer to count the timeout until the timeout reaches a preset duration.

[0046] In some embodiments, triggering the RAID module offline in response to the RAID module detecting a special IO includes: triggering the RAID module offline in response to the RAID module detecting a timeout timestamp on the special IO.

[0047] In some embodiments, the special I / O is a read operation I / O.

[0048] In some embodiments, the address corresponding to a specific I / O does not overlap with the address corresponding to an I / O issued by the host.

[0049] The following are specific embodiments of the timeout I / O processing method of the present invention:

[0050] 1. Send the agreed-upon special I / O to the RAID module:

[0051] 1) Each module on the IO stack performs timeout checks on the issued IO (data input / output). If an IO issued by a host times out, a special IO needs to be issued according to an agreement.

[0052] 2) This convention allows only read I / O to avoid modifying data on the disk; the I / O processing address should avoid overlapping with the address of the I / O issued by the host, and the I / O operation address can be set to 0; the TTL (Time To Live) on the I / O must be a timestamp that has already expired, so that the RAID (Redundant Arrays of Independent Disks) module can directly detect the timeout when detecting I / O timeout.

[0053] 2. Redundant arrays should be taken offline and then brought back online:

[0054] 1) The RAID module performs timeout checks on each received I / O;

[0055] 2) If the RAID module detects a specific I / O, it will trigger the redundant array (RAID) to go offline; at the same time the redundant array goes offline, a timer is started, for example, the timer timeout is set to 6 minutes.

[0056] 3) After the timer expires in 6 minutes, the redundant array is brought online to resume the IO stack processing flow.

[0057] 3. Clean up accumulated timeout I / O:

[0058] 1) Send special I / O to the RAID module on the I / O stack, and then wait for the corresponding redundant array to go offline;

[0059] 2) After receiving the message that the corresponding redundant array is offline, each module on the IO stack returns all the IO that the redundant array needs to process as OFFLINE to its upper-layer module, and finally returns to the host.

[0060] 3) After receiving the message that the corresponding redundant array is online, each module on the IO stack resumes the normal IO processing flow.

[0061] It should also be noted that all I / O received by each module on the I / O stack will enter the RAID module.

[0062] Furthermore, the data structure for special I / O can be expanded to include detected host I / O objects. This allows the RAID module to identify which host I / O requires the redundant array to perform a process of taking it offline and then bringing it back online upon receiving a special I / O.

[0063] A second aspect of the present invention also provides a timeout I / O processing system. Figure 2 The diagram shown is a schematic representation of an embodiment of the timeout I / O processing system provided by the present invention. Figure 2As shown, a timeout I / O processing system includes: a detection module 10, configured to perform timeout detection on I / O sent by the host through all modules on the I / O stack of the storage system; a sending module 20, configured to send a special I / O in response to a module detecting that the I / O sent by the host has timed out; a shutdown module 30, configured to trigger the RAID module to shut down in response to the RAID module detecting a special I / O, and send a RAID shutdown message to all modules respectively; and a processing module 40, configured to return the I / O to be processed by the RAID module to the host as offline processing results in response to all modules receiving the RAID shutdown message respectively.

[0064] The timeout IO processing system of this invention performs timeout detection on IO issued by the host through all modules on the IO stack of the storage system. When a module detects that the IO issued by the host has timed out, the module issues a special IO. When the RAID module detects the special IO, it triggers the RAID module to go offline and sends a RAID offline message to all modules. Then, when all modules receive the RAID offline message, they return the IO to be processed by the RAID module as offline processing results to the host. This avoids the situation where the user host waits for a long time for the return result after issuing IO, further avoids IO suspension that may cause node hot restart, and thus effectively improves the stability of the storage system and contributes to a better user experience.

[0065] In some embodiments, the system further includes a monitoring module configured to initiate timeout monitoring in response to a RAID module going offline; and to trigger the RAID module to come online in response to the timeout period reaching a preset duration, and to send a RAID online message to all modules respectively.

[0066] In some embodiments, the system further includes a recovery module configured to resume normal I / O processing in response to all modules receiving a RAID online message.

[0067] In some embodiments, the monitoring module includes a timing module configured to start a timer to count the timeout period in response to the RAID module going offline, until the timeout period reaches a preset duration.

[0068] In some embodiments, the offline module 30 is further configured to trigger the RAID module offline in response to the RAID module detecting a timeout timestamp on a specific IO.

[0069] In some embodiments, the special I / O is a read operation I / O.

[0070] In some embodiments, the address corresponding to a specific I / O does not overlap with the address corresponding to an I / O issued by the host.

[0071] It should also be noted that all I / O received by each module on the I / O stack will enter the RAID module.

[0072] A third aspect of the present invention also provides a computer-readable storage medium. Figure 3 A schematic diagram of a computer-readable storage medium for implementing a timeout I / O processing method according to an embodiment of the present invention is shown. Figure 3 As shown, the computer-readable storage medium 3 stores computer program instructions 31. When executed by the processor, the computer program instructions 31 perform the following steps:

[0073] Step S10: Timeout detection is performed on the I / O issued by the host through all modules on the I / O stack of the storage system;

[0074] Step S20: In response to a module detecting an IO timeout issued by the host, the module issues a special IO;

[0075] Step S30: In response to the RAID module detecting a special IO, the RAID module is triggered to go offline, and a RAID offline message is sent to all modules respectively;

[0076] Step S40: In response to all modules receiving the RAID offline message, each module returns its respective IO to be processed by the RAID module as an offline processing result to the host.

[0077] In some embodiments, the steps further include: initiating timeout monitoring in response to the RAID module going offline; triggering the RAID module to come online in response to the timeout period reaching a preset duration, and sending a RAID online message to all modules respectively.

[0078] In some embodiments, the steps further include: in response to all modules receiving the RAID online message, resuming the normal IO processing flow.

[0079] In some embodiments, in response to the RAID module going offline, initiating timeout monitoring includes: in response to the RAID module going offline, starting a timer to count the timeout until the timeout reaches a preset duration.

[0080] In some embodiments, triggering the RAID module offline in response to the RAID module detecting a special IO includes: triggering the RAID module offline in response to the RAID module detecting a timeout timestamp on the special IO.

[0081] In some embodiments, the special I / O is a read operation I / O.

[0082] In some embodiments, the address corresponding to a specific I / O does not overlap with the address corresponding to an I / O issued by the host.

[0083] It should be understood that, where there is no conflict, all the embodiments, features and advantages described above for the timeout I / O processing method according to the present invention are equally applicable to the timeout I / O processing system and storage medium according to the present invention.

[0084] A fourth aspect of the present invention also provides a computer device, including as follows: Figure 4 The memory 402 and processor 401 shown are provided. The memory 402 stores a computer program that, when executed by the processor 401, implements the method of any of the above embodiments.

[0085] like Figure 4 The diagram shown is a hardware structure schematic of an embodiment of a computer device for executing a timeout I / O processing method provided by the present invention. Figure 4 Taking the computer device shown as an example, this computer device includes a processor 401 and a memory 402, and may also include an input device 403 and an output device 404. The processor 401, memory 402, input device 403, and output device 404 can be connected via a bus or other means. Figure 4 Taking a bus connection as an example, input device 403 can receive input digital or character information, and generate key signal inputs related to user settings and function control of the timeout I / O processing system. Output device 404 may include display devices such as a display screen.

[0086] Memory 402, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the timeout I / O processing method in the embodiments of this application. Memory 402 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created by the use of the timeout I / O processing method, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 402 may optionally include memory remotely located relative to processor 401, and these remote memories can be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0087] The processor 401 executes various functional applications and data processing of the server by running non-volatile software programs, instructions and modules stored in the memory 402, thereby implementing the timeout I / O processing method of the above method embodiment.

[0088] Finally, it should be noted that the computer-readable storage medium (e.g., memory) described herein can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. By way of example, and not limitation, non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which can act as external cache memory. By way of example, and not limitation, RAM can be obtained in various forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The storage devices disclosed herein are intended to include, but are not limited to, these and other suitable types of memory.

[0089] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.

[0090] The various exemplary logic blocks, modules, and circuits described herein can be implemented or performed using the following components designed to perform the functions herein: general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general-purpose processor may be a microprocessor, but alternatively, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP, and / or any other such configuration.

[0091] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.

[0092] It should be understood that, as used herein, the singular form "a" is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations of one or more of the associatedly listed items. The embodiment numbers disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0093] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.

Claims

1. A timeout I / O handling method, characterized in that, Includes the following steps: Timeout detection is performed on I / O issued by the host by all modules on the I / O stack of the storage system; In response to a module detecting a timeout of the IO sent by the host, the module sends a special IO; In response to the RAID module detecting the special I / O, the RAID module is triggered to go offline, and a RAID offline message is sent to all modules respectively; In response to each module receiving the RAID offline message, the respective I / O to be processed by the RAID module is returned to the host as offline processing results; The address corresponding to the special I / O does not overlap with the address corresponding to the I / O issued by the host.

2. The method according to claim 1, characterized in that, Also includes: In response to the RAID module going offline, timeout monitoring is initiated; In response to the monitoring that the timeout period has reached the preset duration, the RAID module is triggered to come online, and a RAID online message is sent to all modules respectively.

3. The method according to claim 2, characterized in that, Also includes: Upon receiving the RAID online message from all modules, the normal IO processing flow is restored.

4. The method according to claim 2, characterized in that, In response to the RAID module going offline, the timeout monitoring includes: In response to the RAID module going offline, a timer is started to count the timeout period until the timeout period reaches the preset duration.

5. The method according to claim 1, characterized in that, In response to the RAID module detecting the specific I / O, triggering the RAID module to go offline includes: In response to the RAID module detecting a timeout timestamp on the special IO, the RAID module is triggered to go offline.

6. The method according to claim 1, characterized in that, The special I / O is the read operation I / O.

7. A timeout I / O processing system, characterized in that, include: The detection module is configured to perform timeout detection on I / O issued by the host through all modules on the I / O stack of the storage system; The delivery module is configured to deliver a special IO in response to a timeout detected by a module that has delivered an IO from the host. The offline module is configured to trigger the RAID module to go offline in response to the RAID module detecting the special IO, and send a RAID offline message to all the modules respectively. as well as The processing module is configured to, in response to all modules receiving the RAID offline message, return the offline processing results of their respective IOs to be processed by the RAID module to the host. The address corresponding to the special I / O does not overlap with the address corresponding to the I / O issued by the host.

8. A computer-readable storage medium, characterized in that, The system stores computer program instructions that, when executed by a processor, implement the method as described in any one of claims 1-6.

9. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program, which, when executed by the processor, performs the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • IO processing method and apparatus for SSD cache

    CN107589911A