Methods, apparatus, systems, devices, and storage media for processing I / O requests

By modifying the destination address and adding an identifier to the I/O request in the network forwarding device, the request is sent directly to the actual processing storage node, thus solving the problem of low I/O request efficiency in the storage system and achieving efficient I/O processing.

CN115729440BActive Publication Date: 2025-11-14HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111013237.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-31
Publication Date
2025-11-14
Estimated Expiration
2041-08-31

AI Technical Summary

Technical Problem

In existing storage systems, the random forwarding of I/O requests between storage nodes leads to reduced processing efficiency and makes it impossible to effectively utilize the data processing strategies set by third-party multipath software and hardware vendors.

Method used

By modifying the destination address of the I/O request through the network forwarding device, it is sent directly to the actual processing storage node, and an identifier or address is added to the request to indicate the processing status of the storage node, thus avoiding forwarding between nodes.

Benefits of technology

It improves the efficiency of the storage system in handling I/O requests, reduces the forwarding process between nodes, meets the requirements of device communication protocols, and is suitable for different types of I/O requests, including read/write and immediate write requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115729440B_ABST
    Figure CN115729440B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, system, device, and storage medium for processing I / O requests, belonging to the field of computer technology. The method includes: receiving a target I / O request, the target I / O request carrying a destination address and a target logical block address, the destination address being the node address of a first storage node; determining a second storage node corresponding to the target logical block address based on a preset correspondence between logical block addresses and storage nodes; if the second storage node is inconsistent with the first storage node, modifying the destination address in the target I / O request to the node address of the second storage node, obtaining a target I / O request with a modified destination address; and sending the target I / O request with the modified destination address. Using this application can improve the efficiency of processing target I / O requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, system, device, and storage medium for processing I / O requests. Background Technology

[0002] With the development of internet technology and big data, some internet and financial companies can purchase storage systems developed by hardware manufacturers to store various business data generated during their operations.

[0003] Storage systems developed by hardware manufacturers can include multiple storage nodes. Each storage node consists of a controller and memory. The memory of multiple storage nodes can be constructed into a storage pool to provide data storage functionality. Technicians can divide the storage space in the storage pool into multiple logical blocks. To avoid conflicts when processing I / O requests and to achieve load balancing among the storage nodes, technicians can pre-configure data processing strategies in the controller of each storage node, ensuring that each storage node is only responsible for reading and writing data to its corresponding logical block.

[0004] After purchasing storage systems developed by hardware manufacturers, internet and financial companies can use third-party multipathing software to send I / O requests to various storage nodes in the system, thereby enabling data read and write operations. However, this third-party multipathing software is decoupled from the data processing strategies set by the hardware manufacturer's technical staff; that is, the software cannot determine which storage node should handle an I / O request. Typically, third-party multipathing software randomly sends I / O requests to various storage nodes through network forwarding devices (such as switches and routers) to achieve load balancing. When a storage node's controller receives an I / O request forwarded by the network forwarding device, it can determine the appropriate storage node to handle the request based on pre-set data processing strategies. If the request is determined to belong to another storage node, it can be forwarded to that node. However, this requires forwarding I / O requests between storage nodes, leading to a decrease in the storage system's I / O processing efficiency. Summary of the Invention

[0005] This application provides a method, apparatus, system, device, and storage medium for processing I / O requests, which can solve the problem of reduced efficiency in processing I / O requests in storage systems. The technical solution is as follows:

[0006] Firstly, a method for processing I / O requests is provided, applied to a network forwarding device, the method comprising:

[0007] Receive a target I / O request, which carries a destination address and a target logical block address. The destination address is the node address of the first storage node. Based on a preset correspondence between logical block addresses and storage nodes, determine the second storage node corresponding to the target logical block address. If the second storage node is inconsistent with the first storage node, modify the destination address in the target I / O request to the node address of the second storage node to obtain a target I / O request with the modified destination address. Send the target I / O request with the modified destination address.

[0008] The solution shown in this application embodiment, after the network forwarding device receives the target I / O request, can determine the second storage node that actually processes the target I / O request based on the target logical block address carried in the target I / O request and the preset correspondence between logical block addresses and storage nodes. If it is determined that the second storage node that actually processes the target I / O request is not the first storage node corresponding to the destination address in the target I / O request, the destination address in the target I / O request can be modified to the node address of the second storage node, and then the target I / O request with the modified destination address can be sent. In this way, the network forwarding device can directly send the target I / O request to the storage node that actually processes the target I / O request, without the need for the target I / O request to be forwarded by each storage node in the storage system, which can improve the efficiency of processing the target I / O request.

[0009] In one possible implementation, the destination address in the target I / O request is modified to the storage node address corresponding to the second storage node, and the node address of the first storage node is added to the target I / O request to obtain the target I / O request with the modified destination address. The target I / O request with the modified destination address is used to instruct the second storage node to perform I / O request processing based on the target I / O request with the modified destination address after receiving it; and after completing the I / O request processing, a first I / O request processing completion notification is sent to the first storage node based on the node address of the first storage node.

[0010] The solution shown in this application embodiment, when changing the destination address of the target I / O request, can also add the node address of the first storage node to the target I / O request, which is the destination address before the change. In this way, after the second storage node completes the processing of the target I / O request, it can send a first I / O request processing completion notification to the first storage node based on the node address of the first storage node added to the target I / O request. The first storage node then sends a second I / O request processing completion notification to the client device that sent the I / O request. Thus, for the client device, it perceives that the target I / O request was sent to the first storage node, and subsequently receives the I / O request processing completion notification returned by the first storage node. It is evident that the application embodiment can improve the efficiency of the storage system's I / O processing without requiring modifications to the client device, thereby expanding the applicability of the solution shown in this application embodiment.

[0011] In one possible implementation, a processed identifier is added to the target I / O request to obtain a processed target I / O request; the processed target I / O request is sent to the first storage node, whereby the processed identifier is used to instruct the first storage node not to process the processed target I / O request; after receiving a first I / O request processing completion notification from the second storage node, a second I / O request processing completion notification is sent to the network forwarding device; the second I / O request processing completion notification is received from the first storage node; and the second I / O request processing completion notification is forwarded to the client device that issued the target I / O request.

[0012] The solution shown in this embodiment allows the network forwarding device to still send the target I / O request to the first storage node. However, before sending the target I / O request, a processed identifier can be added to the target I / O. Upon receiving the target I / O request with the added processed identifier, the first storage node can determine that the target I / O request has already been processed by another storage node (the second storage node) based on the processed identifier, thus eliminating the need for I / O request processing. This satisfies the requirements of the communication protocol between devices while avoiding the forwarding of I / O requests between storage nodes, thereby improving the efficiency of the storage system in processing target I / O requests.

[0013] In one possible implementation, it is determined whether the target I / O request is an immediate write request; if it is determined to be an immediate write request, the write request information corresponding to the immediate write request is determined, wherein the write request information includes the source address, destination address, and sequence number range of at least one write data packet corresponding to the immediate write request; when a non-I / O request packet is received, the source address, destination address, and sequence number of the non-I / O request packet are obtained, and based on the write request information of the immediate write request, it is determined whether the received packet belongs to the write data packet corresponding to the immediate write request; if it is determined that the received packet is the write data packet corresponding to the immediate write request, the destination address in the write data packet is modified to the node address of the second storage node to obtain the write data packet with the modified destination address; the write data packet with the modified destination address is sent.

[0014] The scheme shown in this application embodiment further includes an immediate write request as the target I / O request. Unlike read or write I / O requests, an immediate write request may carry a portion of the data to be written to the storage system, with the remaining data carried in multiple consecutive write data packets following the immediate write request. Therefore, in the scheme shown in this application embodiment, when the target I / O request is determined to be an immediate write request, the write request information of the immediate write request can be obtained, namely the source address, destination address, and the sequence number range of at least one write data packet corresponding to the immediate write request. Thus, it is possible to determine whether the subsequently received packet is a write data packet corresponding to the immediate write request based on the write request information of the immediate write request, thereby completing the processing of sending write data packets following the immediate write request. It is evident that the scheme shown in this application embodiment is applicable to the processing of different I / O requests, including write I / O requests, read I / O requests, and immediate write requests, and can improve the efficiency of the storage system in processing I / O requests.

