An input / output process processing method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202310912104.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-07-24
AI Technical Summary
[0005]本申请实施例的目的是提供一种输入输出进程处理方法、装置、电子设备及可读存储介质,能够解决相关技术中输入输出进程卡死导致的输入输出进程可靠性和稳定性较低的问题
[0080]在本申请实施例中,提供一种输入输出进程处理方法,包括:获取存储系统的运行状态信息;状态信息包括系统运行信息、健康状态信息、系统维护信息中的至少一项;基于运行状态信息确定存储系统中的第一输入输出进程对应的第一执行策略,并基于第一执行策略启动第一输入输出进程;获取针对第一输入输出进程的中断信息,并基于中断信息确定第二执行策略;基于第二执行策略控制存储系统或第一输入输出进程,以对第一输入输出进程的中断进行处理。通过该方法,可以在发生针对输入输出进程的中断时及时对输入输出进程进行处理,能够有效避免进程卡死,提升了输入输出进程的可靠性和稳定性。
Smart Images

Figure CN117093142B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data storage technology, specifically relating to an input / output process processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] In the storage field, the most basic and crucial function of a storage system is to process and store customer data, ensuring its reliability and preventing data loss. The processes that handle user data in a storage system are typically called input / output processes. Input / output processes are the core of the storage system and perform its most important functions. In the field of storage technology, the processing of the input / output stack is the most critical link; therefore, in practical applications, it is essential to fully guarantee the reliability and stability of the input / output processes.
[0003] In related technologies, in order to ensure the reliability and stability of the input / output process, a monitoring program is usually added to the input / output process. This program can obtain the status of the input / output process in a timely manner and provide timely feedback to the user when a failure occurs.
[0004] However, this method can only detect and report faults, which can still cause the input / output process to freeze, posing a risk of serious errors. The reliability and stability of the input / output process remain low. Summary of the Invention
[0005] The purpose of this application is to provide an input / output process processing method, apparatus, electronic device, and readable storage medium, which can solve the problem of low reliability and stability of input / output processes caused by input / output process freezing in related technologies.
[0006] In a first aspect, embodiments of this application provide an input / output process processing method, the method comprising: Obtain the operating status information of the storage system; the status information includes at least one of system operating information, health status information, and system maintenance information.
[0007] Based on the running status information, a first execution strategy corresponding to the first input / output process in the storage system is determined, and the first input / output process is started based on the first execution strategy.
[0008] Obtain interrupt information for the first input / output process, and determine the second execution strategy corresponding to the first input / output process based on the interrupt information.
[0009] The storage system or the first input / output process is controlled based on the second execution strategy to handle interruptions of the first input / output process.
[0010] Optionally, determining the first execution strategy corresponding to the first input / output process in the storage system based on the running status information includes: The startup code corresponding to the first input / output process is determined based on the running status information.
[0011] The first execution strategy corresponding to the first input / output process is determined based on the startup code.
[0012] Optionally, the startup code includes one of a normal code, a fault code, a warm start code, and an upgrade code, and determining the startup code corresponding to the first input / output process based on the running status information includes: If the health status information indicates that the hardware of the storage system is in a faulty state, the boot code is determined to be the fault code.
[0013] If the system operation information indicates that the storage system has not yet started executing the first input / output process after power-on, the boot code is determined to be the warm boot code.
[0014] When the system maintenance information instructs the storage system to perform a system upgrade, the boot code is determined to be the upgrade code.
[0015] If the operating status information indicates that the storage system is normal, the boot code is determined to be the normal code.
[0016] Optionally, the first execution strategy includes one of a normal startup strategy, a maintenance mode startup strategy, a cluster creation strategy, and a system upgrade strategy. Determining the first execution strategy corresponding to the first input / output process based on the startup code includes: If the startup code is the fault code, the first execution strategy is determined to be the maintenance mode startup strategy.
[0017] If the startup code is the hot start code, then the first execution strategy is determined to be the cluster creation strategy.
[0018] If the startup code is the upgrade code, then the first execution strategy is determined to be the system upgrade strategy.
[0019] If the startup code is the normal code, then the first execution strategy is determined to be the normal startup strategy.
[0020] Optionally, determining the second execution strategy corresponding to the first input / output process based on the interrupt information includes: The exit code corresponding to the first input / output process is determined based on the interrupt information.
[0021] The second execution strategy corresponding to the first input / output process is determined based on the exit code.
[0022] Optionally, the exit code includes an abnormal exit code, a proactive restart code, an execution completion code, and an upgrade code. Determining the exit code corresponding to the first input / output process based on the interrupt information includes: If the interrupt information indicates that the first input / output process has been completed normally, the exit code is determined to be the execution completion code.
[0023] If the interrupt information indicates that the storage system has received a restart signal, the exit code is determined to be the active restart code.
[0024] If the interrupt information indicates that the first input / output process has exited abnormally, the exit code is determined to be the abnormal exit code.
[0025] If the interrupt information indicates that the storage system has received an upgrade signal, the exit code is determined to be the upgrade code.
[0026] Optionally, the second execution strategy includes a storage system restart strategy, an input / output process restart strategy, a system upgrade strategy, and an input / output process termination strategy. Determining the second execution strategy corresponding to the first input / output process based on the exit code includes: If the exit code is the execution completion code, the second execution strategy is determined to be the strategy to terminate the input / output process.
[0027] If the exit code is the active restart code, the second execution strategy is determined to be the storage system restart strategy.
[0028] If the exit code is the abnormal exit code, the second execution strategy is determined to be the strategy of restarting the input / output process.
[0029] If the exit code is the upgrade code, then the second execution strategy is determined to be the system upgrade strategy.
[0030] Optionally, controlling the storage system or the first input / output process based on the second execution strategy to handle interruptions of the first input / output process includes: If the second execution strategy is the strategy to terminate the input / output process, then the first input / output process is terminated.
[0031] If the second execution strategy is the storage system restart strategy, then the storage system is restarted.
[0032] If the second execution strategy is the restart input / output process strategy, roll back the processing progress of the first input / output process and restart the first input / output process.
[0033] When the second execution strategy is the system upgrade strategy, the storage system is upgraded.
[0034] Optionally, the system upgrade of the storage system includes: If the second execution strategy is the system upgrade strategy and the second input / output process is being processed, continue processing the second input / output process.
[0035] Once the second input / output process is complete, the storage system is upgraded.
[0036] Optionally, the method further includes: Get the number of times the first input / output process has been restarted.
[0037] If the number of restarts is greater than or equal to the first threshold, a fault notification message is sent to the user.
[0038] Optionally, the method further includes: A watchdog timer is added to the storage system, and watchdog-feeding code is injected into the execution program of the first input / output process; wherein, the watchdog-feeding code is used to send a watchdog-feeding signal to the watchdog timer based on a first duration; the watchdog timer is used to receive the watchdog-feeding signal based on the first duration.
[0039] Determine a second duration between the moment when the watchdog last received the dog-feeding signal and the current moment.
[0040] If the second duration is greater than or equal to the first duration, an interrupt signal is sent to the first input / output process.
[0041] The interrupt information corresponding to the interrupt signal is generated.
[0042] Secondly, embodiments of this application provide an input / output process processing apparatus, the apparatus comprising: The first acquisition module is used to acquire the operating status information of the storage system; the status information includes at least one of system operating information, health status information, and system maintenance information.
[0043] The startup module is used to determine the first execution strategy corresponding to the first input / output process in the storage system based on the running status information, and to start the first input / output process based on the first execution strategy.
[0044] The first determining module is used to acquire interrupt information for the first input / output process and determine the second execution strategy corresponding to the first input / output process based on the interrupt information.
[0045] The processing module is used to control the storage system or the first input / output process based on the second execution strategy, so as to handle the interruption of the first input / output process.
[0046] Optionally, the startup module includes: The first determining submodule is used to determine the startup code corresponding to the first input / output process based on the running status information.
[0047] The second determining submodule is used to determine the first execution strategy corresponding to the first input / output process based on the startup code.
[0048] Optionally, the startup code includes one of a normal code, a fault code, a warm start code, and an upgrade code, and the first determining submodule includes: The first determining unit is configured to determine the boot code as the fault code when the health status information indicates that the hardware of the storage system is in a fault state.
[0049] The second determining unit is configured to determine the boot code as the warm boot code when the system operation information indicates that the storage system has not started executing the first input / output process after power-on.
[0050] The third determining unit is used to determine the boot code as the upgrade code when the system maintenance information indicates that the storage system should be upgraded.
[0051] The fourth determining unit is used to determine the boot code as the normal code when the operating status information indicates that the storage system is normal.
[0052] Optionally, the first execution strategy includes one of the following: normal startup strategy, maintenance mode startup strategy, cluster creation strategy, and system upgrade strategy; the second determining submodule includes: The first strategy determination unit is configured to determine that the first execution strategy is the maintenance mode startup strategy when the startup code is the fault code.
[0053] The second strategy determination unit is used to determine the first execution strategy as the cluster creation strategy when the startup code is the hot start code.
[0054] The third strategy determination unit is used to determine that the first execution strategy is the system upgrade strategy when the startup code is the upgrade code.
[0055] The fourth strategy determination unit is used to determine the first execution strategy as the normal startup strategy when the startup code is the normal code.
[0056] Optionally, the first determining module includes: The third determining submodule is used to determine the exit code corresponding to the first input / output process based on the interrupt information.
[0057] The fourth determination submodule is used to determine the second execution strategy corresponding to the first input / output process based on the exit code.
[0058] Optionally, the exit codes include abnormal exit codes, active restart codes, execution completion codes, and upgrade codes; the third determining submodule includes: The fifth determining unit is used to determine the exit code as the execution completion code when the interrupt information indicates that the first input / output process has been executed normally.
[0059] The sixth determining unit is used to determine that the exit code is the active restart code when the interrupt information indicates that the storage system has received a restart signal.
[0060] The seventh determining unit is configured to determine the exit code as the abnormal exit code when the interrupt information indicates that the first input / output process has exited abnormally.
[0061] The eighth determining unit is configured to determine the exit code as the upgrade code when the interrupt information indicates that the storage system has received an upgrade signal.
[0062] Optionally, the second execution strategy includes a storage system restart strategy, an input / output process restart strategy, a system upgrade strategy, and an input / output process termination strategy. The fourth determining submodule includes: The fifth strategy determination unit is used to determine the second execution strategy as the strategy to terminate the input / output process when the exit code is the execution completion code.
[0063] The sixth strategy determination unit is used to determine the second execution strategy as the storage system restart strategy when the exit code is the active restart code.
[0064] The seventh strategy determination unit is used to determine that the second execution strategy is the strategy of restarting the input / output process when the exit code is the abnormal exit code.
[0065] The eighth strategy determination unit is used to determine the second execution strategy as the system upgrade strategy when the exit code is the upgrade code.
[0066] Optionally, the processing module includes: The first processing submodule is used to terminate the first input / output process when the second execution strategy is the termination input / output process strategy.
[0067] The second processing submodule is used to restart the storage system when the second execution strategy is the storage system restart strategy.
[0068] The third processing submodule is used to roll back the processing progress of the first input / output process and restart the first input / output process when the second execution strategy is the restart input / output process strategy.
[0069] The fourth processing submodule is used to perform a system upgrade on the storage system when the second execution strategy is the system upgrade strategy.
[0070] Optionally, the fourth processing submodule includes: The first processing unit is configured to continue processing the second input / output process when the second execution strategy is the system upgrade strategy and the second input / output process is being processed.
[0071] The second processing unit is used to perform a system upgrade on the storage system after the second input / output process has been completed.
[0072] Optionally, the device further includes: The second acquisition module is used to acquire the number of times the first input / output process has been restarted.
[0073] The prompt module is used to send a fault prompt message to the user when the number of restarts is greater than or equal to a first threshold.
[0074] Optionally, the device further includes: A watchdog injection module is used to add a watchdog to the storage system and inject watchdog-feeding code into the execution program of the first input / output process; wherein, the watchdog-feeding code is used to send a watchdog-feeding signal to the watchdog based on a first duration; and the watchdog is used to receive the watchdog-feeding signal based on the first duration.
[0075] The second determining module is used to determine a second duration between the time when the watchdog last received the dog-feeding signal and the current time.
[0076] The sending module is configured to send an interrupt signal to the first input / output process when the second duration is greater than or equal to the first duration.
[0077] The generation module is used to generate interrupt information corresponding to the interrupt signal.
[0078] Thirdly, embodiments of this application provide an electronic device including the input / output process processing apparatus described above, for implementing any of the input / output process processing methods described above.
[0079] Fourthly, embodiments of this application provide a readable storage medium on which a program or instruction is stored, and when the program or instruction is executed by a processor, it implements the input / output process processing method described above.
[0080] This application provides an input / output process processing method, comprising: acquiring the operating status information of a storage system; the status information including at least one of system operating information, health status information, and system maintenance information; determining a first execution strategy corresponding to a first input / output process in the storage system based on the operating status information, and starting the first input / output process based on the first execution strategy; acquiring interrupt information for the first input / output process, and determining a second execution strategy based on the interrupt information; and controlling the storage system or the first input / output process based on the second execution strategy to handle the interruption of the first input / output process. This method can promptly handle the input / output process when an interrupt occurs, effectively preventing process freezing and improving the reliability and stability of the input / output process. Attached Figure Description
[0081] Figure 1 This is a flowchart of the steps of an input / output process processing method provided in an embodiment of this application.
[0082] Figure 2 This is a flowchart of another input / output process processing method provided in an embodiment of this application.
[0083] Figure 3 This is a schematic diagram of a processing flow provided in an embodiment of this application.
[0084] Figure 4 This is a logic block diagram of an input / output process processing device provided in an embodiment of this application.
[0085] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0086] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0087] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0088] The input / output process processing method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0089] like Figure 1 As shown, Figure 1 A flowchart illustrating the steps of an input / output process processing method provided in this application embodiment, the method may include: Step 101: Obtain the operating status information of the storage system; the status information includes at least one of system operating information, health status information, and system maintenance information.
[0090] In the embodiments of this application, the input / output process can be an I / O process, and the system operation information mainly includes the operating status of the storage system, such as whether the storage system is operating normally, whether the executed input / output process has experienced an out-of-process failure, etc.; the health status information can be the status of various hardware components of the storage system, such as whether the storage controller is damaged, whether the circuit is open, whether there are cold solder joints, short circuits, etc.; the system maintenance information can be whether the storage system needs to be upgraded. The system operation information, health status information, and system maintenance information can constitute the operating status information of the storage system. The storage system can obtain its own operating status information to perform corresponding actions based on this information.
[0091] Step 102: Determine the first execution strategy corresponding to the first input / output process in the storage system based on the running status information, and start the first input / output process based on the first execution strategy.
[0092] In the embodiments of this application, different running status information can correspond to different execution strategies, and when determining the execution strategy based on the running status information, a priority can be applied; that is, the running status information has its own priority when determining the execution strategy. Various running status information can be used individually or in combination for determination.
[0093] Step 103: Obtain interrupt information for the first input / output process, and determine the second execution strategy corresponding to the first input / output process based on the interrupt information.
[0094] In the embodiments of this application, during the processing of the first input / output process, interruption may occur due to program errors, sudden hardware failures, or other reasons. Furthermore, the first input / output process can also terminate via an interrupt signal after execution. In other words, the first input / output process can have various different interrupt messages. These different interrupt messages can correspond to different second execution strategies. Thus, after obtaining the interrupt information of the first input / output process, the second execution strategy can be determined. The second execution strategy may include an execution strategy for the storage system and an execution strategy for the first input / output process.
[0095] Step 104: Control the storage system or the first input / output process based on the second execution strategy to handle interruptions of the first input / output process.
[0096] In the embodiments of this application, since the interrupt information occurs during the execution of the first input / output process, after determining the second execution strategy, control processing can be performed on the storage system or the first input / output process based on the content of the second execution strategy to respond to the interrupt information. The interrupt information can be invalidated after the control processing begins.
[0097] In the embodiments of this application, the following methods are employed: 1) Obtain the operating status information of the storage system; the status information includes at least one of system operating information, health status information, and system maintenance information; 2) Determine a first execution strategy corresponding to a first input / output process in the storage system based on the operating status information, and start the first input / output process based on the first execution strategy; 3) Obtain interrupt information for the first input / output process, and determine a second execution strategy based on the interrupt information; 4) Control the storage system or the first input / output process based on the second execution strategy to handle interruptions of the first input / output process. This method allows for timely handling of input / output processes when interruptions occur, effectively preventing process freezes and improving the reliability and stability of the input / output processes.
[0098] like Figure 2 The above, Figure 2A flowchart illustrating another input / output process processing method provided in this application embodiment, the method may include: Step 201: Obtain the operating status information of the storage system; the status information includes at least one of system operating information, health status information, and system maintenance information.
[0099] In the embodiments of this application, the content of the embodiment of this step can be referred to the content of the embodiment of step 101, and will not be repeated here.
[0100] Step 202: Determine the first execution strategy corresponding to the first input / output process in the storage system based on the running status information, and start the first input / output process based on the first execution strategy.
[0101] In the embodiments of this application, the content of the embodiment of this step can be referred to the content of the embodiment of step 102, and will not be repeated here.
[0102] Optionally, step 202 may include the following sub-steps: Sub-step 2021: Determine the startup code corresponding to the first input / output process based on the running status information.
[0103] In embodiments of this application, at least one startup code can be manually set, and each startup code can correspond one-to-one with the startup method of the first input / output process. In embodiments of this application, the startup code can include a normal code, a fault code, a warm-start code, and an upgrade code. The startup code of the first input / output process can be determined by storing the system's operating status information, and then the first input / output process can be started according to the startup method corresponding to the startup code. Since the determination conditions for each startup code are different, the determination of each startup code has a priority.
[0104] Optionally, sub-step 2021 may include the following sub-steps: Sub-step A1: If the health status information indicates that the hardware of the storage system is in a fault state, determine that the boot code is the fault code.
[0105] In the embodiments of this application, it can be first determined whether the hardware of the storage system is in a fault state; that is, the fault code can have the highest determination priority. If the hardware of the storage system is in a fault state, the boot code can be directly determined as a fault code.
[0106] Sub-step A2: If the system operation information indicates that the storage system has not yet started executing the first input / output process after power-on, determine that the boot code is the warm boot code.
[0107] In embodiments of this application, when the hardware of the storage system is in a normal state, the system operation information of the storage system can be obtained. If the storage system has not started executing the input / output process after power-on, the boot code can be determined to be a warm boot code. The warm boot code may have a second priority.
[0108] Sub-step A3: If the system maintenance information indicates that the storage system needs to be upgraded, determine that the boot code is the upgrade code.
[0109] In the embodiments of this application, when the hardware of the storage system is in a normal state, it can be determined whether the storage system has received a system upgrade command. If a system upgrade command is received, the boot code can be determined to be an upgrade code. The upgrade code may have a second priority in its determination. Generally, the determination conditions for the upgrade code and the warm boot code will not occur simultaneously.
[0110] Sub-step A4: If the running status information indicates that the storage system is normal, determine that the boot code is the normal code.
[0111] In the embodiments of this application, if the storage system hardware is in a normal state, the storage system has already processed input / output processes, and no system upgrade instruction has been received, the boot code can be determined to be a normal code. The normal code can have the lowest judgment priority.
[0112] In the embodiments of this application, the startup code is determined to be a fault code when the health status information indicates that the storage system hardware is in a faulty state; a warm start code is determined when the system operation information indicates that the storage system has not started executing the first input / output process after power-on; an upgrade code is determined when the system maintenance information indicates that the storage system is undergoing a system upgrade; and a normal code is determined when the operation status information indicates that the storage system is normal. The startup method of the input / output process can be determined according to priority, which optimizes the management of the input / output process and reduces the risk of program chaos to a certain extent.
[0113] Sub-step 2022: Determine the first execution strategy corresponding to the first input / output process based on the startup code.
[0114] In the embodiments of this application, at least one first execution strategy can be manually set, and it can correspond one-to-one with the boot code. In the embodiments of this application, the first execution strategy may include a maintenance mode boot strategy, a cluster creation strategy, a system upgrade strategy, and a normal boot strategy. Since priority has already been applied in the boot code determination process, the first execution strategy corresponding to the first input / output process can be directly determined based on the boot code.
[0115] Optionally, sub-step 2022 may include the following sub-steps: Sub-step B1: If the startup code is the fault code, determine that the first execution strategy is the maintenance mode startup strategy.
[0116] In the embodiments of this application, if the startup code is a fault code, it indicates that the hardware of the current storage system is unavailable. In this case, the first execution strategy can be determined to be the maintenance mode startup strategy. In the maintenance mode startup strategy, the storage system can simply remain powered on, and after the maintenance personnel complete the maintenance and power it back on, the judgment can be performed again.
[0117] Sub-step B2: If the startup code is the hot start code, determine the first execution strategy as the cluster creation strategy.
[0118] In the embodiments of this application, if the startup code is a warm start code, it indicates that the storage controllers in the current storage system have not yet formed a cluster. Therefore, the first execution strategy can be determined as a cluster creation strategy. In the cluster creation strategy, the storage system can select at least two storage controllers to form a cluster. At the same time, the storage system can also form multiple clusters so that the storage system can process input / output processes in dual-controller or multi-controller mode.
[0119] Sub-step B3: If the startup code is the upgrade code, determine that the first execution strategy is the system upgrade strategy.
[0120] In the embodiments of this application, if the startup code is an upgrade code, it indicates that the storage system has received a system upgrade instruction. At this point, the first execution strategy can be determined to be a system upgrade strategy. In the system upgrade strategy, the storage system can obtain the data required for the upgrade from the cloud, thereby enabling it to upgrade itself.
[0121] Sub-step B4: If the startup code is the normal code, determine that the first execution strategy is the normal startup strategy.
[0122] In the embodiments of this application, if the startup code is a normal code, then the first execution strategy can be determined to be a normal startup strategy. In the normal startup strategy, the storage system does not need to perform any special operations and can directly execute the input / output process.
[0123] In the embodiments of this application, by determining the first execution strategy as a maintenance mode startup strategy when the startup code is a fault code, determining the first execution strategy as a cluster creation strategy when the startup code is a hot start code, determining the first execution strategy as a system upgrade strategy when the startup code is an upgrade code, and determining the first execution strategy as a normal startup strategy when the startup code is a normal code, the corresponding first execution strategy can be determined according to the startup code, thus optimizing the startup conditions of the input / output process and further reducing the risk of program chaos.
[0124] In the embodiments of this application, by determining the startup code corresponding to the first input / output process based on the running status information, and determining the first execution strategy corresponding to the first input / output process based on the startup code, the startup code can be set and the input / output process can be managed in a standardized manner through the startup code, reducing the risk of program chaos and improving the reliability and stability of the input / output process.
[0125] Step 203: Obtain interrupt information for the first input / output process, and determine the second execution strategy corresponding to the first input / output process based on the interrupt information.
[0126] In the embodiments of this application, the implementation of this step can be referred to the embodiment of step 103, and will not be repeated here.
[0127] Optionally, step 203 may include the following sub-steps: Sub-step 2031: Determine the exit code corresponding to the first input / output process based on the interrupt information.
[0128] In the embodiments of this application, at least one exit code can be manually set, and each exit code can correspond one-to-one with the termination method of the first input / output process. In the embodiments of this application, the exit code can include an execution completion code, a proactive restart code, an abnormal exit code, and an upgrade code. Since the determination conditions for each startup code are different, the determination of each startup code has a priority. It should be noted that the proactive restart code, abnormal exit code, and upgrade code can all be determined based on signals received by the storage system; therefore, the proactive restart code, abnormal exit code, and upgrade code can have the same priority, while the execution completion code does not require the storage system to receive additional signals; therefore, the execution completion code can have the lowest priority.
[0129] Optionally, sub-step 2031 may include the following sub-steps: Sub-step C1: If the interrupt information indicates that the first input / output process has been completed normally, determine that the exit code is the execution completion code.
[0130] In the embodiments of this application, if the first input / output process is executed normally, the exit code can be determined as the execution completion code.
[0131] Sub-step C2: If the interrupt information indicates that the storage system has received a restart signal, determine that the exit code is the active restart code.
[0132] In the embodiments of this application, if the storage system receives a restart signal before the first input / output process has finished executing, the exit code can be determined to be an active restart code.
[0133] Sub-step C3: If the interrupt information indicates that the first input / output process has exited abnormally, determine that the exit code is the abnormal exit code.
[0134] In the embodiments of this application, if the first input / output process exits abnormally, such as due to an error or interruption before completion, the exit code can be determined to be an abnormal exit code.
[0135] Sub-step C4: If the interrupt information indicates that the storage system has received an upgrade signal, determine that the exit code is the upgrade code.
[0136] In the embodiments of this application, if the storage system receives a system upgrade signal before the first input / output process completes, it can determine that the exit code is an upgrade code. It should be noted that if the exit code is an upgrade code, the next determined startup code can also be an upgrade code.
[0137] In the embodiments of this application, the exit code is determined as an execution completion code when the interrupt information indicates that the first input / output process has completed normally; the exit code is determined as an active restart code when the interrupt information indicates that the storage system has received a restart signal; the exit code is determined as an abnormal exit code when the interrupt information indicates that the first input / output process has exited abnormally; and the exit code is determined as an upgrade code when the interrupt information indicates that the storage system has received an upgrade signal. The exit code can be manually set, and the corresponding exit code is determined when the storage system receives various signals. This standardizes the management of input / output processes, reduces the risk of program chaos to a certain extent, and improves the reliability and stability of input / output processes.
[0138] Sub-step 2032: Determine the second execution strategy corresponding to the first input / output process based on the exit code.
[0139] In embodiments of this application, at least one second execution strategy can be manually set, and it can correspond one-to-one with an exit code. In embodiments of this application, the second execution strategy may include a strategy to terminate an input / output process, a strategy to restart the storage system, a strategy to restart an input / output process, and a system upgrade strategy. Since priority has already been applied in the exit code determination process, the second execution strategy corresponding to the first input / output process can be directly determined based on the exit code.
[0140] Optionally, sub-step 2032 may include the following sub-steps: Sub-step D1: If the exit code is the execution completion code, determine that the second execution strategy is the strategy to terminate the input / output process.
[0141] In the embodiments of this application, if the exit code is an execution completion code, then the second execution strategy can be determined to be the strategy of terminating the input / output process.
[0142] Sub-step D2: If the exit code is the active restart code, determine that the second execution strategy is the storage system restart strategy.
[0143] In the embodiments of this application, if the exit code is an active restart code, then the second execution strategy can be determined to be a strategy to restart the storage system.
[0144] Sub-step D3: If the exit code is the abnormal exit code, determine that the second execution strategy is the strategy of restarting the input / output process.
[0145] In the embodiments of this application, if the exit code is an abnormal exit code, the second execution strategy can be determined to be the strategy of restarting the input / output process.
[0146] Sub-step D4: If the exit code is the upgrade code, determine that the second execution strategy is the system upgrade strategy.
[0147] In the embodiments of this application, if the exit code is an upgrade code, then the second execution strategy can be determined to be a system upgrade strategy.
[0148] In the embodiments of this application, when the exit code is an execution completion code, the second execution strategy is determined to be the strategy to terminate the input / output process; when the exit code is an active restart code, the second execution strategy is determined to be the strategy to restart the storage system; when the exit code is an abnormal exit code, the second execution strategy is determined to be the strategy to restart the input / output process; and when the exit code is an upgrade code, the second execution strategy is determined to be the strategy to upgrade the system. The corresponding second execution strategy can be determined according to the exit code, which realizes the standardized management of the input / output process, reduces the risk of program chaos to a certain extent, and further improves the reliability and stability of the input / output process.
[0149] In the embodiments of this application, by determining the exit code corresponding to the first input / output process based on the interrupt information, and determining the second execution strategy corresponding to the first input / output process based on the exit code, the exit code can be manually set and matched one-to-one with the second execution strategy, which further improves the standardization of input / output process management and reduces the possibility of input / output process freezing.
[0150] Step 204: Control the storage system or the first input / output process based on the second execution strategy to handle interruptions of the first input / output process.
[0151] In the embodiments of this application, the implementation of this step can be referred to the embodiment of step 104, and will not be repeated here.
[0152] Optionally, step 204 may include the following sub-steps: Sub-step 2041: If the second execution strategy is the termination of input / output process strategy, terminate the first input / output process.
[0153] In the embodiments of this application, the strategy of terminating the input / output process can represent a normal exit from the input / output process. In this case, the input / output process can be executed normally. Therefore, when the second execution strategy is the strategy of terminating the input / output process, the storage system can actively terminate the first input / output process.
[0154] Sub-step 2042: If the second execution strategy is the storage system restart strategy, restart the storage system.
[0155] In the embodiments of this application, the storage system restart policy can represent a power-down restart operation on the storage system. When the second execution policy is to restart the storage system, the storage system can be restarted.
[0156] Sub-step 2043: If the second execution strategy is the restart input / output process strategy, roll back the processing progress of the first input / output process and restart the first input / output process.
[0157] In embodiments of this application, the strategy for restarting the input / output process may include rolling back the processing progress of the input / output process and restarting the input / output process. When the second execution strategy is to restart the input / output process, it indicates that the first input / output process has not been executed correctly. At this time, the processing progress of the first input / output process can be rolled back, and the first input / output process can be restarted.
[0158] Sub-step 2044: If the second execution strategy is the system upgrade strategy, perform a system upgrade on the storage system.
[0159] In the embodiments of this application, when the second execution strategy is a system upgrade strategy, the storage system can be upgraded.
[0160] Optionally, sub-step 2044 may include the following sub-steps: Sub-step E1: If the second execution strategy is the system upgrade strategy and the second input / output process is being processed, continue processing the second input / output process.
[0161] In the embodiments of this application, if the storage system has received a system upgrade instruction, it can determine whether there is currently an input / output process being processed. If a second input / output process is being processed, it can continue processing the second input / output process first.
[0162] Sub-step E2 involves upgrading the storage system after the second input / output process has completed.
[0163] In the embodiments of this application, if the second input / output process has finished processing, a system upgrade of the storage system can begin.
[0164] In the embodiments of this application, by continuing to process the second input / output process when the second execution strategy is a system upgrade strategy and the second input / output process is being processed, and performing a system upgrade on the storage system after the second input / output process is completed, the system can be upgraded after the input / output process is completed, avoiding unnecessary interruptions to the input / output process and further improving the reliability and stability of the input process.
[0165] In the embodiments of this application, by terminating the first input / output process when the second execution strategy is to terminate the input / output process, restarting the storage system when the second execution strategy is to restart the storage system, rolling back the processing progress of the first input / output process and restarting the first input / output process when the second execution strategy is to restart the input / output process, and upgrading the storage system when the second execution strategy is to upgrade the system, the exit method of the input / output process can be managed, and a corresponding second execution strategy can be formulated based on the signals received by the storage system. This reduces the risk of program errors and program chaos to a certain extent, avoids freezing, and further improves the reliability and stability of the input / output process.
[0166] Step 205: Add a watchdog timer to the storage system and inject watchdog code into the execution program of the first input / output process; wherein, the watchdog code is used to send a watchdog signal to the watchdog timer based on a first duration; the watchdog timer is used to receive the watchdog signal based on the first duration.
[0167] In the embodiments of this application, a watchdog timer is a means of monitoring the operating status of a system, achieved through a combination of hardware and software. Stable-running software will "feed" the watchdog after executing specific instructions. If the watchdog does not receive a feeding signal from the software within a certain period, it is considered a system malfunction, and an interrupt handler or forced system reset will be initiated. After the system powers on, the timing for enabling the watchdog timer can be selected according to different operating modes. If the watchdog timer is enabled, a counter starts counting. If the watchdog timer is not fed in time within the set period, a watchdog timeout will occur. The watchdog timer mainly consists of registers, a counter, and a barking module. Basic settings for the watchdog timer are configured through the registers, the counter calculates the barking time, and the barking module determines the interrupt or reset method issued after the watchdog timeout. Therefore, a watchdog timer can be added to the storage system, and feeding code can be injected into the execution program of the first input / output process. Thus, if the first input / output process is executed correctly, the feeding code will be executed, thereby preventing the watchdog timer from being triggered. The first duration can be the cycle of the dog feeding signal, which can be the same as the detection cycle of the watchdog.
[0168] Step 206: Determine the second duration between the last time the watchdog received the dog-feeding signal and the current time.
[0169] In embodiments of this application, a second time interval between the moment the watchdog last received a feeding signal and the current moment can be measured to determine this interval. This measurement can be performed using a timer or timer integrated into the storage system.
[0170] Step 207: If the second duration is greater than or equal to the first duration, send an interrupt signal to the first input / output process.
[0171] In the embodiments of this application, if the second duration is greater than or equal to the first duration, it can be considered that the dog-feeding code was not executed correctly during the execution of the input / output process, and thus it can be considered that an error occurred during the execution of the input / output process. At this time, an interrupt signal of the first input / output process can be sent to the storage system.
[0172] Step 208: Generate interrupt information corresponding to the interrupt signal.
[0173] In the embodiments of this application, corresponding interrupt information can be generated based on the interrupt signal so that the storage system can obtain the interrupt information.
[0174] In the embodiments of this application, a watchdog timer is added to the storage system, and watchdog code is injected into the execution program of the first input / output process. The watchdog code is used to send a watchdog signal to the watchdog based on a first duration. The watchdog receives the watchdog signal based on the first duration, determines a second duration between the last time the watchdog received the watchdog signal and the current time, and sends an interrupt signal to the first input / output process when the second duration is greater than or equal to the first duration, generating interrupt information corresponding to the interrupt signal. The watchdog timer can determine whether an error has occurred during the execution of the first input / output process, and can generate corresponding interrupt information when an error occurs, so that the storage system can handle errors in a timely manner, avoid the input / output process from freezing, and improve the stability and reliability of the storage system.
[0175] Step 209: Obtain the number of restarts of the first input / output process.
[0176] In the embodiments of this application, if an error occurs during the execution of the input / output process, the error may repeat. Therefore, the number of restarts of the first input / output process can be obtained.
[0177] Step 210: If the number of restarts is greater than or equal to the first threshold, send a fault prompt message to the user.
[0178] In the embodiments of this application, after obtaining the number of restarts of the first input / output process, the number of restarts can be compared with a first threshold. The first threshold can be manually set. If the number of restarts is greater than or equal to the first threshold, it can be considered that the error occurring during the execution of the input / output process cannot be resolved by the storage system. In this case, a fault prompt message can be sent to the user so that the user can handle the fault in a timely manner.
[0179] In the embodiments of this application, by obtaining the number of restarts of the first input / output process, and sending a fault prompt message to the user when the number of restarts is greater than or equal to a first threshold, the problem can be reported to the user in a timely manner when the input / output process execution error occurs repeatedly a certain number of times, thus avoiding the storage system from being in such a cycle and improving the security and availability of the storage system.
[0180] like Figure 3 As shown, Figure 3 This is a schematic diagram of a processing flow provided in an embodiment of this application. In the diagram, the master starts the storage system, then sets the watchdog timer cycle and starts the watchdog. The watchdog can correctly perform monitoring functions based on the watchdog driver. After the watchdog starts, it can check if the watchdog timeout has occurred, and simultaneously check if the storage system hardware is functioning correctly. If normal, the startup code is determined to be a normal code, and the exit code log file can be read; if the hardware is damaged, the startup code is determined to be a fault code. Then, the IO process can be started according to the startup code. After the IO process starts, the watchdog timeout can be set, and the various functional modules of the IO process can be initialized according to the startup code, providing the corresponding functions of the IO process. Then, the exit code management module can be started. If the IO process exits, its exit code can be read. If the exit code is an abnormal exit code, the IO process is killed and restarted; if the exit code is an active restart code, the storage system is restarted; if the exit code is an upgrade code, the storage system is upgraded and then restarted; if the exit code is an execution completion code, the process ends. When the startup code is determined to be a fault code, it can also be determined whether an I / O process exists. If it does, the I / O process will be killed. Additionally, if the watchdog timeout occurs and an I / O process exists, the I / O process can also be killed.
[0181] like Figure 4 As shown, Figure 4 A logic block diagram of an input / output process processing device provided in this application embodiment, the device 400 may include: The first acquisition module 401 is used to acquire the operating status information of the storage system; the status information includes at least one of system operating information, health status information, and system maintenance information.
[0182] The startup module 402 is used to determine the first execution strategy corresponding to the first input / output process in the storage system based on the running status information, and to start the first input / output process based on the first execution strategy.
[0183] The first determining module 403 is used to obtain interrupt information for the first input / output process and determine the second execution strategy corresponding to the first input / output process based on the interrupt information.
[0184] The processing module 404 is used to control the storage system or the first input / output process based on the second execution strategy to handle interruptions of the first input / output process.
[0185] Optionally, the startup module 402 includes: The first determining submodule is used to determine the startup code corresponding to the first input / output process based on the running status information.
[0186] The second determining submodule is used to determine the first execution strategy corresponding to the first input / output process based on the startup code.
[0187] Optionally, the startup code includes one of a normal code, a fault code, a warm start code, and an upgrade code, and the first determining submodule includes: The first determining unit is configured to determine the boot code as the fault code when the health status information indicates that the hardware of the storage system is in a fault state.
[0188] The second determining unit is configured to determine the boot code as the warm boot code when the system operation information indicates that the storage system has not started executing the first input / output process after power-on.
[0189] The third determining unit is used to determine the boot code as the upgrade code when the system maintenance information indicates that the storage system should be upgraded.
[0190] The fourth determining unit is used to determine the boot code as the normal code when the operating status information indicates that the storage system is normal.
[0191] Optionally, the first execution strategy includes one of the following: normal startup strategy, maintenance mode startup strategy, cluster creation strategy, and system upgrade strategy; the second determining submodule includes: The first strategy determination unit is configured to determine that the first execution strategy is the maintenance mode startup strategy when the startup code is the fault code.
[0192] The second strategy determination unit is used to determine the first execution strategy as the cluster creation strategy when the startup code is the hot start code.
[0193] The third strategy determination unit is used to determine that the first execution strategy is the system upgrade strategy when the startup code is the upgrade code.
[0194] The fourth strategy determination unit is used to determine the first execution strategy as the normal startup strategy when the startup code is the normal code.
[0195] Optionally, the first determining module 403 includes: The third determining submodule is used to determine the exit code corresponding to the first input / output process based on the interrupt information.
[0196] The fourth determination submodule is used to determine the second execution strategy corresponding to the first input / output process based on the exit code.
[0197] Optionally, the exit codes include abnormal exit codes, active restart codes, execution completion codes, and upgrade codes; the third determining submodule includes: The fifth determining unit is used to determine the exit code as the execution completion code when the interrupt information indicates that the first input / output process has been executed normally.
[0198] The sixth determining unit is used to determine that the exit code is the active restart code when the interrupt information indicates that the storage system has received a restart signal.
[0199] The seventh determining unit is configured to determine the exit code as the abnormal exit code when the interrupt information indicates that the first input / output process has exited abnormally.
[0200] The eighth determining unit is configured to determine the exit code as the upgrade code when the interrupt information indicates that the storage system has received an upgrade signal.
[0201] Optionally, the second execution strategy includes a storage system restart strategy, an input / output process restart strategy, a system upgrade strategy, and an input / output process termination strategy. The fourth determining submodule includes: The fifth strategy determination unit is used to determine the second execution strategy as the strategy to terminate the input / output process when the exit code is the execution completion code.
[0202] The sixth strategy determination unit is used to determine the second execution strategy as the storage system restart strategy when the exit code is the active restart code.
[0203] The seventh strategy determination unit is used to determine that the second execution strategy is the strategy of restarting the input / output process when the exit code is the abnormal exit code.
[0204] The eighth strategy determination unit is used to determine the second execution strategy as the system upgrade strategy when the exit code is the upgrade code.
[0205] Optionally, the processing module 404 includes: The first processing submodule is used to terminate the first input / output process when the second execution strategy is the termination input / output process strategy.
[0206] The second processing submodule is used to restart the storage system when the second execution strategy is the storage system restart strategy.
[0207] The third processing submodule is used to roll back the processing progress of the first input / output process and restart the first input / output process when the second execution strategy is the restart input / output process strategy.
[0208] The fourth processing submodule is used to perform a system upgrade on the storage system when the second execution strategy is the system upgrade strategy.
[0209] Optionally, the fourth processing submodule includes: The first processing unit is configured to continue processing the second input / output process when the second execution strategy is the system upgrade strategy and the second input / output process is being processed.
[0210] The second processing unit is used to perform a system upgrade on the storage system after the second input / output process has been completed.
[0211] Optionally, the device 400 further includes: The second acquisition module is used to acquire the number of times the first input / output process has been restarted.
[0212] The prompt module is used to send a fault prompt message to the user when the number of restarts is greater than or equal to a first threshold.
[0213] Optionally, the device 400 further includes: A watchdog injection module is used to add a watchdog to the storage system and inject watchdog-feeding code into the execution program of the first input / output process; wherein, the watchdog-feeding code is used to send a watchdog-feeding signal to the watchdog based on a first duration; and the watchdog is used to receive the watchdog-feeding signal based on the first duration.
[0214] The second determining module is used to determine a second duration between the time when the watchdog last received the dog-feeding signal and the current time.
[0215] The sending module is configured to send an interrupt signal to the first input / output process when the second duration is greater than or equal to the first duration.
[0216] The generation module is used to generate interrupt information corresponding to the interrupt signal.
[0217] In summary, the input / output process processing device provided in this application includes a first acquisition module for acquiring the operating status information of a storage system; the status information includes at least one of system operating information, health status information, and system maintenance information; a startup module for determining a first execution strategy corresponding to a first input / output process in the storage system based on the operating status information, and starting the first input / output process based on the first execution strategy; a first determination module for acquiring interrupt information for the first input / output process, and determining a second execution strategy corresponding to the first input / output process based on the interrupt information; and a processing module for controlling the storage system or the first input / output process based on the second execution strategy to process interrupts of the first input / output process. This allows for timely processing of the input / output process when an interrupt occurs, effectively preventing process freezing and improving the reliability and stability of the input / output process.
[0218] The input / output process processing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a GPU BOX, mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0219] The input / output process processing device in this application embodiment can be a device with an operating system. This operating system can be Android, Linux, Windows, or other possible operating systems; this application embodiment does not specifically limit it.
[0220] The input / output process processing device provided in this application embodiment can achieve... Figures 1 to 3The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0221] Optionally, such as Figure 5 As shown, this application embodiment also provides an electronic device M00, including a processor M01 and a memory M02. The memory M02 stores a program or instructions that can run on the processor M01. When the program or instructions are executed by the processor M01, they implement the various steps of the above-described input / output process processing method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0222] In embodiments of this application, the memory M02 can be used to store software programs and various data. The memory M02 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, applications or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory M02 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory M02 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0223] The processor M01 may include one or more processing units; optionally, the processor M01 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor M01.
[0224] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described input / output process processing method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0225] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0226] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described input / output process processing method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0227] It should be understood that the chip involved in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0228] This application provides a computer program product that is stored in a storage medium and executed by at least one processor to implement the various processes of the input / output process processing method embodiments described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0229] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0230] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0231] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. An input / output process processing method, characterized in that, The method includes: Obtain the operating status information of the storage system; the status information includes at least one of system operating information, health status information, and system maintenance information. Based on the running status information, a first execution strategy corresponding to the first input / output process in the storage system is determined, and the first input / output process is started based on the first execution strategy. Obtain interrupt information for the first input / output process, and determine the second execution strategy corresponding to the first input / output process based on the interrupt information; The storage system or the first input / output process is controlled based on the second execution strategy to handle interruptions of the first input / output process.
2. The method according to claim 1, characterized in that, Determining the first execution strategy corresponding to the first input / output process in the storage system based on the running status information includes: The startup code corresponding to the first input / output process is determined based on the running status information; The first execution strategy corresponding to the first input / output process is determined based on the startup code.
3. The method according to claim 2, characterized in that, The startup code includes one of a normal code, a fault code, a warm start code, and an upgrade code. Determining the startup code corresponding to the first input / output process based on the running status information includes: If the health status information indicates that the hardware of the storage system is in a fault state, the boot code is determined to be the fault code; If the system operation information indicates that the storage system has not started executing the first input / output process after power-on, the boot code is determined to be the warm boot code; When the system maintenance information instructs the storage system to perform a system upgrade, the boot code is determined to be the upgrade code; If the operating status information indicates that the storage system is normal, the boot code is determined to be the normal code.
4. The method according to claim 3, characterized in that, The first execution strategy includes one of the following: normal startup strategy, maintenance mode startup strategy, cluster creation strategy, and system upgrade strategy. Determining the first execution strategy corresponding to the first input / output process based on the startup code includes: If the startup code is the fault code, the first execution strategy is determined to be the maintenance mode startup strategy; If the startup code is the hot start code, the first execution strategy is determined to be the cluster creation strategy; If the startup code is the upgrade code, the first execution strategy is determined to be the system upgrade strategy; If the startup code is the normal code, then the first execution strategy is determined to be the normal startup strategy.
5. The method according to claim 1, characterized in that, The step of determining the second execution strategy corresponding to the first input / output process based on the interrupt information includes: Based on the interrupt information, determine the exit code corresponding to the first input / output process; The second execution strategy corresponding to the first input / output process is determined based on the exit code.
6. The method according to claim 5, characterized in that, The exit codes include abnormal exit codes, active restart codes, execution completion codes, and upgrade codes. Determining the exit code corresponding to the first input / output process based on the interrupt information includes: If the interrupt information indicates that the first input / output process has been completed normally, the exit code is determined to be the execution completion code; If the interrupt information indicates that the storage system has received a restart signal, the exit code is determined to be the active restart code; If the interrupt information indicates that the first input / output process has exited abnormally, the exit code is determined to be the abnormal exit code. If the interrupt information indicates that the storage system has received an upgrade signal, the exit code is determined to be the upgrade code.
7. The method according to claim 6, characterized in that, The second execution strategy includes a storage system restart strategy, an input / output process restart strategy, a system upgrade strategy, and an input / output process termination strategy. Determining the second execution strategy corresponding to the first input / output process based on the exit code includes: If the exit code is the execution completion code, the second execution strategy is determined to be the strategy to terminate the input / output process; If the exit code is the active restart code, the second execution strategy is determined to be the storage system restart strategy; If the exit code is the abnormal exit code, the second execution strategy is determined to be the strategy of restarting the input / output process; If the exit code is the upgrade code, then the second execution strategy is determined to be the system upgrade strategy.
8. The method according to claim 7, characterized in that, The step of controlling the storage system or the first input / output process based on the second execution strategy to handle interruptions of the first input / output process includes: If the second execution strategy is the strategy to terminate the input / output process, then the first input / output process is terminated; If the second execution strategy is the storage system restart strategy, then the storage system is restarted; If the second execution strategy is the restart input / output process strategy, roll back the processing progress of the first input / output process and restart the first input / output process; When the second execution strategy is the system upgrade strategy, the storage system is upgraded.
9. The method according to claim 8, characterized in that, The system upgrade of the storage system includes: If the second execution strategy is the system upgrade strategy and the second input / output process is being processed, continue processing the second input / output process; Once the second input / output process is complete, the storage system is upgraded.
10. The method according to claim 1, characterized in that, The method further includes: Obtain the number of restarts for the first input / output process; If the number of restarts is greater than or equal to the first threshold, a fault notification message is sent to the user.
11. The method according to claim 1, characterized in that, The method further includes: A watchdog timer is added to the storage system, and watchdog-feeding code is injected into the execution program of the first input / output process; wherein, the watchdog-feeding code is used to send a watchdog-feeding signal to the watchdog based on a first duration; the watchdog timer is used to receive the watchdog-feeding signal based on the first duration; Determine a second duration between the moment when the watchdog last received the dog-feeding signal and the current moment; If the second duration is greater than or equal to the first duration, an interrupt signal is sent to the first input / output process; The interrupt information corresponding to the interrupt signal is generated.
12. An input / output process processing device, characterized in that, The device includes: The first acquisition module is used to acquire the operating status information of the storage system; the status information includes at least one of system operating information, health status information, and system maintenance information. The startup module is used to determine the first execution strategy corresponding to the first input / output process in the storage system based on the running status information, and to start the first input / output process based on the first execution strategy. The first determining module is used to acquire interrupt information for the first input / output process and determine the second execution strategy corresponding to the first input / output process based on the interrupt information. The processing module is used to control the storage system or the first input / output process based on the second execution strategy, so as to handle the interruption of the first input / output process.
13. An electronic device, characterized in that, The device includes the input / output process processing apparatus of claim 12, for implementing the input / output process processing method of any one of claims 1 to 11.
14. A storage medium, characterized in that, The storage medium stores a program or instructions, which, when executed by a processor, implement the input / output process processing method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Realization progress start-up and control process
CN101290587A
Consistency hash-based numa resource binding relationship monitoring tool
CN115658423A