A method, device, equipment and medium for realizing storage full copy of SPDK architecture

CN116521069BActive Publication Date: 2026-09-04JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310419393.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-14
Publication Date
2026-09-04
Estimated Expiration
2043-04-14

AI Technical Summary

Technical Problem

但目前现有的SPDK架构不能支持全拷贝技术,因此未能在基于SPDK(Storage Performance Development Kit,存储性能开发工具包)架构的存储系统中得到实际应用

Benefits of technology

[0033]The present invention has the following beneficial technical effects: The method for implementing full copy of distributed storage in SPDK architecture provided by the embodiments of the present invention adds a processing interface that supports processing a first preset instruction and a second preset instruction to the SCSI protocol processing layer in the SPDK architecture; abstracts the asynchronous event and callback processing interface of the first preset instruction and the second preset instruction in the bdev layer of the SPDK architecture; in response to the distributed storage of the SPDK architecture receiving a full copy instruction, processes the protocol field of the second preset instruction through the first preset instruction processing interface, and obtains the full copy data information through the second preset instruction; and sends the second preset instruction and data information to the storage abstraction layer in the SPDK architecture to call the hardware storage interface to perform a full copy operation. This technical solution enables the SPDK architecture to implement full copy technology, and the SPDK architecture can save CPU, memory, and storage network bandwidth resources when performing a full copy operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116521069B_ABST
    Figure CN116521069B_ABST
Patent Text Reader

Abstract

The application provides a method, device and equipment for realizing full copy of distributed storage based on SPDK architecture and a readable medium, the method comprising: adding a processing interface supporting processing of a first preset instruction and a second preset instruction in a SCSI protocol processing layer in the SPDK architecture; abstracting asynchronous events and callback processing interfaces of the first preset instruction and the second preset instruction in a bdev layer in the SPDK architecture; in response to receiving a full copy instruction by the distributed storage based on the SPDK architecture, processing protocol fields of the second preset instruction via the first preset instruction processing interface, and obtaining data information of the full copy via the second preset instruction; and issuing the second preset instruction and the data information to a storage abstraction layer in the SPDK architecture to call a hardware storage interface to perform a full copy operation. By using the scheme of the application, the SPDK architecture can realize full copy technology, and the SPDK architecture can save CPU, memory and storage network bandwidth resources when performing a full copy operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computers, and more specifically to a method, apparatus, device, and readable medium for implementing a distributed storage full copy of the SPDK architecture. Background Technology

[0002] Traditional data management involves reading data from storage via the source server, transferring it across the network to the target server, and finally writing it back to storage from the target server. Due to this data operation mechanism, when a certain number of virtual machines perform migration or cloning operations simultaneously, severe network bandwidth consumption and excessive CPU and memory resource usage occur. VAAI (Vstorage APIs for Array Integration) technology aims to offload the traditional virtual file migration process to shared storage arrays. Full copy technology, as one of the functions of VAAI, has been widely adopted in the storage technology field. However, the current SPDK architecture does not support full copy technology, and therefore it has not been practically applied in storage systems based on the SPDK (Storage Performance Development Kit) architecture. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a method, apparatus, device and readable medium for implementing distributed storage full copy of SPDK architecture. By using the technical solution of this invention, SPDK architecture can implement full copy technology, and SPDK architecture can save CPU, memory and storage network bandwidth resources when performing full copy operation.

[0004] To achieve the above objectives, one aspect of the present invention provides a method for implementing a distributed storage full copy of the SPDK architecture, comprising the following steps:

[0005] Add a processing interface to the SCSI protocol (SCSI protocol mainly transmits commands, status and block data between the host and storage device) processing layer in the SPDK architecture to support the processing of the first preset command and the second preset command;

[0006] In the SPDK architecture, the bdev (block device abstraction) layer abstracts the asynchronous event and callback handling interfaces for the first and second preset instructions;

[0007] In response to the distributed storage of the SPDK architecture receiving a full copy instruction, the protocol field of the second preset instruction is processed through the first preset instruction processing interface, and the full copy data information is obtained through the second preset instruction;

[0008] The second preset instruction and data information are sent to the storage abstraction layer in the SPDK architecture to call the hardware storage interface to perform a full copy operation.