[0015] Secondly, a method for handling I / O requests is provided, applied to a second storage node, the method comprising:

[0016] The system receives a target I / O request with a modified destination address sent by a network forwarding device. The target I / O request with the modified destination address carries the node address of the first storage node. Based on the target I / O request with the modified destination address, the system performs I / O request processing. After completing the I / O request processing, the system sends a first I / O request processing completion notification to the first storage node based on the node address of the first storage node. The first I / O request processing completion notification is used to instruct the first storage node to send a second I / O request processing completion notification to the network forwarding device after receiving the first I / O request processing completion notification, so that the network forwarding device forwards the second I / O request processing completion notification to the client device that issued the target I / O request.

[0017] The solution shown in this application embodiment involves a second storage node, after processing the target I / O request (with a modified destination address) received from the network forwarding device, sending a first I / O request processing completion notification to the first storage node based on the node address of the first storage node carried in the modified destination I / O request. The first storage node then sends a second I / O request processing completion notification to the client device that sent the I / O request. This demonstrates that the network forwarding device can directly send the target I / O request to the storage node that actually processes it, eliminating the need for forwarding of the target I / O request among various storage nodes in the storage system, thus improving the efficiency of target I / O request processing. Furthermore, the client device perceives only that the target I / O request has been sent to the first storage node, and subsequently receives the I / O request processing completion notification returned by the first storage node. Therefore, this application embodiment improves the efficiency of I / O processing in the storage system without requiring modifications to the client device, thereby expanding the applicability of the solution shown in this application embodiment.

[0018] Thirdly, a method for handling I / O requests is provided, applied to a third storage node, the method comprising:

[0019] The system receives a processed target I / O request from the network forwarding device, which includes a processed flag; it also receives a first I / O request processing completion notification from the second storage node; and sends a second I / O request processing completion notification to the network forwarding device, so that the network forwarding device forwards the second I / O request processing completion notification to the client device that issued the target I / O request.

[0020] The solution shown in this application embodiment allows the first storage node to receive a target I / O request with added processing from the network forwarding device without performing I / O request processing. Upon receiving a first I / O request processing completion notification from the second storage node, the first storage node sends a second I / O request processing completion notification to the network forwarding device. This demonstrates that the network forwarding device can directly send the target I / O request to the storage node that actually processes it, eliminating the need for forwarding the target I / O request among various storage nodes in the storage system, thus improving the efficiency of target I / O request processing. Furthermore, the client device perceives only that the target I / O request has been sent to the first storage node, and subsequently receives the I / O request processing completion notification returned by the first storage node. Therefore, this application embodiment improves the I / O processing efficiency of the storage system without requiring modifications to the client device, thereby expanding the applicability of the solution shown in this application embodiment.

[0021] In one possible implementation, it is determined whether the target I / O request after processing is an immediate write request. If it is determined that the target I / O request after processing is an immediate write request, the write request information corresponding to the immediate write request is determined. The write request information includes the source address, destination address, and packet identifier range corresponding to multiple write data packets of the immediate write request. When a non-I / O request packet is received, the source address, destination address, and sequence number of the non-I / O request packet are obtained, and based on the write request information of the immediate write request, it is determined whether the received packet belongs to the write data packet corresponding to the immediate write request. If it is determined that the received packet is the write data packet corresponding to the immediate write request, no processing is performed on the write data packet.

[0022] The scheme shown in this application embodiment further includes an immediate write request in the target I / O request. Unlike read or write I / O requests, an immediate write request may carry a portion of the data to be written to the storage system, with the remaining data carried in multiple consecutive write data packets following the immediate write request. Therefore, in the scheme shown in this application embodiment, when the target I / O request is determined to be an immediate write request, the write request information of the immediate write request can be obtained, namely the source address, destination address, and the sequence number range of at least one write data packet corresponding to the immediate write request. Thus, it can be determined whether the subsequently received packet is a write data packet corresponding to the immediate write request based on the write request information of the immediate write request. If so, no processing is required on the write data packet. Thus, for the client device, the perception is that the target I / O request has been sent to the first storage node, and the client device has received an I / O request processing completion notification returned by the first storage node.

[0023] Fourthly, an apparatus for processing I / O requests is provided, applied to a network forwarding device, the apparatus comprising:

[0024] A receiving module is used to receive a target I / O request, wherein the target I / O request carries a destination address and a target logical block address, and the destination address is the node address of the first storage node;

[0025] The determination module is used to determine the second storage node corresponding to the target logical block address based on a preset correspondence between logical block addresses and storage nodes.

[0026] The modification module is used to modify the destination address in the target I / O request to the node address of the second storage node if the second storage node is inconsistent with the first storage node, so as to obtain the target I / O request after modifying the destination address;

[0027] The sending module is used to send the target I / O request after the destination address has been modified.

[0028] In one possible implementation, the modification module is used to:

[0029] The destination address in the target I / O request is modified to the storage node address corresponding to the second storage node, and the node address of the first storage node is added to the target I / O request to obtain a target I / O request with modified destination address. The target I / O request with modified destination address is used to instruct the second storage node to perform I / O request processing based on the target I / O request with modified destination address after receiving the target I / O request with modified destination address; after completing the I / O request processing, a first I / O request processing completion notification is sent to the first storage node based on the node address of the first storage node.

[0030] In one possible implementation, the sending module is further configured to:

[0031] Add a processed flag to the target I / O request to obtain the processed target I / O request;

[0032] The target I / O request after the addition processing is sent to the first storage node. The processed identifier is used to indicate that the first storage node does not process the target I / O request after the addition processing. After receiving the first I / O request processing completion notification sent by the second storage node, the second I / O request processing completion notification is sent to the network forwarding device.

[0033] The receiving module is further configured to: receive the second I / O request processing completion notification sent by the first storage node;

[0034] The sending module is further configured to: send the notification that the second I / O request processing is complete to the client device that issued the target I / O request.

[0035] In one possible implementation, the determining module is further configured to:

[0036] Determine whether the target I / O request is an immediate write request;

[0037] If the target I / O request is determined to be an immediate write request, then the write request information corresponding to the immediate write request is determined, wherein the write request information includes the source address, destination address, and sequence number range of at least one write data packet corresponding to the immediate write request;

[0038] When a non-I / O request message is received, the source address, destination address, and sequence number of the non-I / O request message are obtained, and based on the write request information of the immediate write request, it is determined whether the received message belongs to the write data message corresponding to the immediate write request.

[0039] If it is determined that the received message is the write data message corresponding to the immediate write request, then the destination address in the write data message is modified to the node address of the second storage node to obtain the write data message with the modified destination address.

[0040] The sending module is further configured to: send the write data packet after modifying the destination address.

[0041] Fifthly, an apparatus for processing I / O requests is provided, applied to a second storage node, the apparatus comprising:

[0042] The receiving module is used to receive a target I / O request with a modified destination address sent by the network forwarding device, wherein the target I / O request with a modified destination address carries the node address of the first storage node.

[0043] The processing module is used to process I / O requests based on the target I / O request after the destination address has been modified.

[0044] The sending module is configured to, after completing the I / O request processing, send a first I / O request processing completion notification to the first storage node based on the node address of the first storage node. The first I / O request processing completion notification is used to instruct the first storage node to send a second I / O request processing completion notification to the network forwarding device after receiving the first I / O request processing completion notification, so that the network forwarding device forwards the second I / O request processing completion notification to the client device that issued the target I / O request.

[0045] Sixthly, an apparatus for processing I / O requests is provided, applied to a first storage node, the apparatus comprising:

[0046] The receiving module is used to receive the target I / O request with added processing sent by the network forwarding device. The target I / O request with added processing is marked with a processed identifier. It also receives the first I / O request processing completion notification sent by the second storage node.

