A network card storage drive upgrading method and device, electronic equipment and storage medium
By configuring multiple PCIe devices on the network card and switching the storage driver, the problem of service interruption during the smart network card storage driver upgrade was solved, and seamless service continuity was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CLOUD TECH CO LTD
- Filing Date
- 2022-12-29
- Publication Date
- 2026-04-14
AI Technical Summary
During the upgrade of the smart network card storage driver, users experienced issues such as slowdowns or even interruptions in storage services.
By configuring multiple PCIe devices on the network card and switching between lower and higher versions of the storage driver during the storage driver upgrade process, we can ensure that input/output requests are continuously processed during the upgrade.
It achieves seamless service continuity during network card storage driver upgrades, avoiding storage service lag and interruption.
Smart Images

Figure CN116107604B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of driver technology, and in particular to a method, apparatus, electronic device, and storage medium for upgrading network card storage drivers. Background Technology
[0002] When upgrading the smart network card storage driver, the following steps need to be completed: 1. Kill the old version storage driver process; 2. Start the new version storage driver process; 3. Load the mapping relationship between the host peripheral component interface interconnect PCIe device and the back-end storage into the new storage driver process.
[0003] Before the smart network interface card (NIC) storage driver upgrade process is fully completed, I / O (input / output) requests issued by the host PCIe device to the PCIe device on the smart NIC cannot be processed. Users will experience noticeable lag or even interruption in their storage services. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a network card storage driver upgrade method, apparatus, electronic device and storage medium that overcomes or at least partially solves the above problems.
[0005] To address the aforementioned problems, in a first aspect, embodiments of the present invention disclose a network interface card (NIC) storage driver upgrade method. The NIC is configured with a first peripheral component interconnect (PCIe) device and a second PCIe device. The first PCIe device is equipped with a first storage driver. The first PCIe device and the second PCIe device are communicatively connected to a host. The method includes:
[0006] When the network card storage driver upgrade is not triggered, the input / output requests sent by the host are received through the first PCIe device, and the input / output requests sent by the host are processed through the first storage driver.
[0007] When the network card storage driver upgrade is triggered, the second storage driver is started and mounted to the second PCIe device;
[0008] In response to the completion of the network card storage driver upgrade, the system receives input / output requests sent by the host through the second PCIe device, processes the input / output requests sent by the host through the second storage driver, and exits the first storage driver.
[0009] Optionally, the host is configured with a third PCIe device, and the step of receiving input / output requests sent by the host through the first PCIe device includes:
[0010] The third PCIe device receives input / output requests sent by the host.
[0011] The input / output request is sent from the third PCIe device to the first PCIe device via the network card.
[0012] The input / output request is received through the first PCIe device;
[0013] The step of receiving input / output requests sent by the host through the second PCIe device includes:
[0014] The third PCIe device receives input / output requests sent by the host.
[0015] The input / output request is sent from the third PCIe device to the second PCIe device via the network card.
[0016] The input / output request is received through the second PCIe device.
[0017] Optionally, the first storage driver and the second storage driver store a mapping relationship between a third PCIe device and back-end storage. This mapping relationship indicates the correspondence between an input / output request sent by the third PCIe device and a back-end device used to receive the input / output request. The step of processing the input / output request sent by the host through the first storage driver includes:
[0018] The network card obtains the input / output request and third PCIe device information from the first PCIe device through the first storage driver. The third PCIe device information includes a third PCIe device number and is generated by the network card when it sends the input / output request from the third PCIe device to the first PCIe device.
[0019] The first storage driver locates the corresponding backend device for receiving the input / output request based on the third PCIe device information and the mapping relationship, and sends the input / output request to the corresponding backend device.
[0020] The process of processing input / output requests sent by the host through the second storage driver includes:
[0021] The network card obtains the input / output request and the third PCIe device information from the second PCIe device through the second storage driver. The third PCIe device information includes the third PCIe device number and is generated by the network card when it sends the input / output request from the third PCIe device to the second PCIe device.
[0022] The second storage driver locates the corresponding backend device for receiving the input / output request based on the third PCIe device information and the mapping relationship, and sends the input / output request to the corresponding backend device.
[0023] Optionally, the method further includes:
[0024] In response to the completion of the network card storage driver upgrade and the completion of the input / output request sent by the first storage driver by the backend device, the second PCIe device receives the input / output request sent by the host, processes the input / output request sent by the host through the second storage driver, and exits the first storage driver.
[0025] Optionally, the step of responding to the completion of the network card storage driver upgrade, receiving input / output requests sent by the host through the second PCIe device, processing the input / output requests sent by the host through the second storage driver, and exiting the first storage driver includes:
[0026] Obtain the mapping relationship between the third PCIe device and the back-end storage, wherein the mapping relationship is used to indicate the correspondence between the input / output request sent by the third PCIe device and the back-end device used to receive the input / output request;
[0027] After mounting the second storage driver to the second PCIe device, the mapping relationship is loaded into the second storage driver;
[0028] Once the second storage driver is loaded, it receives input / output requests sent by the host through the second PCIe device, processes the input / output requests sent by the host through the second storage driver, and exits the first storage driver.
[0029] Optionally, the step of exiting the first storage driver in response to the completion of the network card storage driver upgrade includes:
[0030] In response to the completion of the network card storage driver upgrade, stop sending input / output requests to the first PCIe device;
[0031] In response to the first storage driver having finished processing the input / output request, the first storage driver exits.
[0032] Optionally, mounting the second storage driver to the second PCIe device includes:
[0033] Activate the second PCIe device and access the second PCIe device through the second storage driver.
[0034] Secondly, embodiments of the present invention disclose a network interface card (NIC) storage driver upgrade device. The NIC is configured with a first peripheral component interconnect (PCIe) device and a second PCIe device. The first PCIe device is equipped with a first storage driver. The first PCIe device and the second PCIe device are communicatively connected to a host. The device includes:
[0035] The first input / output request processing module is used to receive input / output requests sent by the host through the first PCIe device and process the input / output requests sent by the host through the first storage driver when the network card storage driver upgrade is not triggered.
[0036] The storage driver upgrade module is used to start the second storage driver and mount the second storage driver to the second PCIe device when the network card storage driver upgrade is triggered.
[0037] The second input / output request processing module is used to respond to the completion of the network card storage driver upgrade by receiving input / output requests sent by the host through the second PCIe device, processing the input / output requests sent by the host through the second storage driver, and sending an exit command to the first storage driver to cause the first storage driver to exit.
[0038] Optionally, the host is configured with a third PCIe device, and the first input / output request processing module is specifically used for:
[0039] The third PCIe device receives input / output requests sent by the host.
[0040] The input / output request is sent from the third PCIe device to the first PCIe device via the network card.
[0041] The input / output request is received through the first PCIe device;
[0042] The second input / output request processing module is specifically used for:
[0043] The third PCIe device receives input / output requests sent by the host.
[0044] The input / output request is sent from the third PCIe device to the second PCIe device via the network card.
[0045] The input / output request is received through the second PCIe device.
[0046] Optionally, the first storage driver and the second storage driver store a mapping relationship between a third PCIe device and back-end storage. This mapping relationship indicates the correspondence between input / output requests sent by the third PCIe device and the back-end device used to receive the input / output requests. The first input / output request processing module is specifically used for:
[0047] The network card obtains the input / output request and third PCIe device information from the first PCIe device through the first storage driver. The third PCIe device information includes a third PCIe device number and is generated by the network card when it sends the input / output request from the third PCIe device to the first PCIe device.
[0048] The first storage driver locates the corresponding backend device for receiving the input / output request based on the third PCIe device information and the mapping relationship, and sends the input / output request to the corresponding backend device.
[0049] The second input / output request processing module is specifically used for:
[0050] The network card obtains the input / output request and the third PCIe device information from the second PCIe device through the second storage driver. The third PCIe device information includes the third PCIe device number and is generated by the network card when it sends the input / output request from the third PCIe device to the second PCIe device.
[0051] The second storage driver locates the corresponding backend device for receiving the input / output request based on the third PCIe device information and the mapping relationship, and sends the input / output request to the corresponding backend device.
[0052] Optionally, the second input / output request processing module is further configured to:
[0053] In response to the completion of the network card storage driver upgrade and the completion of the input / output request sent by the first storage driver by the backend device, the second PCIe device receives the input / output request sent by the host, processes the input / output request sent by the host by the second storage driver, and sends an exit command to the first storage driver to cause the first storage driver to exit.
[0054] Optionally, the second input / output request processing module is specifically used for:
[0055] Obtain the mapping relationship between the third PCIe device and the back-end storage, wherein the mapping relationship is used to indicate the correspondence between the input / output request sent by the third PCIe device and the back-end device used to receive the input / output request;
[0056] After mounting the second storage driver to the second PCIe device, the mapping relationship is loaded into the second storage driver;
[0057] Once the second storage driver is loaded, it receives input / output requests sent by the host through the second PCIe device, processes the input / output requests sent by the host through the second storage driver, and sends an exit command to the first storage driver to cause the first storage driver to exit.
[0058] Optionally, the second input / output request processing module is specifically used for:
[0059] In response to the completion of the network card storage driver upgrade, stop sending input / output requests to the first PCIe device;
[0060] In response to the first storage driver having finished processing the input / output request, the first storage driver exits.
[0061] Optionally, the storage driver upgrade module is specifically used for:
[0062] Activate the second PCIe device and access the second PCIe device through the second storage driver.
[0063] Thirdly, the present invention discloses an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the network card storage driver upgrade method as described in the first aspect.
[0064] Fourthly, the present invention discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the network card storage driver upgrade method as described in the first aspect.
[0065] The embodiments of the present invention have the following advantages:
[0066] When the network interface card (NIC) storage driver upgrade is not triggered, input / output requests sent by the host are received through the first PCIe device on the NIC, and processed by the first storage driver. When the NIC storage driver upgrade is triggered, the second storage driver is started and mounted to the second PCIe device. In response to the completion of the NIC storage driver upgrade, input / output requests sent by the host are received through the second PCIe device, processed by the second storage driver, and the first storage driver is exited. This method allows the NIC to continuously process input / output requests sent by the host during the NIC storage driver upgrade, thereby avoiding storage service lag or even interruption. Attached Figure Description
[0067] Figure 1 This is a flowchart of the steps of a network card storage driver upgrade method provided in an embodiment of the present invention;
[0068] Figure 2 This is a schematic diagram of a network card storage driver upgrade method provided in an embodiment of the present invention;
[0069] Figure 3 This is a structural block diagram of a network card storage driver upgrade device provided in an embodiment of the present invention. Detailed Implementation
[0070] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0071] In existing traditional technologies, smart network interface cards (NICs) only provide one PCIe device to receive input / output requests sent by the host. Therefore, during the upgrade of the smart NIC storage driver, user storage services may be slowed down or even interrupted.
[0072] One of the core concepts of this invention is that the network card provides multiple PCIe devices to receive input / output requests sent by the host, and provides a storage driver switching function between network card PCIe devices. When the network card storage driver is upgraded, the lower version storage driver is run first. After the higher version storage driver runs normally and provides services, the lower version process automatically exits and the higher version storage driver is run. The whole process is imperceptible to the user and the storage service is uninterrupted.
[0073] Reference Figure 1 The diagram illustrates a flowchart of a network interface card (NIC) storage driver upgrade method according to an embodiment of the present invention. The NIC is configured with a first peripheral component interconnect (PCIe) device and a second PCIe device. The first PCIe device is equipped with a first storage driver. The first PCIe device and the second PCIe device are communicatively connected to the host. The method may specifically include the following steps:
[0074] Step 101: When the network card storage driver upgrade is not triggered, the input / output request sent by the host is received through the first PCIe device, and the input / output request sent by the host is processed through the first storage driver.
[0075] PCIe (Peripheral Component Interconnect) devices are devices that conform to the PCIe bus standard. PCIe devices can receive and send input / output requests.
[0076] A network card is typically configured with multiple PCIe devices. In this application, at least two of the PCIe devices are activated and used to receive input / output requests sent by the host. The two PCIe devices are the first PCIe device and the second PCIe device, respectively. In this application, there is no restriction on the order in which the PCIe devices on the network card are used.
[0077] When the network card storage driver upgrade is not triggered, the input / output requests sent by the host can be received through the first PCIe device, and the input / output requests sent by the host can be processed through the first storage driver.
[0078] In one embodiment, a third PCIe device is configured on the host, and the host receives input / output requests sent by the host through a first PCIe device, including: receiving input / output requests sent by the host through the third PCIe device; sending the input / output requests from the third PCIe device to the first PCIe device through a network interface card (NIC); and receiving the input / output requests through the first PCIe device.
[0079] The host computer is configured with multiple PCIe devices. These devices are used to receive input / output requests from the host and, via the network interface card (NIC), to send these requests to the corresponding PCIe devices on the NIC. In this invention, the third PCIe device can be any PCIe device on the host used for receiving and sending input / output requests. When the third PCIe device receives an input / output request from the host, it can send the request to the first PCIe device via the NIC, and the first PCIe device receives the request.
[0080] In one embodiment, the first storage driver stores a mapping relationship between a third PCIe device and backend storage. The mapping relationship indicates the correspondence between an input / output request sent by the third PCIe device and a backend device for receiving the input / output request. Processing the input / output request sent by the host through the first storage driver includes: obtaining the input / output request and third PCIe device information from the first PCIe device through the first storage driver. The third PCIe device information includes a third PCIe device number, which is generated by the network card when sending the input / output request from the third PCIe device to the first PCIe device; and finding the corresponding backend device for receiving the input / output request based on the third PCIe device information and the mapping relationship through the first storage driver, and sending the input / output request to the corresponding backend device.
[0081] After an input / output request sent by the host is forwarded to the PCIe device on the network interface card (NIC), a backend device is needed to receive and complete this input / output request. Therefore, a mapping relationship needs to be established between the third-party PCIe device and the backend storage, so that the backend device used to receive the input / output request sent by the third-party PCIe device can be found through the mapping relationship.
[0082] This mapping relationship is stored in the network card storage driver. Therefore, when the first storage driver obtains the input / output request and the third PCIe device information from the first PCIe device, it can find the corresponding back-end device for receiving the input / output request based on the third PCIe device information and the mapping relationship, and send the input / output request to the corresponding back-end device.
[0083] Step 102: When the network card storage driver upgrade is triggered, start the second storage driver and mount the second storage driver to the second PCIe device.
[0084] When a network card storage driver upgrade is triggered, a second storage driver can be started and mounted to a second PCIe device.
[0085] Attaching a second storage driver to a second PCIe device may include: activating the second PCIe device and accessing the second PCIe device through the second storage driver. A network card may be configured with multiple PCIe devices, but typically only one PCIe device is activated and used to receive input / output requests from the host. When a network card storage driver upgrade is triggered, the second PCIe device can be activated, enabling it to also receive input / output requests from the host, and allowing the second storage driver to access the second PCIe device and obtain input / output requests from it.
[0086] Step 103: In response to the completion of the network card storage driver upgrade, receive input / output requests sent by the host through the second PCIe device, process the input / output requests sent by the host through the second storage driver, and exit the first storage driver.
[0087] When the network card storage driver upgrade is complete, the second PCIe device can begin receiving input / output requests from the host, and the second storage driver can access the second PCIe device, retrieve input / output requests from the second PCIe device, and process the input / output requests. Simultaneously, when the network card storage driver upgrade is complete, the first storage driver exits.
[0088] In one embodiment, the host is configured with a third PCIe device, and the second PCIe device is used to receive input / output requests sent by the host, including: receiving the input / output requests sent by the host through the third PCIe device; sending the input / output requests from the third PCIe device to the second PCIe device through the network interface card; and receiving the input / output requests through the second PCIe device.
[0089] In one embodiment, the second storage driver stores a mapping relationship between a third PCIe device and backend storage. The mapping relationship indicates the correspondence between input / output requests sent by the third PCIe device and the backend device used to receive the input / output requests. Processing the input / output requests sent by the host through the second storage driver includes: obtaining the input / output requests and third PCIe device information from the second PCIe device through the second storage driver. The third PCIe device information includes a third PCIe device number, which is generated by the network card when sending the input / output requests from the third PCIe device to the second PCIe device; and using the second storage driver, finding the corresponding backend device used to receive the input / output requests based on the third PCIe device information and the mapping relationship, and sending the input / output requests to the corresponding backend device.
[0090] In one embodiment, step 103 may include the following sub-steps:
[0091] Sub-step S11: Obtain the mapping relationship between the third PCIe device and the back-end storage. The mapping relationship is used to indicate the correspondence between the input / output requests sent by the third PCIe device and the back-end device used to receive the input / output requests.
[0092] Sub-step S12: After mounting the second storage driver to the second PCIe device, the mapping relationship is loaded into the second storage driver;
[0093] Sub-step S13: After the second storage driver is loaded, the input / output request sent by the host is received through the second PCIe device, and the input / output request sent by the host is processed through the second storage driver, and the first storage driver is exited.
[0094] After obtaining the mapping relationship between the third PCIe device and the back-end storage, the mapping relationship can be loaded into the second storage driver, which can be obtained from the first storage driver. Once the second storage driver has loaded the mapping relationship, the second PCIe device can begin receiving input / output requests sent by the host, processing these requests through the second storage driver, and exiting the first storage driver.
[0095] In one embodiment, exiting the first storage driver in response to the completion of the network interface card (NIC) storage driver upgrade may include: stopping sending input / output requests to the first PCIe device in response to the completion of the NIC storage driver upgrade; and exiting the first storage driver in response to the completion of processing the input / output requests.
[0096] When the network card storage driver upgrade is complete, it can stop sending input / output requests to the first PCIe device. Also, when the first storage driver finishes processing the remaining input / output requests, it can exit. The first storage driver can finish processing the remaining input / output requests in two ways: the first storage driver sends the unsent input / output requests to the corresponding backend device, or the first storage driver sends the unsent input / output requests to the corresponding backend device and receives an indication from the backend device that the input / output requests have been completed.
[0097] In one embodiment, in response to the completion of the network card storage driver upgrade and the completion of the input / output request sent by the first storage driver by the backend device, the second PCIe device receives the input / output request sent by the host, processes the input / output request sent by the host by the second storage driver, and exits the first storage driver.
[0098] When the network card storage driver upgrade is complete, the first storage driver can send any unprocessed input / output requests to the corresponding backend device. After the corresponding backend device receives and completes the input / output request, it can send a response message containing an indication that the input / output request has been completed. In response to this indication, the second PCIe device receives the input / output request sent by the host, processes the input / output request sent by the host through the second storage driver, and exits the first storage driver.
[0099] In one embodiment, after the network interface card (NIC) storage driver upgrade is complete, if another upgrade of the NIC storage driver is required, i.e., the second storage driver needs to be exited and a third storage driver used, the third storage driver can be started and attached to the first PCIe device. In response to the completion of the NIC storage driver upgrade, the first PCIe device receives input / output requests sent by the host, and the third storage driver processes these requests, while the second storage driver exits. Alternatively, the third storage driver can be attached to a fourth PCIe device on the NIC. In response to the completion of the NIC storage driver upgrade, the fourth PCIe device receives input / output requests sent by the host, and the third storage driver processes these requests, while the second storage driver exits.
[0100] Reference Figure 2 This diagram illustrates a network interface card (NIC) storage driver upgrade method according to an embodiment of the present invention. Before and during the NIC storage driver upgrade, the host sends input / output requests to the host PCIe device. The host PCIe device then forwards the input / output requests via the NIC to NIC PCIe device 1. The old storage driver obtains the input / output requests from NIC PCIe device 1 and sends them to the corresponding backend storage device according to the mapping relationship. After the upgrade is complete, the host PCIe device stops sending input / output requests to NIC PCIe device 1 and instead sends them to NIC PCIe device 2. The new storage driver obtains the input / output requests from NIC PCIe device 2 and sends them to the corresponding backend storage device according to the mapping relationship.
[0101] When the network interface card (NIC) storage driver upgrade is not triggered, input / output requests sent by the host are received through the first PCIe device on the NIC, and processed by the first storage driver. When the NIC storage driver upgrade is triggered, the second storage driver is started and mounted to the second PCIe device. In response to the completion of the NIC storage driver upgrade, input / output requests sent by the host are received through the second PCIe device, processed by the second storage driver, and the first storage driver is exited. This method allows the NIC to continuously process input / output requests sent by the host during the NIC storage driver upgrade, thereby avoiding storage service lag or even interruption.
[0102] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0103] Reference Figure 3 This diagram illustrates a structural block diagram of a network interface card (NIC) storage driver upgrade device according to an embodiment of the present invention. The NIC is configured with a first peripheral component interconnect (PCIe) device and a second PCIe device. The first PCIe device is equipped with a first storage driver. The first PCIe device and the second PCIe device are communicatively connected to the host. The device may specifically include the following modules:
[0104] The first input / output request processing module 201 is used to receive input / output requests sent by the host through the first PCIe device and process the input / output requests sent by the host through the first storage driver when the network card storage driver upgrade is not triggered.
[0105] The storage driver upgrade module 202 is used to start the second storage driver and mount the second storage driver to the second PCIe device when the network card storage driver upgrade is triggered.
[0106] The second input / output request processing module 203 is used to receive input / output requests sent by the host through the second PCIe device in response to the completion of the network card storage driver upgrade, process the input / output requests sent by the host through the second storage driver, and send an exit command to the first storage driver to cause the first storage driver to exit.
[0107] Optionally, a third PCIe device is configured on the host, and the first input / output request processing module 201 is specifically used for:
[0108] Receive input / output requests sent by the host through a third PCIe device;
[0109] The input / output request is sent from the third PCIe device to the first PCIe device via the network card;
[0110] Receive input / output requests through the first PCIe device;
[0111] The second input / output request processing module is specifically used for:
[0112] Receive input / output requests sent by the host through a third PCIe device;
[0113] The input / output request is sent from the third PCIe device to the second PCIe device via the network card;
[0114] Receive input / output requests through a second PCIe device.
[0115] Optionally, the first and second storage drivers store a mapping relationship between the third PCIe device and the back-end storage. This mapping relationship indicates the correspondence between input / output requests sent by the third PCIe device and the back-end device used to receive the input / output requests. Specifically, the first input / output request processing module is used for 201:
[0116] The network card obtains input / output requests and third PCIe device information from the first PCIe device through the first storage driver. The third PCIe device information includes the third PCIe device number and is generated by the network card when it sends input / output requests from the third PCIe device to the first PCIe device.
[0117] The first storage driver locates the corresponding backend device for receiving input / output requests based on the third PCIe device information and mapping relationship, and sends the input / output requests to the corresponding backend device.
[0118] The second input / output request processing module 203 is specifically used for:
[0119] The network card obtains input / output requests and third PCIe device information from the second PCIe device via the second storage driver. The third PCIe device information includes the third PCIe device number and is generated by the network card when sending input / output requests from the third PCIe device to the second PCIe device.
[0120] The second storage driver locates the corresponding backend device for receiving input / output requests based on the third PCIe device information and mapping relationship, and sends the input / output requests to the corresponding backend device.
[0121] Optionally, the second input / output request processing module 203 is also used for:
[0122] In response to the completion of the network card storage driver upgrade and the completion of the input / output request sent by the first storage driver by the backend device, the second PCIe device receives the input / output request sent by the host, processes the input / output request sent by the host by the second storage driver, and sends an exit command to the first storage driver to cause the first storage driver to exit.
[0123] Optionally, the second input / output request processing module 203 is specifically used for:
[0124] Obtain the mapping relationship between the third PCIe device and the back-end storage. The mapping relationship is used to indicate the correspondence between the input / output requests sent by the third PCIe device and the back-end device used to receive the input / output requests.
[0125] After mounting the second storage driver to the second PCIe device, the mapping relationship is loaded into the second storage driver;
[0126] Once the second storage driver is loaded, it receives input / output requests sent by the host through the second PCIe device, processes the input / output requests sent by the host through the second storage driver, and sends an exit command to the first storage driver to cause the first storage driver to exit.
[0127] Optionally, the second input / output request processing module 203 is specifically used for:
[0128] In response to the completion of the network card storage driver upgrade, stop sending input / output requests to the first PCIe device;
[0129] In response to the first storage driver having finished processing the input / output request, exit the first storage driver.
[0130] Optionally, the storage driver upgrade module 202 is specifically used for:
[0131] Activate the second PCIe device and access the second PCIe device through the second storage driver.
[0132] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0133] This invention also provides an electronic device, comprising:
[0134] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described network card storage driver upgrade method embodiment and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0135] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described network card storage driver upgrade method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0136] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0137] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0138] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0139] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0141] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0142] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device 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 terminal device. 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 terminal device that includes said element.
[0143] The present invention has provided a detailed description of a network card storage driver upgrade method, apparatus, electronic device, and storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for upgrading a network interface card (NIC) storage driver, wherein the NIC is configured with a first peripheral component interconnect (PCIe) device and a second PCIe device, the first PCIe device is equipped with a first storage driver, and the first PCIe device and the second PCIe device are communicatively connected to a host, characterized in that, The method includes: When the network card storage driver upgrade is not triggered, the input / output requests sent by the host are received through the first PCIe device, and the input / output requests sent by the host are processed through the first storage driver. When the network card storage driver upgrade is triggered, the second storage driver is started and mounted to the second PCIe device; In response to the completion of the network card storage driver upgrade, the system receives input / output requests sent by the host through the second PCIe device, processes the input / output requests sent by the host through the second storage driver, and exits the first storage driver. The host is configured with a third PCIe device, and the process of receiving input / output requests sent by the host through the first PCIe device includes: The third PCIe device receives input / output requests sent by the host. The input / output request is sent from the third PCIe device to the first PCIe device via the network card. The input / output request is received through the first PCIe device; The step of receiving input / output requests sent by the host through the second PCIe device includes: The third PCIe device receives input / output requests sent by the host. The input / output request is sent from the third PCIe device to the second PCIe device via the network card. The input / output request is received through the second PCIe device.
2. The network card storage driver upgrade method according to claim 1, characterized in that, The first and second storage drivers store a mapping relationship between a third PCIe device and back-end storage. This mapping relationship indicates the correspondence between an input / output request sent by the third PCIe device and a back-end device used to receive the input / output request. Processing the input / output request sent by the host through the first storage driver includes: The network card obtains the input / output request and third PCIe device information from the first PCIe device through the first storage driver. The third PCIe device information includes a third PCIe device number and is generated by the network card when it sends the input / output request from the third PCIe device to the first PCIe device. The first storage driver locates the corresponding backend device for receiving the input / output request based on the third PCIe device information and the mapping relationship, and sends the input / output request to the corresponding backend device. The process of processing input / output requests sent by the host through the second storage driver includes: The network card obtains the input / output request and the third PCIe device information from the second PCIe device through the second storage driver. The third PCIe device information includes the third PCIe device number and is generated by the network card when it sends the input / output request from the third PCIe device to the second PCIe device. The second storage driver locates the corresponding backend device for receiving the input / output request based on the third PCIe device information and the mapping relationship, and sends the input / output request to the corresponding backend device.
3. The network card storage driver upgrade method according to claim 2, characterized in that, The method further includes: In response to the completion of the network card storage driver upgrade and the completion of the input / output request sent by the first storage driver by the backend device, the second PCIe device receives the input / output request sent by the host, processes the input / output request sent by the host through the second storage driver, and exits the first storage driver.
4. The network card storage driver upgrade method according to claim 1, characterized in that, The step of responding to the completion of the network card storage driver upgrade, receiving input / output requests sent by the host through the second PCIe device, processing the input / output requests sent by the host through the second storage driver, and exiting the first storage driver includes: Obtain the mapping relationship between the third PCIe device and the back-end storage, wherein the mapping relationship is used to indicate the correspondence between the input / output request sent by the third PCIe device and the back-end device used to receive the input / output request; After mounting the second storage driver to the second PCIe device, the mapping relationship is loaded into the second storage driver; Once the second storage driver is loaded, it receives input / output requests sent by the host through the second PCIe device, processes the input / output requests sent by the host through the second storage driver, and exits the first storage driver.
5. The network card storage driver upgrade method according to claim 1, characterized in that, The step of exiting the first storage driver in response to the completion of the network card storage driver upgrade includes: In response to the completion of the network card storage driver upgrade, stop sending input / output requests to the first PCIe device; In response to the first storage driver having finished processing the input / output request, the first storage driver exits.
6. The network card storage driver upgrade method according to claim 1, characterized in that, The step of mounting the second storage driver to the second PCIe device includes: Activate the second PCIe device and access the second PCIe device through the second storage driver.
7. A network interface card (NIC) storage driver upgrade device, wherein the NIC is configured with a first peripheral component interconnect (PCIe) device and a second PCIe device, the first PCIe device is equipped with a first storage driver, and the first PCIe device and the second PCIe device are communicatively connected to a host, characterized in that, The device includes: The first input / output request processing module is used to receive input / output requests sent by the host through the first PCIe device and process the input / output requests sent by the host through the first storage driver when the network card storage driver upgrade is not triggered. The storage driver upgrade module is used to start the second storage driver and mount the second storage driver to the second PCIe device when the network card storage driver upgrade is triggered. The second input / output request processing module is used to respond to the completion of the network card storage driver upgrade by receiving input / output requests sent by the host through the second PCIe device, processing the input / output requests sent by the host through the second storage driver, and sending an exit command to the first storage driver to cause the first storage driver to exit. The host is configured with a third PCIe device, and the first input / output request processing module is specifically used for: The third PCIe device receives input / output requests sent by the host. The input / output request is sent from the third PCIe device to the first PCIe device via the network card. The input / output request is received through the first PCIe device; The second input / output request processing module is specifically used for: The third PCIe device receives input / output requests sent by the host. The input / output request is sent from the third PCIe device to the second PCIe device via the network card. The input / output request is received through the second PCIe device.
8. The network card storage driver upgrade device according to claim 7, characterized in that, The first storage driver and the second storage driver store a mapping relationship between a third PCIe device and back-end storage. This mapping relationship indicates the correspondence between input / output requests sent by the third PCIe device and the back-end device used to receive the input / output requests. The first input / output request processing module is specifically used for: The network card obtains the input / output request and third PCIe device information from the first PCIe device through the first storage driver. The third PCIe device information includes a third PCIe device number and is generated by the network card when it sends the input / output request from the third PCIe device to the first PCIe device. The first storage driver locates the corresponding backend device for receiving the input / output request based on the third PCIe device information and the mapping relationship, and sends the input / output request to the corresponding backend device. The second input / output request processing module is specifically used for: The network card obtains the input / output request and the third PCIe device information from the second PCIe device through the second storage driver. The third PCIe device information includes the third PCIe device number and is generated by the network card when it sends the input / output request from the third PCIe device to the second PCIe device. The second storage driver locates the corresponding backend device for receiving the input / output request based on the third PCIe device information and the mapping relationship, and sends the input / output request to the corresponding backend device.
9. The network card storage driver upgrade device according to claim 8, characterized in that, The second input / output request processing module is also used for: In response to the completion of the network card storage driver upgrade and the completion of the input / output request sent by the first storage driver by the backend device, the second PCIe device receives the input / output request sent by the host, processes the input / output request sent by the host by the second storage driver, and sends an exit command to the first storage driver to cause the first storage driver to exit.
10. The network card storage driver upgrade device according to claim 7, characterized in that, The second input / output request processing module is specifically used for: Obtain the mapping relationship between the third PCIe device and the back-end storage, wherein the mapping relationship is used to indicate the correspondence between the input / output request sent by the third PCIe device and the back-end device used to receive the input / output request; After mounting the second storage driver to the second PCIe device, the mapping relationship is loaded into the second storage driver; Once the second storage driver is loaded, it receives input / output requests sent by the host through the second PCIe device, processes the input / output requests sent by the host through the second storage driver, and sends an exit command to the first storage driver to cause the first storage driver to exit.
11. The network card storage driver upgrade device according to claim 7, characterized in that, The second input / output request processing module is specifically used for: In response to the completion of the network card storage driver upgrade, stop sending input / output requests to the first PCIe device; In response to the first storage driver having finished processing the input / output request, the first storage driver exits.
12. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the network card storage driver upgrade method as described in any one of claims 1-6.
13. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the steps of the network card storage driver upgrade method as described in any one of claims 1-6.
Citation Information
Patent Citations
A storage system software online upgrade method
CN106406953A