[0009] According to one embodiment of the present invention, adding a processing interface to the SCSI protocol processing layer in the SPDK architecture to support processing a first preset instruction and a second preset instruction includes:

[0010] Add a processing interface to the SCSI protocol processing layer in the SPDK architecture to support the processing of 0x84 and 0x83 instructions.

[0011] According to an embodiment of the present invention, the protocol field for processing a second preset instruction via a first preset instruction processing interface includes:

[0012] The target_descriptors and segment_descriptors protocol fields required for processing 0x83 instructions are processed via the 0x84 instruction processing interface.

[0013] According to one embodiment of the present invention, obtaining full copy data information via a second preset instruction includes:

[0014] The protocol field is parsed via the 0x83 instruction, and information on the offset and size of the source and target volumes required for a full copy is obtained.

[0015] According to one embodiment of the present invention, it further includes:

[0016] Add the events for the protocol fields required by the 0x84 instruction processing interface to process the 0x83 instruction to the asynchronous event processing queue of the bdev layer for processing;

[0017] In response to the completion of event handling, the processing result is returned through a callback function.

[0018] According to one embodiment of the present invention, sending a second preset instruction and data information to the storage abstraction layer in the SPDK architecture to invoke the hardware storage interface for a full copy operation includes:

[0019] Add the 0x83 instruction and the acquired information to the asynchronous event handling queue of the bdev layer for processing.

[0020] In response to the 0x83 instruction, the hardware storage interface of the SPDK architecture is invoked to copy the data from the source volume to the target volume to achieve a full copy operation.

[0021] According to one embodiment of the present invention, it further includes:

[0022] In response to handling the 0x83 instruction, the event of handling the 0x83 instruction is bound to a callback function;

[0023] In response to the completion of the full copy, the processing result is fed back to the upper-layer application through a callback function.

[0024] Another aspect of the present invention provides an apparatus for implementing a distributed storage full copy of the SPDK architecture, the apparatus comprising:

[0025] Add a module and configure it to add a processing interface to the SCSI protocol processing layer in the SPDK architecture that supports processing the first preset command and the second preset command;

[0026] The configuration module is set up to abstract the asynchronous event and callback handling interfaces of the first and second preset instructions in the bdev layer of the SPDK architecture.

[0027] The processing module is configured to respond to the SPDK architecture's distributed storage receiving a full copy instruction, process the protocol field of the second preset instruction via the first preset instruction processing interface, and obtain the full copy data information via the second preset instruction.

[0028] The execution module is configured to send the second preset instruction and data information to the storage abstraction layer in the SPDK architecture to call the hardware storage interface to perform a full copy operation.

[0029] Another aspect of the embodiments of the present invention also provides a computer device, the computer device comprising:

[0030] At least one processor; and

[0031] The memory stores computer instructions that can be executed by a processor, which, when executed by the processor, implement the steps of any of the methods described above.

[0032] In another aspect, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above methods.

[0033] The present invention has the following beneficial technical effects: The method for implementing full copy of distributed storage in SPDK architecture provided by the embodiments of the present invention adds a processing interface that supports processing a first preset instruction and a second preset instruction to the SCSI protocol processing layer in the SPDK architecture; abstracts the asynchronous event and callback processing interface of the first preset instruction and the second preset instruction in the bdev layer of the SPDK architecture; in response to the distributed storage of the SPDK architecture receiving a full copy instruction, processes the protocol field of the second preset instruction through the first preset instruction processing interface, and obtains the full copy data information through the second preset instruction; and sends the second preset instruction and data information to the storage abstraction layer in the SPDK architecture to call the hardware storage interface to perform a full copy operation. This technical solution enables the SPDK architecture to implement full copy technology, and the SPDK architecture can save CPU, memory, and storage network bandwidth resources when performing a full copy operation. Attached Figure Description

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

[0035] Figure 1 This is a schematic flowchart illustrating a method for implementing a distributed storage full copy of the SPDK architecture according to an embodiment of the present invention.

[0036] Figure 2 This is a schematic diagram of an SPDK architecture according to an embodiment of the present invention;