[0047] The sending module is used to send the second I / O request processing completion notification to the network forwarding device, so that the network forwarding device forwards the second I / O request processing completion notification to the client device that issued the target I / O request.

[0048] In one possible implementation, the apparatus further includes a determining module for:

[0049] Determine whether the target I / O request after the addition process is an immediate write request; if it is determined that the target I / O request after the addition process is an immediate write request, then determine the write request information corresponding to the immediate write request, wherein the write request information includes the source address, destination address, and packet identifier range corresponding to multiple write data packets corresponding to the immediate write request;

[0050] When a non-I / O request message is received, the source address, destination address, and sequence number of the non-I / O request message are obtained, and based on the write request information of the immediate write request, it is determined whether the received message belongs to the write data message corresponding to the immediate write request.

[0051] If it is determined that the received message is a write data message corresponding to the immediate write request, then the write data message is not processed.

[0052] In a seventh aspect, a system for processing I / O requests is provided, the system comprising a network forwarding device, a first storage node, and a second storage node, wherein:

[0053] The network forwarding device is used to: receive a target I / O request, which carries a destination address and a target logical block address, wherein the destination address is the node address of a first storage node; determine the second storage node corresponding to the target logical block address based on a preset correspondence between logical block addresses and storage nodes; if the second storage node is inconsistent with the first storage node, modify the destination address in the target I / O request to the node address of the second storage node to obtain a target I / O request with the modified destination address; and send the target I / O request with the modified destination address.

[0054] The second storage node is used to receive a target I / O request with a modified destination address sent by the network forwarding device, wherein the target I / O request with the modified destination address carries the node address of the first storage node; to process the I / O request based on the target I / O request with the modified destination address; and to send a first I / O request processing completion notification to the first storage node based on the node address of the first storage node after completing the I / O request processing.

[0055] The first storage node is used to: receive a processed target I / O request sent by the network forwarding device, wherein the processed target I / O request contains a processed identifier; receive a first I / O request processing completion notification sent by the second storage node; and send a second I / O request processing completion notification to the network forwarding device.

[0056] Eighthly, a network forwarding device is provided, the network forwarding device including a memory and a processor, the memory for storing computer instructions; the processor executes the computer instructions stored in the memory to cause the network forwarding device to perform the method as described in the first aspect or any possible implementation thereof.

[0057] In a ninth aspect, a storage node is provided, the storage node including a memory and a processor, the memory for storing computer instructions; the processor executes the computer instructions stored in the memory to cause the storage node to perform the methods of the second aspect or any possible implementation thereof, and to perform the methods of the third aspect or any possible implementation thereof.

[0058] In a tenth aspect, a computer-readable storage medium is provided, which stores computer program code, such that when the computer program code is executed by a computer device, the computer device implements the methods described in the first aspect, the second aspect, the third aspect, any possible implementation of the first aspect, any possible implementation of the second aspect, or any possible implementation of the third aspect.

[0059] Eleventhly, this application provides a computer program product, which includes a computer program stored in a computer-readable storage medium, and the computer program is loaded by a processor to implement the methods described above for the first aspect, the second aspect, the third aspect, any possible implementation of the first aspect, any possible implementation of the second aspect, or any possible implementation of the third aspect. Attached Figure Description

[0060] Figure 1 This is a schematic diagram of a system framework provided in an embodiment of this application;

[0061] Figure 2 This is a flowchart of a method for processing I / O requests provided in an embodiment of this application;

[0062] Figure 3 This is a flowchart of a method for processing I / O requests provided in an embodiment of this application;

[0063] Figure 4 This is a flowchart of a method for processing I / O requests provided in an embodiment of this application;

[0064] Figure 5 This is a flowchart of a method for processing I / O requests provided in an embodiment of this application;

[0065] Figure 6 This is a schematic diagram of a device structure for processing I / O requests provided in an embodiment of this application;

[0066] Figure 7 This is a schematic diagram of a device structure for processing I / O requests provided in an embodiment of this application;

[0067] Figure 8 This is a schematic diagram of a device structure for processing I / O requests provided in an embodiment of this application. Detailed Implementation

[0068] This application provides a method for processing I / O (Input / Output) requests, which can be applied to a storage system. The storage system can be a distributed storage system, such as... Figure 1 As shown, the storage system provided in this embodiment includes multiple storage nodes 100 ( Figure 1 The diagram shows three storage nodes 100, but is not limited to three storage nodes 100), at least one compute node 200, and a network forwarding device 300.

[0069] Storage node 100 can be a server, desktop computer, or the controller or hard drive enclosure of a storage array. Storage nodes 100 can be interconnected. Functionally, storage nodes 100 are primarily used for data computation and storage. In terms of hardware, such as... Figure 1 As shown, storage node 100 includes at least a controller 101 and a memory 102. The controller 101 may include a processor, such as a central processing unit (CPU), for processing data from outside the storage node 100 or data generated internally within the storage node 100. The memory 102 refers to a device for storing data, such as a solid-state drive (SSD).

[0070] Compute node 200 is a user-side computing device, such as a server or desktop computer. At the hardware level, compute node 200 includes a processor and memory. At the software level, compute node 200 runs an application 201 (referred to as an application) and a client program 202 (referred to as a client). Application 201 is a collective term for various applications presented to the user. Client 202 receives data processing requests triggered by application 201 and interacts with storage node 100, sending data processing requests to storage node 100. Client 202 also receives data from the storage node and forwards data to application 201. It is understood that when client 202 is a software program, its functionality is implemented by the program running in memory on the processor contained in compute node 200. Client 202 can also be implemented by hardware components located within compute node 200.

[0071] The network forwarding device 300 can be a device in the network responsible for forwarding packets, such as a switch or router. The network forwarding device 300 may include a processor, a receiver, and a transmitter. Figure 1 (Not shown in the image), it can be used in the storage system to process, receive and send data information between storage node 10 and computing node 200.

[0072] In this storage system, the solid-state drives (SSDs) included in each storage node 100 can form a storage pool for unified data storage. Technicians can virtualize the storage space in the storage pool into logical units (LUs) for use by the compute node 200. Each logical unit has a unique logical unit number (LUN). Since the compute node 200 can directly perceive the logical unit number, those skilled in the art typically use LUN to refer to the logical unit. Each LUN has a LUN ID for identification. The memory pool provides storage space to LUNs at the page level; in other words, when the storage node 200 requests space from the memory pool, the memory pool allocates space in the form of a page or an integer multiple thereof. The size of a page can be 4KB, 8KB, etc., and this application does not limit the page size. The specific location of data within a LUN can be determined by the starting address and the length of the data. The starting address is typically referred to as the logical block address (LBA) by those skilled in the art. Understandably, the three factors of LUN ID, LBA, and Length identify a specific address range, and an address range can be indexed into a global address.

[0073] In existing solutions, the client program 202 of compute node 200 can be third-party multipathing software. When compute node 200 needs to read or write data in the storage pool, it can randomly send corresponding I / O requests to storage node 100 through the third-party multipathing software. The I / O request can carry the address information of the corresponding storage node 100 and the LBA of the data to be read or written in the storage pool. Compute node 200 can send the I / O request to network forwarding device 300, and network forwarding device 300 can forward the I / O request to the corresponding storage node 100. However, in existing technology, storage node 100 sets a data processing strategy, i.e., a strategy for handling I / O requests. After receiving the I / O request sent by network forwarding device 300, storage node 100 can determine the target storage node 100 for handling the I / O request according to the strategy for handling I / O requests, and then send the I / O request to the target storage node 100. Thus, any I / O request may be forwarded between storage nodes in the storage system, and when a storage node forwards an I / O request, it will also trigger an interrupt in the CPU of the controller, resulting in low processing efficiency of I / O requests.

[0074] The method for processing I / O requests provided in this application can be applied to storage systems, avoiding the forwarding of I / O requests between storage nodes and improving the processing efficiency of I / O requests.

[0075] To facilitate understanding of the embodiments of this application, some concepts involved will be explained below:

[0076] The Peripheral Component Interconnect Express (PCIe) standard is a high-speed serial computer expansion bus standard. The greatest significance of PCIe lies in its versatility. It can be used not only for connecting the southbridge and other devices, but also for connecting chipsets and even graphics processors. In this way, the entire I / O system is unified again, which will further simplify the computer system and increase the portability and modularity of the computer.

[0077] Non-Volatile Memory Express (NVMe) is a logical device interface specification. It is a bus transmission protocol specification based on the device logical interface (equivalent to the application layer in communication protocols) used to access non-volatile memory media (such as solid-state hard drives using flash memory) attached via the PCIe bus.

[0078] NVMe over Fabric (NVMe-oF) is a sub-protocol of NVMe, with NVMe as the primary protocol, standardizing client functions such as disk read / write, access, and resource management. NVMe-oF is mainly based on the NVMe network protocol specification and can combine network protocols such as RDMA over Converged Ethernet (RoCE) based on Converged Ethernet with NVMe.

[0079] The Remote Direct Memory Access (RDMA) specification is a technology that bypasses the operating system kernel of a remote host to access data in its memory. Since it does not go through the operating system, it not only saves a lot of CPU resources, but also improves system throughput and reduces system network communication latency. It is widely used, especially in large-scale parallel computer clusters.

[0080] RDMA over Converged Ethernet (RoCE) is a technology that applies RDMA over an Ethernet network.

[0081] The specific embodiments of this application are described in detail below:

[0082] This application provides a method for processing I / O requests, which can improve the efficiency of storage systems in processing I / O requests. This method can be applied to network forwarding devices in storage systems, such as… Figure 2 As shown, Figure 2 The present application provides a flowchart of a method for processing I / O requests. The following detailed description of the processing flow of the network forwarding device, in conjunction with specific implementation methods, is as follows:

[0083] Step 201: Receive the target I / O request. The target I / O request carries the destination address and the target logical block address. The destination address is the node address of the first storage node.

[0084] The target I / O request can be an I / O request sent by any compute node to a storage node via a network forwarding device (hereinafter referred to as a switch) through third-party multipathing software. The compute node may carry the destination address of any storage node in the I / O request, i.e., the node address of the first storage node, such as its Internet Protocol (IP) address and Media Access Control (MAC) address. Furthermore, the I / O request may carry a target logical block address (LBA), which is the starting logical address from which the compute node requests to read or write data in the storage pool. It should be noted that this application does not require adaptive modifications to the third-party multipathing software; the third-party multipathing software can send I / O requests to any storage node in the storage system according to any I / O request distribution rules.

[0085] When a switch receives any message, it can determine whether the message is an I / O request. For example, when compute nodes and storage nodes perform remote data read / write operations based on RDMA, the corresponding I / O request could be a message carrying Submission Queue Entry (SQE) information from the NVMe protocol standard (hereinafter referred to as an SQE message). After receiving an SQE message, the switch can decapsulate it to obtain the SQE field. The first four bytes of the SQE field, containing the command "metadata," can be used to determine whether the received message is an I / O command. If the received message is determined to be an I / O request, the IP address, MAC address, etc., can be obtained from the message. This IP address and MAC address represent the address information of the first storage node. The first storage node is the destination storage node to which the compute node originally intended to send the target I / O request.

[0086] Step 202: Based on the preset correspondence between logical block addresses and storage nodes, determine the second storage node corresponding to the target logical block address.

[0087] In the mapping between logical block addresses and storage nodes, the storage node corresponding to a logical block address is the storage node where data read and write operations are performed. Technical personnel can pre-configure this mapping. As shown in Table 1, Table 1 includes multiple logical address segments, such as LUN ID0, LBA0, Length; LUN ID1, LBA1, Length; LUN ID2, LBA2, Length; etc., and the corresponding storage node for each logical address segment. The storage node can be identified using its node identifier or node address. Table 1 provides a schematic example of the mapping between logical block addresses and storage nodes; the specific mapping can be configured by technical personnel according to actual processing needs. This mapping can be used for the data processing strategies mentioned above.

[0088] Table 1. Correspondence between logical addresses and storage nodes

[0089] Logical address range storage nodes LUN ID0, LBA0, Length Storage Node 0 LUN ID1, LBA1, Length Storage Node 1 LUN ID2, LBA2, Length Storage Node 2 …… ……

[0090] After the switch determines the target logical block address carried in the target I / O request, it can determine the corresponding storage node (second storage node) based on the mapping relationship. This second storage node is the storage node in the storage system that actually processes the target I / O request. For example, when it is determined that the target logical block carried in the target I / O request matches the logical address ranges corresponding to LUNID0, LBA0, and Length, according to Table 1, the storage node that processes the target I / O request can be determined to be storage node 0.

[0091] Step 203: If the second storage node is inconsistent with the first storage node, modify the destination address in the target I / O request to the node address of the second storage node to obtain the target I / O request with the modified destination address.

[0092] After determining the second storage node corresponding to the target logical block address based on the correspondence between logical block addresses and storage nodes, such as after determining the node address or node identifier corresponding to the second storage node, it can be determined whether the second storage node is the first storage node to which the compute node wants to send the I / O request. For example, the node addresses corresponding to the first storage node and the second storage node can be compared.

[0093] If it is determined that the first storage node and the second storage node are the same, that is, the first storage node and the second storage node are the same storage node, then the target I / O request can be sent directly to the first storage node (or the second storage node) for processing.

[0094] If the first and second storage nodes are determined to be inconsistent, it means that if the target I / O request is sent to the first storage node, the first storage node will also need to forward the target I / O request to the second storage node. Therefore, in this step, the destination address in the target I / O request (i.e., the address of the first storage node) can be modified to the address of the second storage node. Specifically, the target I / O request can be copied first to obtain a copied target I / O request. Then, based on the copied target I / O request, the destination address can be modified to obtain a target I / O request with the modified destination address. The original target I / O request can then be sent to the first storage node. The processing of the original target I / O request by the first storage node will not be described here.

[0095] Step 204: Send the target I / O request after modifying the destination address.

[0096] After modifying the destination address in the target I / O request, the switch can forward the target I / O request with the modified destination address to the second storage node. Thus, upon receiving the target I / O request with the modified destination address, the second storage node can directly process the I / O request. Therefore, this application avoids forwarding I / O requests between the first and second storage nodes, thereby improving the processing efficiency of I / O requests.

[0097] In this embodiment, the network forwarding device determines whether the storage node to which the target I / O request is to be forwarded is the storage node that processes the target I / O request. If not, the destination address in the target I / O request can be modified, and the target I / O request can be directly sent to the storage node that actually processes the target I / O request. This avoids the target I / O request being forwarded among the storage nodes in the storage system and improves the efficiency of processing the target I / O request.

[0098] In this application, the compute node and storage node can be connected via protocols such as NVMe-oF, RDMA, and RoCE to enable the compute node to read and write data on the storage node. In this application, I / O requests include read I / O requests, write I / O requests, and immediate write requests. For the processing of read I / O requests and write I / O requests, please refer to [reference needed]. Figure 3 .

[0099] Figure 3 This is a flowchart illustrating a method for processing I / O requests, provided in an embodiment of this application, applied to network forwarding devices and storage nodes. See also... Figure 3 The method includes:

[0100] Step 301: The network forwarding device adds a processed identifier to the target I / O request to obtain the processed target I / O request, and sends the processed target I / O request to the first storage node.

[0101] In this embodiment of the application, the computing node and the storage node can perform data read and write processing based on the RDMA protocol.

[0102] The switch can send the target I / O request to the first storage node. However, before sending the target I / O request to the first storage node, a processed flag can be added to the target I / O request. For example, in this application, the 4-bit reserved bits of the Command Double Word (CDW0) in the NVMe protocol standard can be used to identify the processing to be performed by the controller in the storage node. In this step, the 4-bit reserved bits of CDW0 can be set to 1111 as a processed flag.