[0037] Figure 3 A schematic diagram of an apparatus for implementing a distributed storage full copy of the SPDK architecture according to an embodiment of the present invention;

[0038] Figure 4 This is a schematic diagram of a computer device according to an embodiment of the present invention;

[0039] Figure 5 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention. Detailed Implementation

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

[0041] Based on the above objectives, a first aspect of the present invention provides an embodiment of a method for implementing a distributed storage full copy of the SPDK architecture. Figure 1 The diagram shown is a schematic flowchart of the method.

[0042] like Figure 1 As shown, the method may include the following steps:

[0043] S1 adds a processing interface to the SCSI protocol processing layer of the SPDK architecture to support the processing of first and second preset commands. The structure of the SPDK architecture is as follows: Figure 2 As shown, it includes a storage protocol layer, a storage service layer, and a hardware driver layer, in the SPDK SCSI protocol processing layer ( Figure 2 The middle storage protocol layer adds a processing interface to support the 0x83 and 0x84 instructions in the SCSI Primary Command. The 0x84 instruction processing interface is used to process the relevant protocol fields required by the 0x83 instruction. The relevant protocol fields include the target_descriptors and segment_descriptors protocol fields. The 0x83 instruction is used to parse the protocol fields and obtain information such as the offset and size of the source volume and target volume required for data replication.

[0044] S2 abstracts the asynchronous event and callback handling interfaces for the first and second preset instructions in the bdev layer of the SPDK architecture. Figure 2 The storage service layer in SPDK abstracts the asynchronous events and callback handling interfaces for 0x83 and 0x84 instructions. It abstracts asynchronous events according to the SPDK bdev layer architecture specification, binds callback handling functions to events, adds events to the SPDK bdev processing queue, waits for polling processing, and returns the processing result through the callback handling function.

[0045] S3 responds to the SPDK architecture's distributed storage receiving a full copy instruction. It processes the protocol field of the second preset instruction via the first preset instruction processing interface and retrieves the full copy data information via the second preset instruction. Upon receiving the full copy instruction, it adds the event of the 0x84 instruction processing interface handling the protocol field required by the 0x83 instruction to the asynchronous event processing queue of the bdev layer for processing. Once the event processing is complete, it returns the processing result via a callback function. Then, it parses the protocol field using the 0x83 instruction and obtains information such as the offset and size of the source and target volumes required for data copying. The event of processing the 0x83 instruction (full copy operation) is added to the SPDK bdev processing queue for polling processing.

[0046] S4 sends the second preset command and data information to the storage abstraction layer in the SPDK architecture to call the hardware storage interface for a full copy operation. In the backend storage abstraction layer of the SPDK architecture ( Figure 2 The hardware driver in the middle implements the processing interface for the full copy technology. The backend storage abstraction layer actually calls the hardware storage interface to copy the data of the source volume to the target volume to achieve the full copy operation. At the same time, it binds callback functions to the events and feeds back the processing results to the upper layer application through the callback functions.

[0047] By using the technical solution of the present invention, the SPDK architecture can realize full copy technology, and the SPDK architecture can save CPU, memory and storage network bandwidth resources when performing full copy operation.

[0048] In a preferred embodiment of the present invention, adding a processing interface to the SCSI protocol processing layer of the SPDK architecture to support processing a first preset instruction and a second preset instruction includes:

[0049] Add processing interfaces to the SCSI protocol processing layer of the SPDK architecture to support 0x84 and 0x83 instructions. The first default instruction is 0x84, and the second default instruction is 0x83. Add interfaces to the SPDK architecture to process these two instructions, and achieve a full copy of the SPDK architecture through these two instructions.

[0050] In a preferred embodiment of the present invention, the protocol field for processing the second preset instruction via the first preset instruction processing interface includes:

[0051] The target_descriptors and segment_descriptors protocol fields required for processing 0x83 instructions are processed via the 0x84 instruction processing interface.

[0052] In a preferred embodiment of the present invention, obtaining the full copy data information via a second preset instruction includes:

[0053] The protocol field is parsed via the 0x83 instruction, and information on the offset and size of the source and target volumes required for a full copy is obtained.

[0054] In a preferred embodiment of the present invention, it further includes:

[0055] Add the events for the protocol fields required by the 0x84 instruction processing interface to process the 0x83 instruction to the asynchronous event processing queue of the bdev layer for processing;

[0056] In response to the completion of event handling, the processing result is returned through a callback function.

[0057] In a preferred embodiment of the present invention, sending the second preset instruction and data information to the storage abstraction layer in the SPDK architecture to call the hardware storage interface for a full copy operation includes:

[0058] Add the 0x83 instruction and the acquired information to the asynchronous event handling queue of the bdev layer for processing.

[0059] In response to the 0x83 instruction, the hardware storage interface of the SPDK architecture is invoked to copy the data from the source volume to the target volume to achieve a full copy operation.

[0060] In a preferred embodiment of the present invention, it further includes:

[0061] In response to handling the 0x83 instruction, the event of handling the 0x83 instruction is bound to a callback function;

[0062] In response to the completion of the full copy, the processing result is fed back to the upper-layer application through a callback function.

[0063] By using the technical solution of the present invention, the SPDK architecture can realize full copy technology, and the SPDK architecture can save CPU, memory and storage network bandwidth resources when performing full copy operation.

[0064] It should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. The embodiments of the computer program described above can achieve the same or similar effects as any of the corresponding foregoing method embodiments.

[0065] Furthermore, the method disclosed in the embodiments of the present invention can also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. When the computer program is executed by the CPU, it performs the functions defined in the method disclosed in the embodiments of the present invention.

[0066] Based on the above objectives, a second aspect of the embodiments of the present invention provides an apparatus for implementing a distributed storage full copy of the SPDK architecture, such as... Figure 3 As shown, the device 200 includes:

[0067] Add a module and configure it to add a processing interface to the SCSI protocol processing layer in the SPDK architecture that supports processing the first preset command and the second preset command;

[0068] The configuration module is set up to abstract the asynchronous event and callback handling interfaces of the first and second preset instructions in the bdev layer of the SPDK architecture.

[0069] The processing module is configured to respond to the SPDK architecture's distributed storage receiving a full copy instruction, process the protocol field of the second preset instruction via the first preset instruction processing interface, and obtain the full copy data information via the second preset instruction.

[0070] The execution module is configured to send the second preset instruction and data information to the storage abstraction layer in the SPDK architecture to call the hardware storage interface to perform a full copy operation.

[0071] In view of the above objectives, a third aspect of the present invention provides a computer device. Figure 4 The diagram shown is a schematic representation of an embodiment of the computer device provided by the present invention. Figure 4 As shown, embodiments of the present invention include the following apparatus: at least one processor 21; and a memory 22 storing computer instructions 23 executable on the processor, which, when executed by the processor, implement the following method:

[0072] Add processing interfaces to the SCSI protocol processing layer of the SPDK architecture to support the processing of first and second preset commands. The structure of the SPDK architecture is as follows: Figure 2 As shown, it includes a storage protocol layer, a storage service layer, and a hardware driver layer, in the SPDKSCSI protocol processing layer ( Figure 2 The middle storage protocol layer adds a processing interface to support the 0x83 and 0x84 instructions in the SCSI Primary Command. The 0x84 instruction processing interface is used to process the relevant protocol fields required by the 0x83 instruction. The relevant protocol fields include the target_descriptors and segment_descriptors protocol fields. The 0x83 instruction is used to parse the protocol fields and obtain information such as the offset and size of the source volume and target volume required for data replication.

[0073] The SPDK architecture's bdev layer abstracts the asynchronous event and callback handling interfaces for the first and second preset instructions. In the SPDK bdev layer ( Figure 2 The storage service layer in SPDK abstracts the asynchronous events and callback handling interfaces for 0x83 and 0x84 instructions. It abstracts asynchronous events according to the SPDK bdev layer architecture specification, binds callback handling functions to events, adds events to the SPDK bdev processing queue, waits for polling processing, and returns the processing result through the callback handling function.

[0074] In response to the SPDK architecture's distributed storage receiving a full copy instruction, the protocol field of the second preset instruction is processed via the first preset instruction processing interface, and the full copy data information is obtained via the second preset instruction. Upon receiving the full copy instruction, the event of the 0x84 instruction processing interface processing the protocol field required by the 0x83 instruction is added to the asynchronous event processing queue of the bdev layer for processing. Once the event processing is complete, the processing result is returned via a callback function. Then, the protocol field is parsed via the 0x83 instruction to obtain information such as the offset and size of the source and target volumes required for data copying. The event of processing the 0x83 instruction (full copy operation) is added to the SPDK bdev processing queue for polling processing.

[0075] The second preset instruction and data information are sent to the storage abstraction layer in the SPDK architecture to invoke the hardware storage interface for a full copy operation. In the backend storage abstraction layer of the SPDK architecture ( Figure 2 The hardware driver in the middle implements the processing interface for the full copy technology. The backend storage abstraction layer actually calls the hardware storage interface to copy the data of the source volume to the target volume to achieve the full copy operation. At the same time, it binds callback functions to the events and feeds back the processing results to the upper layer application through the callback functions.

[0076] By using the technical solution of the present invention, the SPDK architecture can realize full copy technology, and the SPDK architecture can save CPU, memory and storage network bandwidth resources when performing full copy operation.

[0077] In a preferred embodiment of the present invention, adding a processing interface to the SCSI protocol processing layer of the SPDK architecture to support processing a first preset instruction and a second preset instruction includes:

[0078] Add processing interfaces to the SCSI protocol processing layer of the SPDK architecture to support 0x84 and 0x83 instructions. The first default instruction is 0x84, and the second default instruction is 0x83. Add interfaces to the SPDK architecture to process these two instructions, and achieve a full copy of the SPDK architecture through these two instructions.

[0079] In a preferred embodiment of the present invention, the protocol field for processing the second preset instruction via the first preset instruction processing interface includes:

[0080] The target_descriptors and segment_descriptors protocol fields required for processing 0x83 instructions are processed via the 0x84 instruction processing interface.

[0081] In a preferred embodiment of the present invention, obtaining the full copy data information via a second preset instruction includes:

[0082] The protocol field is parsed via the 0x83 instruction, and information on the offset and size of the source and target volumes required for a full copy is obtained.

[0083] In a preferred embodiment of the present invention, it further includes:

[0084] Add the events for the protocol fields required by the 0x84 instruction processing interface to process the 0x83 instruction to the asynchronous event processing queue of the bdev layer for processing;

[0085] In response to the completion of event handling, the processing result is returned through a callback function.

[0086] In a preferred embodiment of the present invention, sending the second preset instruction and data information to the storage abstraction layer in the SPDK architecture to call the hardware storage interface for a full copy operation includes:

[0087] Add the 0x83 instruction and the acquired information to the asynchronous event handling queue of the bdev layer for processing.

[0088] In response to the 0x83 instruction, the hardware storage interface of the SPDK architecture is invoked to copy the data from the source volume to the target volume to achieve a full copy operation.

[0089] In a preferred embodiment of the present invention, it further includes:

[0090] In response to handling the 0x83 instruction, the event of handling the 0x83 instruction is bound to a callback function;

[0091] In response to the completion of the full copy, the processing result is fed back to the upper-layer application through a callback function.

[0092] In view of the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium. Figure 5 The diagram illustrates an embodiment of the computer-readable storage medium provided by the present invention. Figure 5 As shown, computer-readable storage medium 31 stores a computer program 32 that, when executed by a processor, performs the following methods:

[0093] Add processing interfaces to the SCSI protocol processing layer of the SPDK architecture to support the processing of first and second preset commands. The structure of the SPDK architecture is as follows: Figure 2 As shown, it includes a storage protocol layer, a storage service layer, and a hardware driver layer, in the SPDKSCSI protocol processing layer ( Figure 2The middle storage protocol layer adds a processing interface to support the 0x83 and 0x84 instructions in the SCSI Primary Command. The 0x84 instruction processing interface is used to process the relevant protocol fields required by the 0x83 instruction. The relevant protocol fields include the target_descriptors and segment_descriptors protocol fields. The 0x83 instruction is used to parse the protocol fields and obtain information such as the offset and size of the source volume and target volume required for data replication.

[0094] The SPDK architecture's bdev layer abstracts the asynchronous event and callback handling interfaces for the first and second preset instructions. In the SPDK bdev layer ( Figure 2 The storage service layer in SPDK abstracts the asynchronous events and callback handling interfaces for 0x83 and 0x84 instructions. It abstracts asynchronous events according to the SPDK bdev layer architecture specification, binds callback handling functions to events, adds events to the SPDK bdev processing queue, waits for polling processing, and returns the processing result through the callback handling function.

[0095] In response to the SPDK architecture's distributed storage receiving a full copy instruction, the protocol field of the second preset instruction is processed via the first preset instruction processing interface, and the full copy data information is obtained via the second preset instruction. Upon receiving the full copy instruction, the event of the 0x84 instruction processing interface processing the protocol field required by the 0x83 instruction is added to the asynchronous event processing queue of the bdev layer for processing. Once the event processing is complete, the processing result is returned via a callback function. Then, the protocol field is parsed via the 0x83 instruction to obtain information such as the offset and size of the source and target volumes required for data copying. The event of processing the 0x83 instruction (full copy operation) is added to the SPDK bdev processing queue for polling processing.

[0096] The second preset instruction and data information are sent to the storage abstraction layer in the SPDK architecture to invoke the hardware storage interface for a full copy operation. In the backend storage abstraction layer of the SPDK architecture ( Figure 2 The hardware driver in the middle implements the processing interface for the full copy technology. The backend storage abstraction layer actually calls the hardware storage interface to copy the data of the source volume to the target volume to achieve the full copy operation. At the same time, it binds callback functions to the events and feeds back the processing results to the upper layer application through the callback functions.

[0097] By using the technical solution of the present invention, the SPDK architecture can realize full copy technology, and the SPDK architecture can save CPU, memory and storage network bandwidth resources when performing full copy operation.

[0098] In a preferred embodiment of the present invention, adding a processing interface to the SCSI protocol processing layer of the SPDK architecture to support processing a first preset instruction and a second preset instruction includes:

[0099] Add a processing interface to the SCSI protocol processing layer in the SPDK architecture to support the processing of 0x84 and 0x83 instructions.

[0100] In a preferred embodiment of the present invention, the protocol field for processing the second preset instruction via the first preset instruction processing interface includes:

[0101] The target_descriptors and segment_descriptors protocol fields required for processing 0x83 instructions are processed via the 0x84 instruction processing interface.

[0102] In a preferred embodiment of the present invention, obtaining the full copy data information via a second preset instruction includes:

[0103] The protocol field is parsed via the 0x83 instruction, and information on the offset and size of the source and target volumes required for a full copy is obtained.

[0104] In a preferred embodiment of the present invention, it further includes:

[0105] Add the events for the protocol fields required by the 0x84 instruction processing interface to process the 0x83 instruction to the asynchronous event processing queue of the bdev layer for processing;

[0106] In response to the completion of event handling, the processing result is returned through a callback function.

[0107] In a preferred embodiment of the present invention, sending the second preset instruction and data information to the storage abstraction layer in the SPDK architecture to call the hardware storage interface for a full copy operation includes:

[0108] Add the 0x83 instruction and the acquired information to the asynchronous event handling queue of the bdev layer for processing.

[0109] In response to the 0x83 instruction, the hardware storage interface of the SPDK architecture is invoked to copy the data from the source volume to the target volume to achieve a full copy operation.

[0110] In a preferred embodiment of the present invention, it further includes:

[0111] In response to handling the 0x83 instruction, the event of handling the 0x83 instruction is bound to a callback function;

[0112] In response to the completion of the full copy, the processing result is fed back to the upper-layer application through a callback function.

[0113] Furthermore, the method disclosed in the embodiments of the present invention can also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. When the computer program is executed by the processor, it performs the functions defined in the method disclosed in the embodiments of the present invention.

[0114] Furthermore, the above-described method steps and system units can also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to perform the functions of the above-described steps or units.

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

[0116] In one or more exemplary designs, functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, functionality may be stored as one or more instructions or code on or transmitted via a computer-readable medium. Computer-readable media include computer storage media and communication media, including any medium that facilitates the transfer of a computer program from one location to another. Storage media may be any available medium accessible to a general-purpose or special-purpose computer. By way of example, and not limitation, computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disc storage devices, disk storage devices or other magnetic storage devices, or any other medium that may be used to carry or store the required program code in the form of instructions or data structures and is accessible to a general-purpose or special-purpose computer or a general-purpose or special-purpose processor. Furthermore, any connection may be appropriately referred to as computer-readable media. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the aforementioned coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are all included in the definition of media. As used herein, disks and optical discs include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

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

[0118] It should be understood that, as used herein, the singular form “a” is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, “and / or” refers to any and all possible combinations of one or more of the associated listed items.

[0119] The embodiment numbers disclosed in the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0120] 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.

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

Claims

1. A method for implementing distributed storage full copy in SPDK architecture, characterized in that, Includes the following steps: Add a processing interface to the SCSI protocol processing layer in the SPDK architecture to support the processing of the first and second preset commands; The bdev layer in the SPDK architecture abstracts the asynchronous event and callback handling interfaces for the first and second preset instructions; In response to the distributed storage of the SPDK architecture receiving a full copy instruction, the protocol field of the second preset instruction is processed through the first preset instruction processing interface, and the full copy data information is obtained through the second preset instruction; The second preset instruction and data information are sent to the storage abstraction layer in the SPDK architecture to call the hardware storage interface to perform a full copy operation.

2. The method according to claim 1, characterized in that, Adding processing interfaces to the SCSI protocol processing layer in the SPDK architecture to support the processing of first and second preset commands includes: Add a processing interface to the SCSI protocol processing layer in the SPDK architecture to support the processing of 0x84 and 0x83 instructions.

3. The method according to claim 2, characterized in that, The protocol fields for processing the second preset instruction via the first preset instruction processing interface include: The protocol fields required by the 0x83 instruction are processed via the 0x84 instruction processing interface.

4. The method according to claim 3, characterized in that, The data information obtained via the second preset command includes: The protocol field is parsed via the 0x83 instruction, and information on the offset and size of the source and target volumes required for a full copy is obtained.

5. The method according to claim 3, characterized in that, Also includes: Add the events for the protocol fields required by the 0x84 instruction processing interface to process the 0x83 instruction to the asynchronous event processing queue of the bdev layer for processing; In response to the completion of event handling, the processing result is returned through a callback function.

6. The method according to claim 4, characterized in that, The second preset instruction and data information are sent to the storage abstraction layer in the SPDK architecture to call the hardware storage interface for a full copy operation, including: Add the 0x83 instruction and the acquired information to the asynchronous event handling queue of the bdev layer for processing. In response to the 0x83 instruction, the hardware storage interface of the SPDK architecture is invoked to copy the data from the source volume to the target volume to achieve a full copy operation.

7. The method according to claim 6, characterized in that, Also includes: In response to handling the 0x83 instruction, the event of handling the 0x83 instruction is bound to a callback function; In response to the completion of the full copy, the processing result is fed back to the upper-layer application through a callback function.

8. An apparatus for implementing a distributed storage full copy based on the SPDK architecture, characterized in that, The device includes: Add a module, which is configured to add a processing interface to the SCSI protocol processing layer in the SPDK architecture to support the processing of a first preset instruction and a second preset instruction; The configuration module is configured to abstract asynchronous event and callback processing interfaces for the first and second preset instructions in the bdev layer of the SPDK architecture. The processing module is configured to respond to the SPDK architecture's distributed storage receiving a full copy instruction, process the protocol field of the second preset instruction via a first preset instruction processing interface, and obtain the full copy data information via the second preset instruction. The execution module is configured to send the second preset instruction and data information to the storage abstraction layer in the SPDK architecture to call the hardware storage interface to perform a full copy operation.

9. A computer device, characterized in that, include: At least one processor; as well as A memory storing computer instructions executable on the processor, which, when executed by the processor, implement the steps of the method according to any one of claims 1-7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Interface for distributed processing of SCSI tasks

    US20040221070A1

  • Interfacing with a point-in-time copy service architecture

    US20120331247A1