[0103] After receiving the processed target I / O request, it can be sent to the first storage node to instruct it not to process the I / O request. Upon receiving the first I / O request processing completion notification from the second storage node, a second I / O request processing completion notification is sent to the network forwarding device. In the NVMe protocol, the I / O request can be an SQE message. When the storage node completes the processing, it can return a Complete Queue Entry (CQE) message (hereinafter referred to as a CQE message) to the compute node that sent the I / O request. The first I / O request processing completion notification can be any notification used to identify that the second storage node has completed the I / O request processing; the target I / O request is an SQE message, and the second I / O request processing completion notification can be a CQE message.

[0104] Step 302: The network forwarding device changes the destination address in the target I / O request to the storage node address corresponding to the second storage node, and adds the node address of the first storage node to the target I / O request to obtain the target I / O request after modifying the destination address, and sends the target I / O request after modifying the destination address to the second storage node.

[0105] Corresponding to step 203 above, after modifying the destination address in the target I / O request, the switch can also add the node address of the first storage node to the target I / O request, that is, retain the original destination address in the target I / O request. For example, the original destination address can be added to the CDW2 to CDW5 fields in the SQE message. In addition, a forwarded flag can be added to the target I / O request to indicate that the I / O request was sent to the storage node by the switch by changing the destination address. For example, the CDW0 field can be set to 1100 as a forwarded flag. Upon receiving the target I / O request with the modified destination address, the switch can send the modified target I / O request to the second storage node. This instructs the second storage node to process the I / O request based on the modified destination address. After completing the I / O request processing, the switch sends a first I / O request processing completion notification to the first storage node based on the node address of the first storage node.

[0106] It should be noted that the modifications made to the fields in the target I / O request in steps 301 and 302 can be understood as follows: before executing steps 301 and 302, the target I / O request can be copied to obtain a copied target I / O request. In step 301, the processing of the target I / O request can be performed based on the original target I / O request, and in step 302, the processing of the target I / O request can be performed based on the copied target I / O request.

[0107] Step 303: The first storage node receives the target I / O request with added processing sent by the network forwarding device. The target I / O request with added processing is marked with a processed identifier.

[0108] After receiving an I / O request from the network forwarding device, the first storage node can determine whether the received I / O request is the target I / O request after processing. Using step 301 as an example, the first storage node can check whether the value of the 4-bit reserved bits of CDW0 in the received I / O request is the value corresponding to the processed identifier, i.e., whether it is 1111.

[0109] If it is determined that the received I / O request is not the target I / O request after additional processing, the received I / O request can be processed normally. For example, in this application, if the network forwarding device determines that the first storage node and the second storage node are unified storage nodes, the 4-bit reserved bits of CDW0 can be set to 0000 to indicate that the corresponding I / O request is processed by the storage node that received the I / O request, and that the storage node submits the CQE message. If it is determined that the received I / O request is the target I / O request after additional processing, the received target I / O request after additional processing can be left unprocessed. For example, the processing of the target I / O request after additional processing can be suspended, waiting for the second storage node processing the corresponding target I / O request to send a notification that the first I / O request processing is complete.

[0110] Step 304: The second storage node receives the target I / O request with modified destination address sent by the network forwarding device. The target I / O request with modified destination address carries the node address of the first storage node. Based on the target I / O request with modified destination address, the second storage node performs I / O request processing. After completing the I / O request processing, the second storage node sends a first I / O request processing completion notification to the first storage node based on the node address of the first storage node.

[0111] After receiving an I / O request from the network forwarding device, the second storage node can determine whether the received I / O request is the target I / O request after the destination address has been modified. Using the example of step 302 above, the second storage node determines whether the value of the 4-bit reserved bits of CDW0 in the received I / O request is the value corresponding to the forwarded identifier, i.e., whether it is 1100.

[0112] If it is determined that the received I / O request is not a target I / O request with a modified destination address, the received I / O request can be processed normally, and the value of the 4-bit reserved bits of CDW0 can be 0000. If it is determined that the received I / O request is a target I / O request with a modified destination address, the received target I / O request with the added forwarded flag can be processed. After the second storage node completes the I / O request processing, it sends a first I / O request processing completion notification to the first storage node based on the node address of the first storage node carried in the target I / O request. This first I / O request processing completion notification can be any notification indicating that the second storage node has completed the corresponding I / O request processing.

[0113] Step 305: The first storage node receives the first I / O request processing completion notification sent by the second storage node.

[0114] Step 306: The first storage node sends a second I / O request processing completion notification to the network forwarding device.

[0115] After receiving the first I / O request processing completion notification sent by the second storage node, the first storage node can send a second I / O request processing completion notification to the network forwarding device. The second I / O request processing completion notification can be a CQE message.

[0116] It should be noted that the distinction between the first and second storage nodes in this application is merely for the purpose of clearly illustrating the scheme. In reality, the first and second storage nodes can be any two storage nodes in the storage system, and any storage node in the storage system can perform the operations executed by the first and second storage nodes.

[0117] Step 307: After receiving the second I / O request processing completion notification sent by the first storage node, the network forwarding device forwards the second I / O request processing completion notification to the client device that sent the target I / O request.

[0118] After receiving the second I / O request processing completion notification from the first storage node, the switch can forward the second I / O request processing completion notification to the client device (compute node) that sent the target I / O request. Thus, the client device perceives that the target I / O request was sent to the first storage node and that it received the I / O request processing completion notification from the first storage node. In other words, the I / O request processing method provided in this embodiment only needs to be applied to network forwarding devices and storage nodes; client devices do not require corresponding modifications. This improves the applicability of this embodiment to various client devices and third-party multipath software.

[0119] In this embodiment, the network forwarding device determines whether the storage node to which the target I / O request is to be forwarded is the storage node that processes the target I / O request. If not, the destination address in the target I / O request can be modified to send the target I / O request to the storage node that actually processes the target I / O request. This eliminates the need for the target I / O request to be forwarded by each storage node in the storage system, thereby improving the efficiency of processing the target I / O request.

[0120] Figure 4 This is a flowchart illustrating a method for processing I / O requests according to an embodiment of this application, applied to a network forwarding device. This method handles I / O requests that are immediate write requests. See [link to relevant documentation]. Figure 4 The method includes:

[0121] Step 401: Determine whether the target I / O request is an immediate write request.

[0122] An immediate write request can be initiated by a compute node, carrying the data to be written. Since the data to be written is generally larger than the maximum data that can be carried in a message, it can be split into multiple different messages. The first message in these multiple messages can be called the immediate write request, and subsequent messages can be called write data messages.

[0123] Corresponding to the processing in step 101 above, when the switch receives any message, it can determine whether the message corresponds to an I / O request. Furthermore, in determining whether a message is an I / O request, the type of the I / O request can also be determined. For example, the command "metadata" recorded in the first four bytes of the SQE field can be used to determine whether the received SQE message is an I / O command and the type of the I / O command. The types of I / O commands include write I / O requests, read I / O requests, and immediate write requests.

[0124] Step 402: If the target I / O request is determined to be an immediate write request, then determine the write request information corresponding to the immediate write request.

[0125] The write request information includes the source address, destination address, and sequence number range of at least one write datagram corresponding to the immediate write request.

[0126] If the target I / O request is determined to be an immediate write request, then the write request information within the immediate write request can be obtained. The immediate write request may carry the sequence number of the immediate write request and the size of the write data corresponding to the immediate write request. Since the first packet and subsequent packets corresponding to the immediate write request are sent consecutively, the number of write data packets can be determined by the size of the write data and the size of the data carried in each packet. Furthermore, based on the sequence number of the immediate write request, the sequence number range of each packet corresponding to the immediate write request can be determined.

[0127] Furthermore, the source and destination addresses in the immediate write request can be obtained. An immediate forwarding table can be built based on the source and destination addresses. Additionally, in the RDMA protocol, a channel connection can be established between the compute node and the storage node, and the immediate write request can also carry a channel connection identifier. Therefore, the channel connection identifier in the immediate write request can also be added to the immediate forwarding table. As shown in Table 2, which provides an example of the immediate forwarding table's representation, ScrIP is the source address, DstIP is the destination address, and DstQP (Destination Queue Pair) is the channel connection identifier.

[0128] Table 2. Immediate Data Transfer Table

[0129] ScrIP DstIP DstQP Immediate value request 0 1.111.111.10 1.111.111.11 QP0-QP1 Immediate value request 1 1.111.111.20 1.111.111.21 QP0-QP2 Immediate value request 2 1.111.111.30 1.111.111.31 QP0-QP3 …… …… …… ……

[0130] Step 403: When a non-I / O request message is received, determine whether the received message belongs to the write data message corresponding to the immediate write request based on the write request information of the immediate write request.

[0131] Upon receiving a non-I / O request message, the source address, destination address, and channel connection identifier can be obtained from the message. It is then determined whether the established immediate forwarding table contains the corresponding source address, destination address, and channel connection identifier. If they exist, it indicates that the message may be a non-first packet corresponding to an immediate write request. Subsequently, it can be determined whether the message's sequence number is within the corresponding sequence number range. If it is within the sequence number range, it can be determined that the received message belongs to the write data packet corresponding to the immediate write request.

[0132] Step 404: If it is determined that the received message is a write data message corresponding to an immediate write request, then modify the destination address in the write data message to the node address of the second storage node to obtain a write data message with the modified destination address.

[0133] If it is determined that the received message is a write data message corresponding to an immediate write request, then the destination address in the write data message is modified to the node address of the second storage node to obtain a write data message with the modified destination address.

[0134] Step 405: Send the write data packet after modifying the destination address.

[0135] After obtaining the modified destination address, the write data packet following the modified destination address can be sent to the second storage node for processing. Additionally, it should be noted that the switch can still modify the write data packet before the destination address before sending it to the first storage node. For example, when it is determined that the received packet corresponds to an immediate write request, the write data packet can be copied first to obtain a copied write data packet. Steps 404-405 can be executed for the copied write data packet, while the original write data packet can be sent to the first storage node.

[0136] Before sending the original write data packet to the first storage node, the write data carried in the write data packet can be deleted, retaining only the corresponding header information. This reduces the bandwidth used to send the write data packet to the first storage node and improves the efficiency of sending the write data packet to the first storage node. The processing of the write data packet received by the first storage node will not be described here; please refer to [link to relevant documentation]. Figure 5 The corresponding method and process.

[0137] In this embodiment of the application, if the storage node to which the target I / O request sent by the computing node is to be forwarded by the network forwarding device is the storage node that processes the target I / O request, then if it is not, the destination address in the target I / O request can be modified to send the target I / O request to the storage node that actually processes the target I / O request. This eliminates the need for the target I / O request to be forwarded by each storage node in the storage system, thereby improving the efficiency of processing the target I / O request.

[0138] Figure 5 This is a flowchart of a method for processing I / O requests provided in an embodiment of this application, applied to a first storage node. This method handles I / O requests that are immediate write requests. See [link to relevant documentation]. Figure 5 The method includes:

[0139] Step 501: Determine whether the target I / O request after processing is an immediate write request.

[0140] When the first storage node receives any message, it can determine whether the message corresponds to an I / O request. Furthermore, in determining whether a message is an I / O request, it can also determine the type of the I / O request. For example, it can determine whether the received SQE message is an I / O command and the type of the I / O command by using the command "metadata" recorded in the first four bytes of the SQE field.

[0141] Step 502: If it is determined that the target I / O request after the addition process is an immediate write request, then determine the write request information corresponding to the immediate write request. The write request information includes the source address, destination address, and packet identifier range of the multiple write data packets corresponding to the immediate write request.

[0142] The write request information includes the source address, destination address, and packet identifier range of at least one write data packet corresponding to the immediate write request. Immediate write requests are typically divided into multiple packets carrying data, but only when...

[0143] If the target I / O request is determined to be an immediate write request, the write request information within the immediate write request can be obtained. The immediate write request may carry the sequence number of the immediate write request and the size of the corresponding write data. Since the first packet and subsequent packets corresponding to the immediate write request are sent consecutively, the sequence number range of each packet corresponding to the immediate write request can be determined, and the source and destination addresses in the immediate write request can be obtained. An immediate forwarding table can be built based on the source and destination addresses. Furthermore, in the RDMA protocol, a channel connection can be established between the compute node and the storage node, and the immediate write request can also carry a channel connection identifier. Therefore, the channel connection identifier in the immediate write request can also be added to the immediate forwarding table. The immediate forwarding table can be found in Table 2.

[0144] Step 503: When a non-I / O request message is received, determine whether the received message belongs to the write data message corresponding to the immediate write request based on the write request information of the immediate write request.

[0145] Upon receiving a non-I / O request message, the source address, destination address, and channel connection identifier can be obtained from the message. It is then determined whether the established immediate forwarding table contains the corresponding source address, destination address, and channel connection identifier. If they exist, it indicates that the message may be a non-first packet corresponding to an immediate write request. Subsequently, it can be determined whether the message's sequence number is within the corresponding sequence number range. If it is within the sequence number range, it can be determined that the received message belongs to the write data packet corresponding to the immediate write request.

[0146] Step 504: If it is determined that the received message is a write data message corresponding to an immediate write request, then no processing is performed on the write data message.

[0147] If it is determined that the received message is a write data message corresponding to an immediate write request, then no write data message is processed. When the first I / O request processing completion notification is received after the second storage node has completed processing the immediate write request, a second I / O request processing completion notification can be sent to the network forwarding device, and then the network forwarding device can forward the second I / O request processing completion notification to the client device.

[0148] In this embodiment, the network forwarding device determines whether the storage node to which the target I / O request to be forwarded by the computing node is the storage node that processes the target I / O request. If not, the destination address in the target I / O request can be modified to send the target I / O request to the storage node that actually processes the target I / O request. This eliminates the need for the target I / O request to be forwarded by each storage node in the storage system, thereby improving the efficiency of processing the target I / O request.

[0149] Based on the same technical concept, embodiments of this application also provide an apparatus for processing I / O requests. This apparatus may be the network forwarding device described in the above embodiments, such as... Figure 6 As shown, the device includes:

[0150] The receiving module 610 is used to receive a target I / O request, which carries a destination address and a target logical block address, wherein the destination address is the node address of the first storage node; specifically, it can implement the receiving function in step 201 above, as well as other implicit steps.

[0151] The determination module 620 is used to determine the second storage node corresponding to the target logical block address based on a preset correspondence between logical block addresses and storage nodes; specifically, it can implement the determination function in step 202 above, as well as other implicit steps.

[0152] Modification module 630 is used to modify the destination address in the target I / O request to the node address of the second storage node if the second storage node is inconsistent with the first storage node, so as to obtain the target I / O request after modifying the destination address; specifically, it can implement the modification function in step 203 above, as well as other implicit steps.

[0153] The sending module 640 is used to send the target I / O request after the destination address is modified; specifically, it can implement the sending function in step 204 above, as well as other implicit steps.

[0154] In one possible implementation, the modification module 630 is used to:

[0155] The destination address in the target I / O request is modified to the storage node address corresponding to the second storage node, and the node address of the first storage node is added to the target I / O request to obtain a target I / O request with modified destination address. The target I / O request with modified destination address is used to instruct the second storage node to perform I / O request processing based on the target I / O request with modified destination address after receiving the target I / O request with modified destination address; after completing the I / O request processing, a first I / O request processing completion notification is sent to the first storage node based on the node address of the first storage node.

[0156] In one possible implementation, the sending module 640 is further configured to:

[0157] Add a processed flag to the target I / O request to obtain the processed target I / O request;

[0158] The target I / O request after the addition processing is sent to the first storage node. The processed identifier is used to indicate that the first storage node does not process the target I / O request after the addition processing. After receiving the first I / O request processing completion notification sent by the second storage node, the second I / O request processing completion notification is sent to the network forwarding device.

[0159] The receiving module 610 is further configured to: receive the second I / O request processing completion notification sent by the first storage node;

[0160] The sending module 640 is further configured to: forward the notification of completion of processing of the second I / O request to the client device that issued the target I / O request.

[0161] In one possible implementation, the determining module 620 is further configured to:

[0162] Determine whether the target I / O request is an immediate write request;

[0163] If the target I / O request is determined to be an immediate write request, then the write request information corresponding to the immediate write request is determined, wherein the write request information includes the source address, destination address, and sequence number range of at least one write data packet corresponding to the immediate write request;

[0164] When a non-I / O request message is received, the source address, destination address, and sequence number of the non-I / O request message are obtained, and based on the write request information of the immediate write request, it is determined whether the received message belongs to the write data message corresponding to the immediate write request.

[0165] If it is determined that the received message is the write data message corresponding to the immediate write request, then the destination address in the write data message is modified to the node address of the second storage node to obtain the write data message with the modified destination address.

[0166] The sending module is further configured to: send the write data packet after modifying the destination address.

[0167] Based on the same technical concept, embodiments of this application also provide an apparatus for processing I / O requests. This apparatus may be the second storage node in the above embodiments, such as... Figure 7 As shown, the device includes:

[0168] The receiving module 710 is used to receive a target I / O request with a modified destination address sent by the network forwarding device. The target I / O request with a modified destination address carries the node address of the first storage node. Specifically, it can implement the receiving function in step 304 above, as well as other implicit steps.

[0169] The processing module 720 is used to perform I / O request processing based on the target I / O request after the destination address is modified; specifically, it can implement the processing function in step 304 above, as well as other implicit steps.

[0170] The sending module 730, after completing the I / O request processing, sends a first I / O request processing completion notification to the first storage node based on the node address of the first storage node. The first I / O request processing completion notification instructs the first storage node, upon receiving it, to send a second I / O request processing completion notification to the network forwarding device, so that the network forwarding device sends the second I / O request processing completion notification to the client device that issued the target I / O request. Specifically, this can implement the sending function in step 304 above, as well as other implicit steps.

[0171] Based on the same technical concept, embodiments of this application also provide an apparatus for processing I / O requests. This apparatus may be the first storage node in the above embodiments, such as... Figure 8 As shown, the device includes:

[0172] The receiving module 810 is used to receive the target I / O request with added processing sent by the network forwarding device. The target I / O request with added processing is marked with a processed identifier. It also receives the first I / O request processing completion notification sent by the second storage node. Specifically, it can implement the receiving function in step 305 above, as well as other implicit steps.

[0173] The sending module 820 is used to send the second I / O request processing completion notification to the network forwarding device, so that the network forwarding device sends the second I / O request processing completion notification to the client device that issued the target I / O request. Specifically, it can implement the sending function in step 306 above, as well as other implicit steps.

[0174] In one possible implementation, the device further includes a determining module 830, configured to:

[0175] Determine whether the target I / O request after the addition process is an immediate write request; if it is determined that the target I / O request after the addition process is an immediate write request, then determine the write request information corresponding to the immediate write request, wherein the write request information includes the source address, destination address, and packet identifier range corresponding to multiple write data packets corresponding to the immediate write request;

[0176] When a non-I / O request message is received, the source address, destination address, and sequence number of the non-I / O request message are obtained, and based on the write request information of the immediate write request, it is determined whether the received message belongs to the write data message corresponding to the immediate write request.

[0177] If it is determined that the received message is a write data message corresponding to the immediate write request, then the write data message is not processed.

[0178] It should be noted that the apparatus for processing I / O requests provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the source server can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the apparatus for processing I / O requests and the method embodiments for processing I / O requests provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0179] Based on the same technical concept, embodiments of this application also provide a system for processing I / O requests, the system including a network forwarding device, a first storage node, and a second storage node, wherein:

[0180] The network forwarding device is configured to: receive a target I / O request, the target I / O request carrying a destination address and a target logical block address, the destination address being the node address of the first storage node; determine the second storage node corresponding to the target logical block address based on a preset correspondence between logical block addresses and storage nodes; if the second storage node is inconsistent with the first storage node, modify the destination address in the target I / O request to the node address of the second storage node to obtain a target I / O request with modified destination address; and send the target I / O request with modified destination address.

[0181] The second storage node is configured to: receive a target I / O request with a modified destination address sent by the network forwarding device, wherein the target I / O request with the modified destination address carries the node address of the first storage node; perform I / O request processing based on the target I / O request with the modified destination address; and after completing the I / O request processing, send a first I / O request processing completion notification to the first storage node based on the node address of the first storage node.

[0182] The first storage node is configured to: receive a processed target I / O request sent by the network forwarding device, wherein the processed target I / O request contains a processed identifier; receive a first I / O request processing completion notification sent by the second storage node; and send a second I / O request processing completion notification to the network forwarding device.

[0183] It should be noted that the storage system and the data flushing method provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0184] This application also provides a network forwarding device, which includes a memory and a processor. The memory stores computer instructions, and the processor executes the computer instructions stored in the memory to cause the network forwarding device to perform the I / O request processing method described in the above embodiments.

[0185] This application also provides a storage node, such as... Figure 1 As shown, the storage node includes a controller and a processor. The memory is used to store computer instructions. The processor executes the computer instructions stored in the memory to cause the storage node to perform the I / O request processing method in the above embodiment.

[0186] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a device, they generate, in whole or in part, the processes or functions described in the embodiments of this application. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic cable, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to the device or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, and magnetic tape), an optical medium (e.g., Digital Video Disk (DVD), etc.), or a semiconductor medium (e.g., solid-state drive, etc.).

[0187] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0188] The above description is merely one embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for processing I / O requests, characterized in that, Applied to network forwarding devices, the method includes: Receive a target I / O request, the target I / O request carrying a destination address and a target logical block address, the destination address being the node address of the first storage node; Based on the preset correspondence between logical block addresses and storage nodes, the second storage node corresponding to the target logical block address is determined; When the second storage node is inconsistent with the first storage node, the destination address in the target I / O request is modified to the node address of the second storage node, and the node address of the first storage node is added to the target I / O request to obtain a target I / O request with modified destination address. The target I / O request with modified destination address is used to instruct the second storage node to perform I / O request processing based on the target I / O request with modified destination address, and to instruct the second storage node to send a first I / O request processing completion notification to the first storage node based on the node address of the first storage node after completing the I / O request processing, so that the first storage node sends a second I / O request processing completion notification corresponding to the target I / O request to the network forwarding device. Send the target I / O request after modifying the destination address.

2. The method according to claim 1, characterized in that, The method further includes: Add a processed flag to the target I / O request to obtain the processed target I / O request; The target I / O request after the addition processing is sent to the first storage node. The processed identifier is used to indicate that the first storage node does not process the target I / O request after the addition processing. After receiving the first I / O request processing completion notification sent by the second storage node, the second I / O request processing completion notification is sent to the network forwarding device. The method further includes: Receive the notification that the second I / O request processing is complete from the first storage node; The notification that the second I / O request has been processed is forwarded to the client device that issued the target I / O request.

3. The method according to claim 1, characterized in that, After receiving the target I / O request, the method further includes: Determine whether the target I / O request is an immediate write request; If the target I / O request is determined to be an immediate write request, then the write request information corresponding to the immediate write request is determined, wherein the write request information includes the source address, destination address, and sequence number range of at least one write data packet corresponding to the immediate write request; The method further includes: When a non-I / O request message is received, the source address, destination address, and sequence number of the non-I / O request message are obtained, and based on the write request information of the immediate write request, it is determined whether the received message belongs to the write data message corresponding to the immediate write request. If it is determined that the received message is the write data message corresponding to the immediate write request, then the destination address in the write data message is modified to the node address of the second storage node to obtain the write data message with the modified destination address. Send the write data packet after modifying the destination address.

4. A method for processing I / O requests, characterized in that, Applied to a second storage node, the method includes: The system receives a target I / O request with a modified destination address sent by a network forwarding device. The target I / O request with a modified destination address carries the node address of a first storage node. The node address of the first storage node is the destination address included in the target I / O request. The target I / O request with a modified destination address is obtained by modifying the destination address in the target I / O request to the node address of the second storage node. Based on the target I / O request after modifying the destination address, perform I / O request processing; After completing the I / O request processing, a first I / O request processing completion notification is sent to the first storage node based on the node address of the first storage node. The first I / O request processing completion notification is used to instruct the first storage node to send a second I / O request processing completion notification to the network forwarding device after receiving the first I / O request processing completion notification, so that the network forwarding device forwards the second I / O request processing completion notification to the client device that issued the target I / O request.

5. A method for processing I / O requests, characterized in that, Applied to the first storage node, the method includes: Receive a target I / O request sent by a network forwarding device after it has been processed, wherein the processed target I / O request has been added with a processed identifier; The system receives a first I / O request processing completion notification sent by the second storage node after completing the processing of the target I / O request with the modified destination address. The target I / O request with the modified destination address is sent to the second storage node by the network forwarding device after modifying the destination address of the target I / O request to the node address of the second storage node. The destination address included in the target I / O request is the node address of the first storage node. Send a second I / O request processing completion notification to the network forwarding device, so that the network forwarding device forwards the second I / O request processing completion notification to the client device that issued the target I / O request.

6. The method according to claim 5, characterized in that, After receiving the processed target I / O request sent by the network forwarding device, the method further includes: Determine whether the target I / O request after the addition process is an immediate write request; If it is determined that the target I / O request after the addition processing is an immediate write request, then the write request information corresponding to the immediate write request is determined, wherein the write request information includes the source address, destination address, and packet identifier range corresponding to the multiple write data packets corresponding to the immediate write request; The method further includes: When a non-I / O request message is received, the source address, destination address, and sequence number of the non-I / O request message are obtained, and based on the write request information of the immediate write request, it is determined whether the received message belongs to the write data message corresponding to the immediate write request. If it is determined that the received message is a write data message corresponding to the immediate write request, then the write data message is not processed.

7. An apparatus for processing I / O requests, characterized in that, Applied to network forwarding devices, the apparatus includes: A receiving module is used to receive a target I / O request, wherein the target I / O request carries a destination address and a target logical block address, and the destination address is the node address of the first storage node; The determination module is used to determine the second storage node corresponding to the target logical block address based on a preset correspondence between logical block addresses and storage nodes. The modification module is configured to modify the destination address in the target I / O request to the node address of the second storage node when the second storage node is inconsistent with the first storage node, and to add the node address of the first storage node to the target I / O request to obtain a target I / O request with modified destination address. The target I / O request with modified destination address is used to instruct the second storage node to perform I / O request processing based on the target I / O request with modified destination address, and to instruct the second storage node to send a first I / O request processing completion notification to the first storage node based on the node address of the first storage node after completing the I / O request processing, so that the first storage node sends a second I / O request processing completion notification corresponding to the target I / O request to the network forwarding device. The sending module is used to send the target I / O request after the destination address has been modified.

8. The apparatus according to claim 7, characterized in that, The sending module is further configured to: Add a processed flag to the target I / O request to obtain the processed target I / O request; The target I / O request after the addition processing is sent to the first storage node. The processed identifier is used to indicate that the first storage node does not process the target I / O request after the addition processing. After receiving the first I / O request processing completion notification sent by the second storage node, the second I / O request processing completion notification is sent to the network forwarding device. The receiving module is further configured to: receive the second I / O request processing completion notification sent by the first storage node; The sending module is further configured to: forward the notification of completion of processing of the second I / O request to the client device that issued the target I / O request.

9. The apparatus according to claim 7, characterized in that, The determining module is also used for: Determine whether the target I / O request is an immediate write request; If the target I / O request is determined to be an immediate write request, then the write request information corresponding to the immediate write request is determined, wherein the write request information includes the source address, destination address, and sequence number range of at least one write data packet corresponding to the immediate write request; When a non-I / O request message is received, the source address, destination address, and sequence number of the non-I / O request message are obtained, and based on the write request information of the immediate write request, it is determined whether the received message belongs to the write data message corresponding to the immediate write request. If it is determined that the received message is the write data message corresponding to the immediate write request, then the destination address in the write data message is modified to the node address of the second storage node to obtain the write data message with the modified destination address. The sending module is further configured to: send the write data packet after modifying the destination address.

10. An apparatus for processing I / O requests, characterized in that, The device, applied to a second storage node, includes: The receiving module is used to receive a target I / O request with a modified destination address sent by the network forwarding device. The target I / O request with a modified destination address carries the node address of the first storage node. The node address of the first storage node is the destination address included in the target I / O request. The target I / O request with a modified destination address is obtained by modifying the destination address in the target I / O request to the node address of the second storage node. The processing module is used to process I / O requests based on the target I / O request after the destination address has been modified. The sending module is configured to, after completing the I / O request processing, send a first I / O request processing completion notification to the first storage node based on the node address of the first storage node. The first I / O request processing completion notification is used to instruct the first storage node to send a second I / O request processing completion notification to the network forwarding device after receiving the first I / O request processing completion notification, so that the network forwarding device sends the second I / O request processing completion notification to the client device that issued the target I / O request.

11. An apparatus for processing I / O requests, characterized in that, Applied to a first storage node, the device includes: The receiving module is used to receive a target I / O request sent by the network forwarding device after being processed, wherein the processed target I / O request is marked with a processed identifier, and to receive a first I / O request processing completion notification sent by the second storage node after completing the processing of the target I / O request with modified destination address. The target I / O request with modified destination address is sent to the second storage node after the network forwarding device modifies the destination address of the target I / O request to the node address of the second storage node, and the destination address included in the target I / O request is the node address of the first storage node. The sending module is used to send a second I / O request processing completion notification to the network forwarding device, so that the network forwarding device sends the second I / O request processing completion notification to the client device that issued the target I / O request.

12. The apparatus according to claim 11, characterized in that, The device further includes a determining module, used for: Determine whether the target I / O request after the addition process is an immediate write request; if it is determined that the target I / O request after the addition process is an immediate write request, then determine the write request information corresponding to the immediate write request, wherein the write request information includes the source address, destination address, and packet identifier range corresponding to multiple write data packets corresponding to the immediate write request; When a non-I / O request message is received, the source address, destination address, and sequence number of the non-I / O request message are obtained, and based on the write request information of the immediate write request, it is determined whether the received message belongs to the write data message corresponding to the immediate write request. If it is determined that the received message is a write data message corresponding to the immediate write request, then the write data message is not processed.

13. A system for processing I / O requests, characterized in that, The system includes a network forwarding device, a first storage node, and a second storage node, wherein: The network forwarding device is configured to: receive a target I / O request, the target I / O request carrying a destination address and a target logical block address, the destination address being the node address of the first storage node; determine a second storage node corresponding to the target logical block address based on a preset correspondence between logical block addresses and storage nodes; if the second storage node is inconsistent with the first storage node, modify the destination address in the target I / O request to the node address of the second storage node, and add the node address of the first storage node to the target I / O request to obtain a target I / O request with modified destination address; and send the target I / O request with modified destination address. The second storage node is configured to: receive a target I / O request with a modified destination address sent by the network forwarding device, wherein the target I / O request with the modified destination address carries the node address of the first storage node; perform I / O request processing based on the target I / O request with the modified destination address; and after completing the I / O request processing, send a first I / O request processing completion notification to the first storage node based on the node address of the first storage node. The first storage node is configured to: receive a processed target I / O request sent by the network forwarding device, wherein the processed target I / O request contains a processed identifier; receive a first I / O request processing completion notification sent by the second storage node; and send a second I / O request processing completion notification to the network forwarding device.

14. A network forwarding device, characterized in that, The network forwarding device includes a memory and a processor, wherein the memory is used to store computer instructions; The processor executes the computer instructions stored in the memory to cause the network forwarding device to perform the method of any one of claims 1 to 3.

15. A storage node, characterized in that, The storage node includes a memory and a processor, wherein the memory is used to store computer instructions; The processor executes computer instructions stored in the memory to cause the storage node to perform the method described in any one of claims 4 to 6.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program code, which, when executed by a computer device, implements the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data transmission method and device and distributed storage system

    CN113315845A