WO2016000147A1 - Method for accessing storage device, and host - Google Patents

Method for accessing storage device, and host Download PDF

Info

Publication number
WO2016000147A1
WO2016000147A1 PCT/CN2014/081214 CN2014081214W WO2016000147A1 WO 2016000147 A1 WO2016000147 A1 WO 2016000147A1 CN 2014081214 W CN2014081214 W CN 2014081214W WO 2016000147 A1 WO2016000147 A1 WO 2016000147A1
Authority
WO
WIPO (PCT)
Prior art keywords
operation instruction
definition module
software definition
access
operating system
Prior art date
Application number
PCT/CN2014/081214
Other languages
French (fr)
Chinese (zh)
Inventor
王志美
胡斐然
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201480002085.5A priority Critical patent/CN105830038B/en
Priority to PCT/CN2014/081214 priority patent/WO2016000147A1/en
Publication of WO2016000147A1 publication Critical patent/WO2016000147A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures

Definitions

  • the embodiments of the present invention relate to computer technologies, and in particular, to a method and a host for accessing a storage device. Background technique
  • SDS Software-defined storage
  • OS operating system
  • hypervisor ie Hypervisor
  • users do not have to purchase storage controller hardware such as hard drives, flash memory, etc. from specific vendors.
  • SDS-based storage system storage virtualization is usually implemented through a software-defined layer (that is, software that performs all storage-related control operations), and a virtual resource pool is provided for upper-layer applications, so that applications can be conveniently and efficiently accessed. Storage device.
  • SDS-based storage systems provide block/file drivers in the operating system for compatibility with existing applications.
  • the application will issue an input/output (also called I/O, or 10) operation instruction to the operating system, and the I/O operation instruction is converted by the operating system block/file driver. Sended to the software definition layer, the software definition layer accesses the storage device, and returns the access result to the application to complete the access to the storage device.
  • I/O input/output
  • the software definition layer accesses the storage device, and returns the access result to the application to complete the access to the storage device.
  • kernel trapping and kernel trapping not only reduces I/O access speed, affects access efficiency, but also reduces system reliability. Summary of the invention
  • the embodiments of the present invention provide a method and a host for accessing a storage device, which can reduce the kernel trapping and kernel trapping times of the system when the application accesses the storage device.
  • an embodiment of the present invention provides a method for accessing a storage device, where the SDS-based storage system includes a host and the storage. Equipment, the method includes:
  • a software definition module running in the user space of the host intercepts an input/output I/O operation instruction sent by an application of the host, where the I/O operation instruction carries an access address;
  • the software definition module instructs the operating system kernel of the host to access the storage device according to the access address according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction; the software definition module Receiving an access result returned by the operating system kernel;
  • the software definition module sends the access result to the application.
  • the outputting the I/O operation instruction includes: when the application links the operating system by using a dynamic link library, the software definition module intercepts the I/O operation sent by the application by using a dynamic link library preloading manner instruction.
  • the outputting the I/O operation instruction includes: when the application links the operating system by using a static link library, the software definition module intercepts the I/O operation sent by the application by means of an application link process control instruction.
  • the storage device includes a cache device and a storage device; And indicating, according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, the definition module, according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, indicating the location
  • the operating system kernel of the host accesses the cache device according to the access address to access the storage device through the cache device.
  • the software definition module is configured according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction Accessing the cache device by the operating system kernel of the host according to the access address to access the storage device by using the cache device includes:
  • the software definition module instructs the operating system kernel to follow the access address according to the Reading the read access data in the cache device; the software definition module receives the access result returned by the operating system kernel; and the software definition module sending the access result to the application program includes: the software definition module Receiving the read access data returned by the operating system kernel; the software definition module performing an advanced function operation on the read access data according to an advanced function service included in the storage service corresponding to the I/O operation instruction; The software definition module sends the read access data after performing the advanced function operation to the application.
  • the software definition module is configured according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction Accessing the cache device by the operating system kernel of the host according to the access address to access the storage device by using the cache device includes:
  • the I/O operation instruction corresponding to the I/O operation instruction includes an advanced function service, and the I/O operation instruction is a write operation instruction
  • the I/O operation instruction further carries write data
  • the software definition module is configured according to The advanced function service included in the storage service corresponding to the I/O operation instruction performs an advanced function operation on the write data
  • the software definition module instructs the operating system kernel to operate the access address and the execution advanced function
  • the subsequent write data is written into the cache device, So that the cache device writes the write data after performing the advanced function operation to the storage device according to the access address; then the software definition module receives an access result returned by the operating system kernel
  • the software definition module sending the access result to the application program includes: the software definition module receiving a write data result returned by the operating system kernel; the software definition module transmitting the write data result to the application.
  • the software definition module is configured according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction Accessing the cache device by the operating system kernel of the host according to the access address to access the storage device by using the cache device includes:
  • the software definition module instructs the host operating system kernel to perform the access according to the The address reads the read access data from the cache device; the software definition module receives the access result returned by the operating system kernel; and the software definition module sends the access result to the application program: The software definition module receives the read access data returned by the operating system kernel; the software definition module sends the read access data to the application.
  • the software definition module is configured according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction Accessing the cache device by the operating system kernel of the host according to the access address to access the storage device by using the cache device includes:
  • the I/O operation instruction corresponding to the I/O operation instruction does not include the advanced function service, and the I/O operation instruction is a write operation instruction
  • the I/O operation instruction further carries write data
  • the software definition module Instructing the operating system kernel to write the access address and the write data into the cache device, such that the cache device writes the write data into the storage device according to the access address;
  • the software definition module receives the access result returned by the operating system kernel;
  • the software definition module sends the access result to the application program: the software definition module receives the write data returned by the operating system kernel Resulting; the software definition module will write the number The result is sent to the application.
  • a host for accessing a storage device configured to store a storage system based on a software definition
  • the host includes an application, an operating system kernel, and a software definition module; wherein the software definition module runs on the host User space;
  • the software definition module is configured to intercept an input/output I/O operation instruction sent by the application, where the I/O operation instruction carries an access address, and according to the access address, determines an I/O operation instruction corresponding to the The storage service, according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, instructing the operating system kernel to access the storage device in the SDS-based storage system according to the access address;
  • the operating system kernel is configured to access the storage device according to the indication of the software definition module and the access address, and return an access result to the software definition module;
  • the software definition module is configured to receive the access result returned by the operating system kernel, and send the access result to the application.
  • the software definition module is specifically configured to query, according to the access address, a pre-configured address service mapping table to determine a storage corresponding to the I/O operation instruction.
  • the address service mapping table is used to record the correspondence between the address of the storage device and the storage service.
  • the software definition module is specifically used when the application links the operating system by using a dynamic link library.
  • the method of preloading the dynamic link library is used to intercept the I/O operation instruction sent by the application.
  • the software definition module is specifically used when the application links the operating system by using a static link library.
  • the I/O operation instruction sent by the application is intercepted by means of an application linking process control.
  • the storage device includes a cache device and a storage device.
  • the software definition module is specifically configured to: according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, Instructing the operating system kernel of the host to access the cache device according to the access address; the operating system kernel is specifically configured to access the cache device according to the indication of the software definition module and the access address, to pass the The cache device accesses the storage device.
  • the software definition module is specifically configured to include an advanced function service in a storage service corresponding to the I/O operation instruction, and
  • the I/O operation instruction is a read operation instruction, instructing the operating system kernel to read read access data from the cache device according to the access address
  • the operating system kernel is specifically configured to define a module according to the software And the access address, the read access data is read from the cache device, and the read access data is returned to the software definition module
  • the software definition module is specifically configured to receive the operating system kernel return The read access data, performing an advanced function operation on the read access data according to the advanced function service included in the storage service corresponding to the I/O operation instruction, and performing the read access after performing the advanced function operation Data is sent to the application.
  • the software definition module is specifically configured to include an advanced function service in a storage service corresponding to the I/O operation instruction, and
  • the I/O operation instruction is a write operation instruction, perform an advanced function operation on the write data carried by the I/O operation instruction according to an advanced function service included in the storage service corresponding to the I/O operation instruction, and indicate Writing, by the operating system kernel, the access address and the write data after performing the advanced function operation to the cache device;
  • the operating system kernel is specifically configured to: according to an instruction of the software definition module, The access address and the write data after performing the advanced function operation are written into the cache device, such that the cache device performs the write data after performing the advanced function operation according to the access address.
  • the software definition module is specifically configured to receive the number of writes returned by the operating system kernel According to the result, the write data result is sent to the application.
  • the software definition module is specifically configured to: when the storage service corresponding to the I/O operation instruction does not include an advanced function service, When the I/O operation instruction is a read operation instruction, the operating system kernel of the host is instructed to read read access data from the cache device according to the access address; the operating system kernel is specifically configured to be used according to the An instruction of the software definition module and the access address, reading read access data from the cache device, and returning the read access data to the software definition module; the software definition module is specifically configured to receive the operation The read access data returned by the system kernel, and the read access data is sent to the application.
  • the software definition module is specifically configured to not include an advanced function service in a storage service corresponding to the I/O operation instruction, And when the I/O operation instruction is a write operation instruction, instructing the operating system kernel to write the access address and the write data carried by the I/O operation instruction into the cache device;
  • the kernel is specifically configured to write the access address and the write data into the cache device according to an indication of the software definition module, so that the cache device writes the write data according to the access address
  • the software definition module is specifically configured to receive a write returned by the operating system kernel The result of the data is sent to the application.
  • an embodiment of the present invention provides a host that accesses a storage device, where the host includes a processor, a memory, a bus, and a communication interface;
  • the memory is configured to store a computer execution instruction
  • the processor is connected to the memory through the bus, and when the host is running, the processor executes the computer execution instruction stored in the memory, so that The method for accessing a storage device according to the first aspect, or the method for accessing a storage device according to any of the possible implementations of the first aspect.
  • an embodiment of the present invention provides a computer readable medium, characterized in that: The method of accessing a storage device of the first aspect or the access storage device of any of the possible implementations of the first aspect, when the computer executes the instructions for execution by the processor of the computer. Methods.
  • the software definition module running in the user space of the host can intercept an I/O operation instruction sent by the application of the host, and the I/O operation instruction carries an access address, which avoids the The I/O operation instruction is trapped in a kernel state, so that the software definition module can determine, according to the access address, a storage service corresponding to the I/O operation instruction, according to the storage service and the corresponding operation instruction of the I/O operation instruction.
  • An I/O operation instruction instructing an operating system kernel of the host to access the storage device according to the access address, receiving an access result returned by the operating system kernel, and transmitting the access result to the application, to implement The application's access to the storage device.
  • the software definition module runs in the user space, in the above process, only when the software definition module instructs the operating system kernel of the host to access the storage device, there is a kernel trap, and the software definition module receives the access result returned by the operating system kernel.
  • There is a kernel trap that reduces the number of kernel traps and kernel traps when the application accesses the storage device, which improves access speed and improves system reliability.
  • FIG. 1 is a schematic diagram of an SDS-based storage system
  • FIG. 2 is a schematic diagram of an application accessing a storage device in the prior art
  • FIG. 3 is a schematic diagram of a method for accessing a storage device according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of an SDS-based storage system according to an embodiment of the present invention
  • FIG. 6 is a flowchart of still another method for accessing a storage device according to an embodiment of the present invention
  • FIG. 7 is a flowchart of a method for accessing a storage device according to an embodiment of the present invention
  • FIG. 8 is a flowchart of another method for accessing a storage device according to an embodiment of the present invention
  • FIG. 9 is a flowchart of an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of another host accessing a storage device according to an embodiment of the present invention. detailed description
  • the embodiment of the invention provides a method for accessing a storage device, which can reduce the kernel trapping and kernel trapping times of the system when the application accesses the storage device, thereby improving the access speed and improving the system reliability.
  • an SDS-based storage system may generally include a host and a storage device, and a software definition module (ie, a software definition layer) is configured in the host, and a typical storage controller in the storage hardware is integrated in the software definition module.
  • the function can provide storage management such as volume management, and can cooperate with the storage device to provide storage services for upper-layer applications.
  • the storage services provided by the software definition module and the storage device generally include not only data read/write services but also advanced function services (the advanced function services refer to functional services other than data read/write services). , such as data snapshots, intelligent tiering, deduplication or data compression.
  • the storage device may be located at a remote end of the host, or may be set locally on the host, where the storage device may be a storage area network (SAN) or a network attached storage (NAS).
  • SAN storage area network
  • NAS network attached storage
  • the workflow is generally as follows: 1) The application sends an input/output (also referred to as I/O, or 10) operation instruction to the operating system kernel; 2) the operating system The kernel provides the I/O operation instruction to the block/file driver of the operating system, and the block/file driver of the operating system converts the I/O operation instruction to the software definition module; 3) the software definition module is converted according to the The I/O operation instruction performs corresponding read/write access to the storage device; 4) the software definition module receives the access result returned by the storage device, and sends the result to the application to complete the access to the storage device.
  • I/O input/output
  • the software definition module receives the access result returned by the storage device, and sends the result to the application to complete the access to the storage device.
  • both the application and the software-defined modules are implemented in user mode, that is, running in user space
  • the block/file drivers of the operating system kernel and operating system are implemented in kernel mode, that is, running in kernel space
  • step 1 In the case of switching from user mode to kernel mode, there is a kernel trap; in step 2), it needs to switch from kernel mode to user mode, there is a kernel trap; and when accessing the storage device in step 3), it needs to switch from user mode.
  • the kernel state there is a kernel trap; in step 4), when receiving the access result, the kernel state needs to be switched to the user state, and there is a kernel trap, as shown in Figure 2.
  • the kernel is trapped and the kernel is trapped, the longer the I/O path is. Therefore, multiple core traps and kernel traps will not only reduce I/O access speed, but also affect access efficiency and system reliability. .
  • the embodiment of the invention provides a method for accessing a storage device, which can enhance the function of the application module, so as to avoid unnecessary kernel trapping and kernel trapping when the application accesses the storage device, that is, the prior art step 1) And 2) kernel traps and kernel traps, only retaining the necessary kernel traps and kernel traps, that is, kernel traps and kernel traps when accessing storage devices, thereby improving access speed and improving system reliability.
  • the embodiment of the present invention provides a method for accessing a storage device, which is used in an SDS-based storage system, where the SDS-based storage system includes a host and the storage device. As shown in FIG. 3, the method includes:
  • S301 The software definition module running in the user space in the host intercepts an input/output I/O operation instruction sent by an application of the host, where the I/O operation instruction carries an access address.
  • the application running in the user space when accessing the storage device, will send an I/O operation instruction to the operating system in the host.
  • the software definition module may intercept the I/O operation instruction before the I/O operation instruction reaches the operating system kernel, and avoid the I/O operation instruction because the software definition module runs in a user space. Fall into the kernel state.
  • the software definition module determines, according to the access address, the pair of I/O operation instructions.
  • the storage service should be.
  • the software definition module needs to determine a storage service corresponding to the I/O operation instruction, so as to subsequently provide a storage service corresponding to the I/O operation instruction, and implement access of the application to the storage device.
  • the storage service includes not only data read/write services, but also advanced function services (services other than data read/write services), such as data snapshots, intelligent layering, deduplication, or data. Compression and so on.
  • the software definition module can determine the storage service corresponding to the I/O operation instruction according to the access address. Since the software definition module runs in the user space, the process of determining the storage service corresponding to the I/O operation instruction is implemented in the user space, thereby avoiding the sinking/trapping of the kernel.
  • the software definition module may query a pre-configured address service mapping table according to the access address to determine a storage service corresponding to the I/O operation instruction; and the address service mapping table is used to record the storage.
  • the address service mapping table may be configured in the software definition module by the operation and maintenance system, so that the software definition module may be configured according to the
  • the access address is used to query a pre-configured address service mapping table to determine a storage service corresponding to the I/O operation instruction.
  • the address of the element may also be the address of a part of the storage unit in the storage device.
  • the address of the storage device may be in the form of a logical address or may be presented in other forms, which is not limited herein.
  • the software definition module is configured according to the storage service corresponding to the I/O operation instruction and the An I/O operation instruction instructing an operating system kernel of the host to access the storage device according to the access address.
  • the kernel of the operating system When accessing the storage device, the kernel of the operating system may be utilized, and the software definition module may indicate the host according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction.
  • the operating system kernel accesses the storage device based on the access address. Since the operating system kernel runs in kernel space and needs to be in kernel space when accessing the storage device, the storage system will switch from user mode to kernel state, and a kernel trap will occur.
  • the I/O operation instruction may be a read operation instruction, and may also be a write operation instruction. If the storage service corresponding to the I/O operation instruction does not include an advanced function service, the software definition module only needs to be based on The I/O operation instruction, indicating that the operating system kernel of the host performs read/write access to the storage device according to the access address; if the storage service corresponding to the I/O operation instruction includes an advanced function service, The software definition module may perform, according to the storage service corresponding to the I/O operation instruction, perform a corresponding advanced function operation on data that needs to be written into the storage device, and then instruct the operating system kernel to perform the The processed data is written to the storage device, or the software definition module may instruct the operating system kernel to read data from the storage device according to the access address, and then read from the storage device The retrieved data performs the corresponding advanced function operations.
  • the software definition module may perform a data compression operation on data that needs to be written to the storage device, and then compress the data. The subsequent data is written to the storage device.
  • S304 The software definition module receives an access result returned by the operating system kernel.
  • the software definition module may receive an access result returned by the operating system kernel. Because the software definition module runs in a user space, the operating system kernel runs in a kernel space, and the storage system switches from a kernel state to a user state. , a kernel trap occurs.
  • S305 The software definition module sends the access result to the application.
  • the software definition module When the storage service corresponding to the I/O operation instruction does not include the advanced function operation, the software definition module is straight And sending the access result returned by the operating system kernel to the application to complete access to the storage device; if the storage service corresponding to the I/O operation instruction includes an advanced function service, The software definition module may need to perform corresponding advanced function operations on the access result (eg, data read from the storage device) before sending the application to the application to complete access to the storage device. For example, if the advanced function service included in the storage service corresponding to the I/O operation instruction is data compression, the software definition module may perform a data compression operation on the data read from the storage device, and then send Give the application.
  • the access result eg, data read from the storage device
  • Both the software definition module and the application run in the user space, avoiding kernel trapping/sinking.
  • the software definition module running in the user space of the host can intercept an I/O operation instruction sent by the application of the host, and the I/O operation instruction carries an access address, which avoids the The I/O operation instruction is trapped in a kernel state, so that the software definition module can determine, according to the access address, a storage service corresponding to the I/O operation instruction, according to the storage service and the corresponding operation instruction of the I/O operation instruction.
  • An I/O operation instruction instructing an operating system kernel of the host to access the storage device according to the access address, receiving an access result returned by the operating system kernel, and transmitting the access result to the application, to implement The application's access to the storage device.
  • the software definition module runs in the user space, in the above process, only when the software definition module instructs the operating system kernel of the host to access the storage device, there is a kernel trap, and the software definition module receives the access result returned by the operating system kernel.
  • There is a kernel trap that reduces the number of kernel traps and kernel traps when the application accesses the storage device, which improves access speed and improves system reliability.
  • the host and storage device described in the first embodiment may be 11 and 12 in the SDS-based storage system shown in Fig. 1, respectively.
  • the cache device 411 can also be added to the storage device 12 shown in FIG. 1, thereby obtaining the storage device 40.
  • the storage device 40 includes the cache device 411 and the storage device 12 (ie, the storage device 12 in FIG. 1). ).
  • the cache device may be disposed locally on the host, and the cache device may be a cache device (eg, a non-volatile memory chip NVDIMM, a non-volatile random access memory NVRAM), or a disk device or the like; when the storage device is set locally on the host, the cache device may be set locally on the host, and the cache device may be a cache device.
  • the software definition module can instruct the operating system kernel to access the cache device to access the storage device through the cache device, thereby increasing access speed. For example, if it is necessary to write data to the storage device, the software definition module may instruct the operating system kernel to write write data to the cache device, and subsequently write the write data to the storage device by the cache device, Access speed; if it is required to read data from the storage device, the software definition module may instruct the operating system kernel to read data from the cache device, if the cache device has saved data that needs to be read, The cache device may directly provide the data to be read, and improve the access speed. If the cache device does not store the data to be read, the cache device may obtain the data from the storage device. The data that needs to be read is given to the operating system kernel. Therefore, step S303 of the first embodiment can be replaced by:
  • S303' the software definition module instructs the operating system kernel of the host to access the cache device according to the access address according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, to The storage device is accessed by the cache device.
  • Embodiment 2 the software definition module instructs the operating system kernel of the host to access the cache device according to the access address according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, to The storage device is accessed by the cache device.
  • the embodiment of the present invention provides a method for accessing a storage device, which is used for an SDS-based storage system, where the SDS-based storage system includes a host and a storage device, and an I/O operation delivered by an application in the host
  • the software definition module may access the storage device by using the method described in the embodiment of the present invention, as shown in FIG. 5. As shown, the method includes:
  • S501 The software definition module running in the user space in the host intercepts the application of the host An I/O operation instruction sent by the program, the I/O operation instruction carrying an access address.
  • the software definition module may intercept the I/O operation instruction before the I/O operation instruction reaches the operating system kernel, and the I/O operation is avoided because the software definition module runs in a user space. The instruction falls into the kernel state.
  • the manner in which the software definition module intercepts the I/O operation instruction may be various, and specifically, the following manner may be employed.
  • Method 1 When the application uses the dynamic link library to link the operating system library of the operating system, the dynamic link library preloading method can be used to intercept the I/O operation instructions of the application.
  • the principle is as follows: General application In the runtime environment, interfaces are provided to specify the dynamic link library that is loaded first when the program is running. By default, the application's I/O operations preferentially load the operating system's dynamic link library. Therefore, the dynamic link library issued by the software definition module can be set to be preferentially loaded by using the provided interface, so that when the application performs the I/O operation, the interface provided by the software definition module is loaded, thereby realizing the application sending. 10 interception of operation instructions.
  • the dynamic link library that is preferentially loaded by the program runtime can be specified by the environment variable LD_PreLOAD, so that the load order of the dynamic link library released by the software definition module can be higher than that of the operating system by using LD-PRELOAD.
  • Dynamic link library in a Linux system, the dynamic link library that is preferentially loaded by the program runtime can be specified by the environment variable LD_PreLOAD, so that the load order of the dynamic link library released by the software definition module can be higher than that of the operating system by using LD-PRELOAD.
  • Method 2 When the application uses the static link library to link the operating system library of the operating system, you can use the application link process control method, set the priority resolution symbol, and intercept the I/O operation instruction of the application.
  • the application performs I/O operations, the operating system's symbol ( symbol ) is prioritized. Since the regular compiler provides symbol-first parsing control parameters during application compilation and linking, the symbol-first parsing control parameters can be set so that when the application's I/O operations need to find a symbol, it will take precedence.
  • the symbol of the software-defined module is parsed first, instead of prioritizing the symbol of the operating system, and the interception of the I/O operation instruction of the application is realized.
  • the operating system's standard library is called.
  • Can The standard library of the operating system is replaced with a private standard library published by the software definition module, which is binary level (ABI) compatible with the standard library of the operating system.
  • ABSI binary level
  • I/O operation instruction may be intercepted by the software definition module in other manners, and the embodiment of the present invention is not limited herein.
  • the software definition module determines, according to the access address, a storage service corresponding to the I/O operation instruction.
  • the software definition module queries a pre-configured address service mapping table according to the access address to determine a storage service corresponding to the I/O operation instruction, where the address service mapping table is used to record the storage device.
  • the address service mapping table may be configured in the software definition module by using the operation and maintenance system, so that the software definition module may query the pre-configured address service mapping table according to the access address. Determining a storage service corresponding to the I/O operation instruction.
  • the address of the element may also be the address of a part of the storage unit in the storage device.
  • the address of the storage device may be in the form of a logical address or may be presented in other forms, which is not limited herein.
  • S503 When the storage service corresponding to the I/O operation instruction includes an advanced function service, and the I/O operation instruction is a read operation instruction, the software definition module instructs the operating system kernel to optionally
  • the storage device includes a cache device and a storage device, and S503 may be further replaced with S503': the software definition module instructs the operating system kernel to read read access data from the cache device according to the access address.
  • the cache device If the read access data is saved in the cache device, the cache device returns its own cached read access data to the operating system kernel, which improves the access speed; If the read access data corresponding to the access address is not stored in the device, the cache device reads the read access data from the storage device according to the access address, and returns the read access data to the operating system kernel.
  • S504 The software definition module receives the read access data returned by the operating system kernel.
  • S505 The software definition module performs an advanced function operation on the read access data according to an advanced function service included in the storage service corresponding to the I/O operation instruction.
  • S506 The software definition module sends the read access data after performing the advanced function operation to the application.
  • the software definition module in the host can include an advanced function service in the storage service corresponding to the I/O operation instruction delivered by the application in the host, and the I/O operation instruction is read.
  • the application accesses the storage device when the instruction is manipulated.
  • the software definition module instructs the operating system kernel of the host to read the access data from the storage device according to the access address, there is a kernel trap, and the software definition module receives the read returned by the operating system kernel.
  • there is a kernel trap that reduces the number of kernel traps and kernel traps when the application accesses the storage device, thereby increasing access speed and improving system reliability.
  • the storage device may further include a cache device and a storage device, so that the software definition module may instruct the operating system kernel of the host to read read access data from the cache device according to the access address, further improve The speed of access.
  • the embodiment of the present invention provides a method for accessing a storage device, which is used for an SDS-based storage system, where the SDS-based storage system includes a host and a storage device, and an I/O operation delivered by an application in the host
  • the software definition module may access the storage device by using the method described in the embodiment of the present invention.
  • S601 The software definition module running in the user space in the host intercepts the application of the host An I/O operation instruction sent by the program, the I/O operation instruction carrying an access address.
  • the software definition module determines, according to the access address, a storage service corresponding to the I/O operation instruction.
  • the software definition module encrypts data according to an advanced function service included in the storage service corresponding to the I/O operation instruction, the software definition module performs a data encryption operation on the write data.
  • S604 The software definition module instructs the operating system kernel to write the write data after performing the advanced function operation to the storage device according to the access address.
  • S604 may also be replaced with S604': the software definition module instructs the operating system kernel to operate the access address and the performing advanced function The write data is written into the cache device such that the cache device writes the write data after performing the advanced function operation to the storage device according to the access address.
  • the software definition module instructs the operating system kernel to write the write data after performing the advanced function operation to the cache device, which improves the access speed.
  • S605 The software definition module receives a write data result returned by the operating system kernel.
  • S606 The software definition module sends the write data result to the application.
  • the software definition module in the host can include an advanced function service in the storage service corresponding to the I/O operation instruction delivered by the application in the host, and the I/O operation instruction is write The application accesses the storage device when the instruction is manipulated. And only in the When the software definition module instructs the operating system kernel of the host to write the write data after performing the advanced function operation to the storage device, there is a kernel trap, and the software definition module receives the write data returned by the operating system kernel. As a result, there is a kernel trap that reduces the number of kernel traps and kernel traps when the application accesses the storage device, thereby increasing access speed and improving system reliability.
  • the storage device may further include a cache device and a storage device, so that the software definition module may instruct the operating system kernel to write the write data after performing the advanced function operation into the cache device, so that The cache device writes the write data after performing the advanced function operation to the storage device, further improving the access speed.
  • the software definition module may instruct the operating system kernel to write the write data after performing the advanced function operation into the cache device, so that The cache device writes the write data after performing the advanced function operation to the storage device, further improving the access speed.
  • the embodiment of the present invention provides a method for accessing a storage device, which is used for an SDS-based storage system, where the SDS-based storage system includes a host and a storage device, and an I/O operation delivered by an application in the host
  • the software definition module may access the storage device by using the method described in the embodiment of the present invention.
  • S701 The software definition module running in the user space in the host intercepts an I/O operation instruction sent by an application of the host, where the I/O operation instruction carries an access address.
  • the software definition module determines, according to the access address, a storage service corresponding to the I/O operation instruction.
  • the software definition module indicates the operation of the host if the storage
  • the device includes a cache device and a storage device, and the S703 can also be replaced with
  • S703' the software definition module instructs the operating system kernel to follow the access address The read access data is read in the cache device.
  • the cache device If the read access data is saved in the cache device, the cache device returns its cached read access data to the operating system kernel, which improves the access speed; if the cache device does not save the access The read access data corresponding to the address, the cache device reads the read access data from the storage device according to the access address, and returns the read access data to the operating system kernel.
  • S704 The software definition module receives the read access data returned by the operating system kernel.
  • S705 The software definition module sends the read access data to the application.
  • the software definition module in the host is capable of not including the advanced function service in the storage service corresponding to the I/O operation instruction delivered by the application in the host, and the I/O operation instruction is When the operation instruction is read, the application accesses the storage device. And only when the software definition module instructs the operating system kernel of the host to read the read access data from the storage device according to the access address, there is a kernel trapping, and the software definition module receives the return from the operating system kernel. When reading access data, there is a kernel trap that reduces the number of kernel traps and kernel traps when the application accesses the storage device, thereby improving access speed and improving system reliability.
  • the storage device may further include a cache device and a storage device, so that the software definition module may instruct the operating system kernel of the host to read the read access data from the cache device according to the access address, and further Increased access speed.
  • the embodiment of the present invention provides a method for accessing a storage device, which is used for an SDS-based storage system, where the SDS-based storage system includes a host and a storage device, and an I/O operation delivered by an application in the host
  • the software definition module may access the storage device by using the method described in the embodiment of the present invention.
  • S801 The software definition module running in the user space in the host intercepts the application of the host An I/O operation instruction sent by the program, the I/O operation instruction carrying an access address.
  • the software definition module determines, according to the access address, a storage service corresponding to the I/O operation instruction.
  • S804 may also be replaced with S804': the software definition module instructs the operating system kernel to write the access address and the write data to The cache device, wherein the cache device writes the write data into the storage device according to the access address.
  • the software definition module instructs the operating system kernel to write the write data into the cache device to increase access speed.
  • the software definition module receives a write data result returned by the operating system kernel.
  • S805 The software definition module sends the write data result to the application.
  • the software definition module in the host is capable of not including the advanced function service in the storage service corresponding to the I/O operation instruction delivered by the application in the host, and the I/O operation instruction is When the operation instruction is read, access by the application to the storage device is implemented. And only if the software definition module instructs the operating system kernel of the host to write the write data to the storage device according to the access address, there is a kernel trapping, and the software definition module receives the operating system kernel to return When writing data results, there is a kernel trap that reduces the number of kernel traps and kernel traps when the application accesses the storage device, thereby improving access speed and improving system reliability.
  • the storage device may further include a cache device and a storage device, so that the software definition module may instruct the operating system kernel of the host to write the access address and the write data to the cache device, so that The cache device will be based on the access address The write data is written to the storage device, which further improves the access speed.
  • the software definition module may instruct the operating system kernel of the host to write the access address and the write data to the cache device, so that The cache device will be based on the access address The write data is written to the storage device, which further improves the access speed.
  • An embodiment of the present invention provides a host for accessing a storage device, and is configured to store a storage system based on a software definition.
  • the host 90 includes a software definition module 901, an application program 902, and an operating system kernel 903.
  • the software definition module 901 runs in a user space of the host 90;
  • the software definition module 901 is configured to intercept an input/output I/O operation instruction sent by the application 902, where the I/O operation instruction carries an access address, and the I/O operation instruction is determined according to the access address.
  • Corresponding storage service instructing the operating system kernel 903 to access the storage device in the SDS-based storage system according to the access address according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction .
  • the storage service corresponding to the I/O operation instruction may include a data read/write service, and may also include an advanced function service (the advanced function service refers to a service other than a data read/write service), such as a data snapshot, an intelligent Layering, deduplication or data compression.
  • the software definition module 901 may intercept the I/O operation instruction before the I/O operation instruction reaches the operating system kernel 903, and the I/O operation instruction is avoided because the software definition module 901 operates in a user space.
  • the O operation instruction falls into the kernel state.
  • the operating system kernel 903 is configured to access the storage device according to the indication of the software definition module 901 and the access address, and return an access result to the software definition module 901; the software definition module 901 is configured to receive The access result returned by the operating system kernel 903 sends the access result to the application 902.
  • the above application 902 accesses the storage device only once for kernel trapping and one kernel trapping, which reduces the kernel trapping and kernel trapping time when the application 902 accesses the storage device, thereby improving access speed and improving system reliability.
  • the manner in which the software definition module 901 intercepts the I/O operation instruction may be multiple; for example, the software definition module 901 may use the static link library when the application 902 uses the party.
  • the application 902 links the process control to intercept the I/O operation instruction sent by the application 902; the principle is as follows: In the general application 902 operating environment, the interface is provided. A dynamic link library that is loaded first when the specified program runs. By default, the application 902's I/O operations preferentially load the operating system's dynamic link library.
  • the dynamic link library issued by the software definition module 901 can be set to be preferentially loaded by using the provided interface, so that when the application 902 performs an I/O operation, the dynamic link provided by the software definition module 901 is loaded.
  • the library thereby implementing the interception of the 10 operation instructions sent by the application 902; for example, the software definition module 901 can use the dynamic link library to preload when the application 902 links the operating system by using a dynamic link library.
  • the I/O operation instruction sent by the application 902 is intercepted; the principle is as follows: By default, when the application 902 performs an I/O operation, the operating system symbol (symbol) is preferentially parsed.
  • the symbol-first parsing control parameters can be set so that when the I/O operation of the application 902 needs to find a symbol,
  • the symbol of the software definition module 901 will be parsed first, instead of preferentially parsing the symbol of the operating system, and the interception of the I/O operation instruction of the application 902 is realized; for example, by default, the application 902 performs I/O operations.
  • the standard library of the operating system is called.
  • the standard library of the operating system can be replaced with a private standard library issued by the software definition module 901, which is binary level (ABI) compatible with the standard library of the operating system.
  • ABSI binary level
  • the software definition module 901 may specifically query the pre-configured address service mapping table according to the access address to determine a storage service corresponding to the I/O operation instruction, where the address service mapping table is used to record the storage device.
  • the correspondence between the address and the storage service may be in the form of a logical address, or may be presented in other forms, which is not limited herein.
  • the software definition module 901 may include, when the storage service corresponding to the I/O operation instruction includes an advanced function service, and the I/O operation instruction is a read operation instruction, indicating that the operating system kernel 903 can be Reading the read access data from the storage device according to the indication of the software definition module 901 and the access address, and returning the read access data to the software definition module 901; the software definition module 901 may Receiving the read access data returned by the operating system kernel 903, performing an advanced function operation on the read access data according to an advanced function service included in the storage service corresponding to the I/O operation instruction, and performing the advanced function The read access data after the function operation is sent to the application 902;
  • the software definition module 901 may include an advanced function service in a storage service corresponding to the I/O operation instruction, and when the I/O operation instruction is a write operation instruction, according to the storage corresponding to the I/O operation instruction An advanced function service included in the service, performing an advanced function operation on the write data carried by the I/O operation instruction, instructing the operating system kernel 903 to perform the write data after the performing the advanced function operation according to the access address Writing to the storage device; the operating system kernel 903 can write the write data to the storage device according to the indication of the software definition module 901 and the access address, and receive the storage device Returning the write data result, returning the write data result to the software definition module 901; the software definition module 901 may receive the write data result returned by the operating system kernel 903, and send the write data result to the Application 902;
  • the software definition module 901 may indicate the operating system kernel of the host when the storage service corresponding to the I/O operation instruction does not include the advanced function service, and the I/O operation instruction is a read operation instruction.
  • the reading access data is read from the storage device according to the indication of the software definition module 901 and the access address, and the read access data is returned to the software definition module 901; the software definition module The 901 may receive the read access data returned by the operating system kernel 903, and send the read access data to the application 902;
  • the software definition module 901 may indicate that the operating system kernel 903 is in accordance with the operation function when the storage service corresponding to the I/O operation instruction does not include the advanced function service, and the I/O operation instruction is a write operation instruction.
  • the access address writes the write data to the storage device; then the operating system kernel 903 can write the write data to the storage device according to the indication of the software definition module 901 and the access address Receiving the result of the write data returned by the storage device, and returning the result of the write data to the software definition module 901; the software definition module 901 may receive the result of the write data returned by the operating system kernel 903, The result of the write data is sent to the application 902 to complete the access to the storage device.
  • the storage device may include a cache device and a storage device; then the software definition module 901 may be configured to use a corresponding storage service and the I/O according to the I/O operation instruction.
  • An operation instruction indicating that the operating system kernel 903 of the host accesses the cache device according to the access address; the operating system kernel 903 may be configured to access the according to the indication of the software definition module 901 and the access address.
  • a cache device to access the storage device through the cache device.
  • the software definition module 901 may indicate that the operating system kernel 903 is in accordance with the high-performance function service when the I/O operation instruction corresponding to the I/O operation instruction is a read operation instruction. Reading the access data from the cache device; the operating system kernel 903 can read the read access data from the cache device according to the indication of the software definition module 901 and the access address, And returning the read access data to the software definition module 901; the software definition module 901 may receive the read access data returned by the operating system kernel 903, and according to the storage service corresponding to the I/O operation instruction The advanced function service included in the module performs an advanced function operation on the read access data, and sends the read access data after the performing the advanced function operation to the application 902.
  • the software definition module 901 may include an advanced function service in a storage service corresponding to the I/O operation instruction, and when the I/O operation instruction is a write operation instruction, corresponding to the I/O operation instruction.
  • Advanced function services included in the storage service carrying the I/O operation instructions
  • Writing data performs an advanced function operation, instructing the operating system kernel 903 to write the access address and the write data after performing the advanced function operation into the cache device;
  • the operating system kernel 903 can Writing the access address and the write data after performing the advanced function operation to the cache device according to an instruction of the software definition module 901, so that the cache device according to the access address Writing the write data after performing the advanced function operation to the storage device, receiving the write data result returned by the cache device, and returning the write data result to the software definition module 901;
  • the software definition The module 901 can receive the write data result returned by the operating system kernel 903, and send the write data result to the application 902.
  • the software definition module 901 may indicate an operating system kernel of the host when the storage service corresponding to the I/O operation instruction does not include an advanced function service, and the I/O operation instruction is a read operation instruction.
  • the read access data is read from the cache device according to the access address; then the operating system kernel 903 can read and read from the cache device according to the indication of the software definition module 901 and the access address. Accessing the data, and returning the read access data to the software definition module 901; the software definition module 901 can receive the read access data returned by the operating system kernel 903, and send the read access data to the The application 902 is described.
  • the software definition module 901 may indicate that the operating system kernel 903 will be used when the storage service corresponding to the I/O operation instruction does not include the advanced function service, and the I/O operation instruction is a write operation instruction.
  • the access address and the write data carried by the I/O operation instruction are written into the cache device; then the operating system kernel 903 may, according to the instruction of the software definition module 901, the access address and the location Writing data to the cache device, so that the cache device writes the write data to the storage device according to the access address, and receives a write data result returned by the cache device,
  • the result of the data is returned to the software definition module 901; the software definition module 901 can receive the result of the write data returned by the operating system kernel 903, and send the result of the write data to the application 902.
  • the software definition module 901 running in the user space in the host can An I/O operation instruction sent by the application 902 of the host is intercepted, and the I/O operation instruction carries an access address, so that the I/O operation instruction is prevented from falling into a kernel state, so that the software definition module 901 can Determining, according to the access address, a storage service corresponding to the I/O operation instruction, instructing the operating system kernel 903 of the host according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction
  • the access address accesses the storage device, receives an access result returned by the operating system kernel 903, and sends the access result to the application 902, thereby implementing access of the application 902 to the storage device.
  • the software definition module 901 runs in the user space, in the above process, only when the software definition module 901 indicates that the operating system kernel 903 of the host accesses the storage device, there is a kernel trap, and the software definition module 901 receives the operating system kernel 903. There is a kernel trap in the returned access result, which reduces the kernel trap and kernel trap times of the application 902 when accessing the storage device, thereby improving access speed and improving system reliability.
  • the storage device may further include a cache device and a storage device, so that the software definition module 901 may indicate the access address of the operating system kernel 903 of the host according to the storage service corresponding to the I/O operation instruction. Accessing the cache device to access the storage device through the cache device further improves access speed.
  • FIG. 10 is a host for accessing a storage device according to an embodiment of the present invention. The host may include:
  • a processor 1001 a memory 1002, a system bus 1004, and a communication interface 1005.
  • the memory 1002 and the communication interface 1005 are connected through the system bus 1004 and complete communication with each other.
  • Processor 1001 may be a single core or multi-core central processing unit, or a particular integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
  • the memory 1002 can be a high speed RAM memory or a nonvolatile memory.
  • non-volatile memory at least one disk storage device.
  • the memory 1002 is used by the computer to execute the instructions 1003.
  • the program code may be included in the computer execution instruction 1003.
  • the processor 1001 runs the computer execution instruction 1003, and may execute the method flow of the method for accessing the storage device according to any one of Embodiments 1 to 5.
  • the embodiment of the present invention further provides a computer readable medium, comprising: computer execution instructions, when the processor of the computer executes the computer execution instruction, the computer performs the access storage according to any one of Embodiments 1 to 5. Method flow of the method of the device.
  • aspects of the invention, or possible implementations of various aspects may be in the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, etc.), or a combination of software and hardware aspects, They are collectively referred to herein as "circuits," “modules,” or “systems.”
  • aspects of the invention, or possible implementations of various aspects may take the form of a computer program product, which is a computer readable program code stored on a computer readable medium.
  • the computer readable medium can be a computer readable signal medium or a computer readable storage medium.
  • the computer readable storage medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing, such as random access memory (RAM), read only memory (ROM), Erase programmable read-only memory (EPROM or flash memory), optical fiber, portable read-only memory (CD-ROM:).
  • the processor in the computer reads the computer readable program code stored in the computer readable medium, such that the processor can perform the functional actions specified in each step or combination of steps in the flowchart; A device that functions as specified in each block, or combination of blocks.
  • the computer readable program code can execute entirely on the user's computer, partly on the user's computer, as a separate software package, partly on the user's computer and partly on the remote computer, or entirely on the remote computer or computer. . It should also be noted that in some In the implementations, the functions noted in the various steps of the flowchart or in the blocks of the block diagrams may not occur in the order noted in the drawings. For example, two steps, or two blocks shown in succession may be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

A method for accessing a storage device, and a host. A software defined module operating in a user space in a host can intercept an I/O operation instruction sent by an application program of the host, the I/O operation instruction carrying an access address (S301), which prevents the I/O operation instruction from trapping in a kernel state, so that the software defined module can determine a storage service corresponding to the I/O operation instruction according to the access address (S302), instruct a kernel of an operating system of the host to access the storage device according to the storage service corresponding to the I/O operation instruction, the I/O operation instruction and the access address (S303); receive an access result returned by the kernel of the operating system (S304), and send the access result to the application program (S305), and therefore, it is achieved that the application program accesses the storage device. In the process, there is only one trap-in of the kernel and one trap-out of the kernel, which reduces the number of times of the trap-in and the trap-out of the kernel of the system when the application program accesses the storage device, and improves the access speed.

Description

一种访问存储设备的方法和主机 技术领域  Method and host for accessing storage device
本发明实施例涉及计算机技术,特别涉及一种访问存储设备的方法和主 机。 背景技术  The embodiments of the present invention relate to computer technologies, and in particular, to a method and a host for accessing a storage device. Background technique
软件定义存储(Software-defined Storage, SDS )能够将所有存储相关的 控制工作都放置在相对于物理存储硬件的外部软件中, 该软件不作为存储设 备中的固件, 而通常在一个服务器上, 或者作为操作系统(OS )或超级管理 程序 (即 Hypervisor ) 的一部分, 用户不必从特定厂商釆购存储控制器硬件 如硬盘、 闪存等存储介质。 在基于 SDS的存储系统中, 通常通过软件定义层(即执行所有存储相关 的控制工作的软件), 实现存储的虚拟化, 对上层应用提供虚拟资源池, 以 使应用程序能够便利、 高效的访问存储设备。 通常情况下, 为了兼容现有的 应用,基于 SDS的存储系统大部分都在操作系统中提供块 /文件驱动。 在应用 访问存储设备过程中, 应用将下发输入 /输出 (又称 I/O, 或 10 )操作指令到 操作系统, 由操作系统的块 /文件驱动对该 I/O操作指令进行转换处理后发送 给软件定义层, 由软件定义层对存储设备进行访问, 并将访问结果返回给应 用, 完成对存储设备的访问。  Software-defined storage (SDS) can place all storage-related control work in external software relative to physical storage hardware. The software is not used as firmware in the storage device, but usually on a server, or As part of the operating system (OS) or hypervisor (ie Hypervisor), users do not have to purchase storage controller hardware such as hard drives, flash memory, etc. from specific vendors. In an SDS-based storage system, storage virtualization is usually implemented through a software-defined layer (that is, software that performs all storage-related control operations), and a virtual resource pool is provided for upper-layer applications, so that applications can be conveniently and efficiently accessed. Storage device. Typically, SDS-based storage systems provide block/file drivers in the operating system for compatibility with existing applications. During the application accessing the storage device, the application will issue an input/output (also called I/O, or 10) operation instruction to the operating system, and the I/O operation instruction is converted by the operating system block/file driver. Sended to the software definition layer, the software definition layer accesses the storage device, and returns the access result to the application to complete the access to the storage device.
然而,在上述访问存储设备的过程中,存在两次内核态和用户态的切换, 即存在两次内核陷入和两次内核陷出。 然而, 内核陷入和内核陷出不仅会降 低 I/O访问速度, 影响访问效率, 还会降低系统的可靠性。 发明内容  However, in the above process of accessing the storage device, there are two kernel state and user mode switching, that is, there are two kernel traps and two kernel traps. However, kernel trapping and kernel trapping not only reduces I/O access speed, affects access efficiency, but also reduces system reliability. Summary of the invention
本发明实施例提供了一种访问存储设备的方法和主机, 能够减少应用程 序访问存储设备时系统的内核陷入和内核陷出次数。  The embodiments of the present invention provide a method and a host for accessing a storage device, which can reduce the kernel trapping and kernel trapping times of the system when the application accesses the storage device.
一方面, 本发明实施例提供了一种访问存储设备的方法, 用于基于软件 定义存储 SDS的存储系统, 所述基于 SDS的存储系统包括主机和所述存储 设备, 所述方法包括: In one aspect, an embodiment of the present invention provides a method for accessing a storage device, where the SDS-based storage system includes a host and the storage. Equipment, the method includes:
所述主机中运行于用户空间的软件定义模块截获所述主机的应用程序 发送的输入 /输出 I/O操作指令, 所述 I/O操作指令携带访问地址;  a software definition module running in the user space of the host intercepts an input/output I/O operation instruction sent by an application of the host, where the I/O operation instruction carries an access address;
所述软件定义模块根据所述访问地址, 确定所述 I/O操作指令对应的存 储服务;  Determining, by the software definition module, a storage service corresponding to the I/O operation instruction according to the access address;
所述软件定义模块根据所述 I/O操作指令对应的存储服务和所述 I/O操 作指令,指示所述主机的操作系统内核根据所述访问地址访问所述存储设备; 所述软件定义模块接收所述操作系统内核返回的访问结果;  The software definition module instructs the operating system kernel of the host to access the storage device according to the access address according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction; the software definition module Receiving an access result returned by the operating system kernel;
所述软件定义模块将所述访问结果发送给所述应用程序。  The software definition module sends the access result to the application.
结合第一方面, 在第一种可能的实现方式中, 所述软件定义模块根据所 述访问地址, 确定所述 I/O操作指令对应的存储服务包括: 所述软件定义模 块根据所述访问地址, 查询预先配置的地址服务映射表, 以确定所述 I/O操 作指令对应的存储服务, 所述地址服务映射表用于记录所述存储设备的地址 与存储服务的对应关系。  With reference to the first aspect, in a first possible implementation manner, the software definition module determines, according to the access address, that the storage service corresponding to the I/O operation instruction comprises: the software definition module according to the access address Querying a pre-configured address service mapping table to determine a storage service corresponding to the I/O operation instruction, where the address service mapping table is used to record a correspondence between an address of the storage device and a storage service.
结合第一方面或第一方面的第一种可能的实现方式,在第二种可能的实 现方式中, 所述主机中运行于用户空间的软件定义模块截获所述主机的应用 程序发送的输入 /输出 I/O操作指令包括: 当应用程序使用动态链接库的方式 链接操作系统时, 所述软件定义模块釆用动态链接库预加载的方式, 截获所 述应用程序发送的所述 I/O操作指令。  With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner, the software definition module running in the user space in the host intercepts an input sent by the application of the host/ The outputting the I/O operation instruction includes: when the application links the operating system by using a dynamic link library, the software definition module intercepts the I/O operation sent by the application by using a dynamic link library preloading manner instruction.
结合第一方面或第一方面的第一种可能的实现方式,在第三种可能的实 现方式中, 所述主机中运行于用户空间的软件定义模块截获所述主机的应用 程序发送的输入 /输出 I/O操作指令包括: 当应用程序使用静态链接库的方式 链接操作系统时, 所述软件定义模块釆用应用程序链接过程控制的方式, 截 获所述应用程序发送的所述 I/O操作指令。  With reference to the first aspect or the first possible implementation manner of the first aspect, in a third possible implementation, the software definition module running in the user space of the host intercepts an input sent by the application of the host/ The outputting the I/O operation instruction includes: when the application links the operating system by using a static link library, the software definition module intercepts the I/O operation sent by the application by means of an application link process control instruction.
结合第一方面或第一方面的第一至第三任一可能的实现方式,在第四种 可能的实现方式中, 所述存储设备包括緩存装置和存储装置; 则所述软件定 义模块根据所述 I/O操作指令对应的存储服务和所述 I/O操作指令, 指示所 定义模块根据所述 I/O操作指令对应的存储服务和所述 I/O操作指令, 指示 所述主机的操作系统内核根据所述访问地址访问所述緩存装置, 以通过所述 緩存装置访问所述存储装置。 With reference to the first aspect, or any one of the first to the third possible implementation manners of the first aspect, in a fourth possible implementation, the storage device includes a cache device and a storage device; And indicating, according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, the definition module, according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, indicating the location The operating system kernel of the host accesses the cache device according to the access address to access the storage device through the cache device.
结合第一方面的第四种可能的实现方式, 在第五种可能的实现方式中, 所述软件定义模块根据所述 I/O操作指令对应的存储服务和所述 I/O操作指 令, 指示所述主机的操作系统内核根据所述访问地址访问所述緩存装置, 以 通过所述緩存装置访问所述存储装置包括:  With reference to the fourth possible implementation of the first aspect, in a fifth possible implementation, the software definition module is configured according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction Accessing the cache device by the operating system kernel of the host according to the access address to access the storage device by using the cache device includes:
当所述 I/O操作指令对应的存储服务中包括高级功能服务, 且所述 I/O 操作指令为读操作指令时, 所述软件定义模块指示所述操作系统内核根据所 述访问地址从所述緩存装置中读取读访问数据; 则所述软件定义模块接收所 述操作系统内核返回的访问结果; 所述软件定义模块将所述访问结果发送给 所述应用程序包括: 所述软件定义模块接收所述操作系统内核返回的所述读 访问数据; 所述软件定义模块根据所述 I/O操作指令对应的存储服务中包括 的高级功能服务, 对所述读访问数据执行高级功能操作; 所述软件定义模块 将所述执行高级功能操作之后的所述读访问数据发送给所述应用程序。  When the storage service corresponding to the I/O operation instruction includes an advanced function service, and the I/O operation instruction is a read operation instruction, the software definition module instructs the operating system kernel to follow the access address according to the Reading the read access data in the cache device; the software definition module receives the access result returned by the operating system kernel; and the software definition module sending the access result to the application program includes: the software definition module Receiving the read access data returned by the operating system kernel; the software definition module performing an advanced function operation on the read access data according to an advanced function service included in the storage service corresponding to the I/O operation instruction; The software definition module sends the read access data after performing the advanced function operation to the application.
结合第一方面的第四种可能的实现方式, 在第六种可能的实现方式中, 所述软件定义模块根据所述 I/O操作指令对应的存储服务和所述 I/O操作指 令, 指示所述主机的操作系统内核根据所述访问地址, 访问所述緩存装置, 以通过所述緩存装置访问所述存储装置包括:  With reference to the fourth possible implementation of the first aspect, in a sixth possible implementation, the software definition module is configured according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction Accessing the cache device by the operating system kernel of the host according to the access address to access the storage device by using the cache device includes:
当所述 I/O操作指令对应的存储服务中包括高级功能服务, 且所述 I/O 操作指令为写操作指令时, 所述 I/O操作指令还携带写数据; 所述软件定义 模块根据所述 I/O操作指令对应的存储服务中包括的高级功能服务对所述写 数据执行高级功能操作; 所述软件定义模块指示所述操作系统内核将所述访 问地址和所述执行高级功能操作之后的所述写数据写入到所述緩存装置中, 以使得所述緩存装置根据所述访问地址将所述执行高级功能操作之后的所 述写数据写入到所述存储装置中; 则所述软件定义模块接收所述操作系统内 核返回的访问结果; 所述软件定义模块将所述访问结果发送给所述应用程序 包括: 所述软件定义模块接收所述操作系统内核返回的写数据结果; 所述软 件定义模块将所述写数据结果发送给所述应用程序。 When the I/O operation instruction corresponding to the I/O operation instruction includes an advanced function service, and the I/O operation instruction is a write operation instruction, the I/O operation instruction further carries write data; the software definition module is configured according to The advanced function service included in the storage service corresponding to the I/O operation instruction performs an advanced function operation on the write data; the software definition module instructs the operating system kernel to operate the access address and the execution advanced function The subsequent write data is written into the cache device, So that the cache device writes the write data after performing the advanced function operation to the storage device according to the access address; then the software definition module receives an access result returned by the operating system kernel; The software definition module sending the access result to the application program includes: the software definition module receiving a write data result returned by the operating system kernel; the software definition module transmitting the write data result to the application.
结合第一方面的第四种可能的实现方式, 在第七种可能的实现方式中, 所述软件定义模块根据所述 I/O操作指令对应的存储服务和所述 I/O操作指 令, 指示所述主机的操作系统内核根据所述访问地址, 访问所述緩存装置, 以通过所述緩存装置访问所述存储装置包括:  With reference to the fourth possible implementation of the first aspect, in a seventh possible implementation, the software definition module is configured according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction Accessing the cache device by the operating system kernel of the host according to the access address to access the storage device by using the cache device includes:
当所述 I/O操作指令对应的存储服务中不包括高级功能服务,且所述 I/O 操作指令为读操作指令时, 所述软件定义模块指示所述主机的操作系统内核 根据所述访问地址从所述緩存装置中读取读访问数据; 则所述软件定义模块 接收所述操作系统内核返回的访问结果; 所述软件定义模块将所述访问结果 发送给所述应用程序包括: 所述软件定义模块接收所述操作系统内核返回的 所述读访问数据; 所述软件定义模块将所述读访问数据发送给所述应用程序。  When the I/O operation instruction corresponding to the I/O operation instruction does not include the advanced function service, and the I/O operation instruction is a read operation instruction, the software definition module instructs the host operating system kernel to perform the access according to the The address reads the read access data from the cache device; the software definition module receives the access result returned by the operating system kernel; and the software definition module sends the access result to the application program: The software definition module receives the read access data returned by the operating system kernel; the software definition module sends the read access data to the application.
结合第一方面的第四种可能的实现方式, 在第八种可能的实现方式中, 所述软件定义模块根据所述 I/O操作指令对应的存储服务和所述 I/O操作指 令, 指示所述主机的操作系统内核根据所述访问地址, 访问所述緩存装置, 以通过所述緩存装置访问所述存储装置包括:  With reference to the fourth possible implementation of the first aspect, in an eighth possible implementation, the software definition module is configured according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction Accessing the cache device by the operating system kernel of the host according to the access address to access the storage device by using the cache device includes:
当所述 I/O操作指令对应的存储服务中不包括高级功能服务,且所述 I/O 操作指令为写操作指令时, 所述 I/O操作指令还携带写数据; 所述软件定义 模块指示所述操作系统内核将所述访问地址和所述写数据写入到所述緩存 装置中, 以使得所述緩存装置根据所述访问地址将所述写数据写入到所述存 储装置中; 则所述软件定义模块接收所述操作系统内核返回的访问结果; 所 述软件定义模块将所述访问结果发送给所述应用程序包括: 所述软件定义模 块接收所述操作系统内核返回的写数据结果; 所述软件定义模块将所述写数 据结果发送给所述应用程序。 When the I/O operation instruction corresponding to the I/O operation instruction does not include the advanced function service, and the I/O operation instruction is a write operation instruction, the I/O operation instruction further carries write data; the software definition module Instructing the operating system kernel to write the access address and the write data into the cache device, such that the cache device writes the write data into the storage device according to the access address; The software definition module receives the access result returned by the operating system kernel; the software definition module sends the access result to the application program: the software definition module receives the write data returned by the operating system kernel Resulting; the software definition module will write the number The result is sent to the application.
第二方面, 一种访问存储设备的主机, 用于基于软件定义存储 SDS 的 存储系统, 所述主机包括应用程序、 操作系统内核和软件定义模块; 其中, 所述软件定义模块运行于所述主机的用户空间;  a second aspect, a host for accessing a storage device, configured to store a storage system based on a software definition, the host includes an application, an operating system kernel, and a software definition module; wherein the software definition module runs on the host User space;
所述软件定义模块用于截获所述应用程序发送的输入 /输出 I/O操作指 令, 所述 I/O操作指令携带访问地址, 根据所述访问地址, 确定所述 I/O操 作指令对应的存储服务, 根据所述 I/O操作指令对应的存储服务和所述 I/O 操作指令, 指示所述操作系统内核根据所述访问地址访问所述基于 SDS 的 存储系统中的存储设备;  The software definition module is configured to intercept an input/output I/O operation instruction sent by the application, where the I/O operation instruction carries an access address, and according to the access address, determines an I/O operation instruction corresponding to the The storage service, according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, instructing the operating system kernel to access the storage device in the SDS-based storage system according to the access address;
所述操作系统内核用于根据所述软件定义模块的指示和所述访问地址 访问所述存储设备, 并将访问结果返回给所述软件定义模块;  The operating system kernel is configured to access the storage device according to the indication of the software definition module and the access address, and return an access result to the software definition module;
所述软件定义模块用于接收所述操作系统内核返回的所述访问结果,将 所述访问结果发送给所述应用程序。  The software definition module is configured to receive the access result returned by the operating system kernel, and send the access result to the application.
结合第二方面, 在第一种可能的实现方式中, 所述软件定义模块具体用 于根据所述访问地址, 查询预先配置的地址服务映射表, 以确定所述 I/O操 作指令对应的存储服务, 所述地址服务映射表用于记录所述存储设备的地址 与存储服务的对应关系。  With reference to the second aspect, in a first possible implementation, the software definition module is specifically configured to query, according to the access address, a pre-configured address service mapping table to determine a storage corresponding to the I/O operation instruction. Service, the address service mapping table is used to record the correspondence between the address of the storage device and the storage service.
结合第二方方面或第二方面的第一种可能的实现方式,在第二种可能的 实现方式中, 所述软件定义模块具体用于当应用程序使用动态链接库的方式 链接操作系统时, 釆用动态链接库预加载的方式, 截获所述应用程序发送的 所述 I/O操作指令。  With reference to the second aspect or the first possible implementation of the second aspect, in a second possible implementation, the software definition module is specifically used when the application links the operating system by using a dynamic link library. The method of preloading the dynamic link library is used to intercept the I/O operation instruction sent by the application.
结合第二方方面或第二方面的第一种可能的实现方式,在第三种可能的 实现方式中, 所述软件定义模块具体用于当应用程序使用静态链接库的方式 链接操作系统时, 釆用应用程序链接过程控制的方式, 截获所述应用程序发 送的所述 I/O操作指令。  With reference to the second aspect or the first possible implementation of the second aspect, in a third possible implementation, the software definition module is specifically used when the application links the operating system by using a static link library. The I/O operation instruction sent by the application is intercepted by means of an application linking process control.
结合第二方方面或第二方面的第一种至第三种任一可能的实现方式,在 第四种可能的实现方式中, 所述存储设备包括緩存装置和存储装置; 则所述 软件定义模块具体用于根据所述 I/O操作指令对应的存储服务和所述 I/O操 作指令,指示所述主机的操作系统内核根据所述访问地址访问所述緩存装置; 所述操作系统内核具体用于根据所述软件定义模块的指示和所述访问地址, 访问所述緩存装置, 以通过所述緩存装置访问所述存储装置。 In combination with the second aspect or any of the first to third possible implementations of the second aspect, In a fourth possible implementation, the storage device includes a cache device and a storage device. The software definition module is specifically configured to: according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, Instructing the operating system kernel of the host to access the cache device according to the access address; the operating system kernel is specifically configured to access the cache device according to the indication of the software definition module and the access address, to pass the The cache device accesses the storage device.
结合第二方面的第四种可能的实现方式, 在第五种可能的实现方式中, 所述软件定义模块具体用于当所述 I/O操作指令对应的存储服务中包括高级 功能服务, 且所述 I/O操作指令为读操作指令时, 指示所述操作系统内核根 据所述访问地址从所述緩存装置中读取读访问数据; 所述操作系统内核具体 用于根据所述软件定义模块的指示和所述访问地址,从所述緩存装置中读取 读访问数据, 并将所述读访问数据返回给所述软件定义模块; 所述软件定义 模块具体用于接收所述操作系统内核返回的所述读访问数据, 根据所述 I/O 操作指令对应的存储服务中包括的高级功能服务,对所述读访问数据执行高 级功能操作,将所述执行高级功能操作之后的所述读访问数据发送给所述应 用程序。  With reference to the fourth possible implementation of the second aspect, in a fifth possible implementation, the software definition module is specifically configured to include an advanced function service in a storage service corresponding to the I/O operation instruction, and When the I/O operation instruction is a read operation instruction, instructing the operating system kernel to read read access data from the cache device according to the access address; the operating system kernel is specifically configured to define a module according to the software And the access address, the read access data is read from the cache device, and the read access data is returned to the software definition module; the software definition module is specifically configured to receive the operating system kernel return The read access data, performing an advanced function operation on the read access data according to the advanced function service included in the storage service corresponding to the I/O operation instruction, and performing the read access after performing the advanced function operation Data is sent to the application.
结合第二方面的第四种可能的实现方式, 在第六种可能的实现方式中, 所述软件定义模块具体用于当所述 I/O操作指令对应的存储服务中包括高级 功能服务, 且所述 I/O操作指令为写操作指令时, 根据所述 I/O操作指令对 应的存储服务中包括的高级功能服务, 对所述 I/O操作指令携带的写数据执 行高级功能操作,指示所述操作系统内核将所述访问地址和所述执行高级功 能操作之后的所述写数据写入到所述緩存装置中; 所述操作系统内核具体用 于根据所述软件定义模块的指示,将所述访问地址和所述执行高级功能操作 之后的所述写数据写入到所述緩存装置中, 以使得所述緩存装置根据所述访 问地址将所述执行高级功能操作之后的所述写数据写入到所述存储装置中, 接收所述緩存装置返回的写数据结果, 将所述写数据结果返回给所述软件定 义模块; 所述软件定义模块具体用于接收所述操作系统内核返回的所述写数 据结果, 将所述写数据结果发送给所述应用程序。 With reference to the fourth possible implementation of the second aspect, in a sixth possible implementation, the software definition module is specifically configured to include an advanced function service in a storage service corresponding to the I/O operation instruction, and When the I/O operation instruction is a write operation instruction, perform an advanced function operation on the write data carried by the I/O operation instruction according to an advanced function service included in the storage service corresponding to the I/O operation instruction, and indicate Writing, by the operating system kernel, the access address and the write data after performing the advanced function operation to the cache device; the operating system kernel is specifically configured to: according to an instruction of the software definition module, The access address and the write data after performing the advanced function operation are written into the cache device, such that the cache device performs the write data after performing the advanced function operation according to the access address. Writing to the storage device, receiving a write data result returned by the cache device, and returning the write data result to the software definition module; The software definition module is specifically configured to receive the number of writes returned by the operating system kernel According to the result, the write data result is sent to the application.
结合第二方面的第四种可能的实现方式, 在第七种可能的实现方式中, 所述软件定义模块具体用于当所述 I/O操作指令对应的存储服务中不包括高 级功能服务, 且所述 I/O操作指令为读操作指令时, 指示所述主机的操作系 统内核根据所述访问地址从所述緩存装置中读取读访问数据; 所述操作系统 内核具体用于根据所述软件定义模块的指示和所述访问地址,从所述緩存装 置中读取读访问数据, 并将所述读访问数据返回给所述软件定义模块; 所述 软件定义模块具体用于接收所述操作系统内核返回的所述读访问数据,将所 述读访问数据发送给所述应用程序。  With reference to the fourth possible implementation of the second aspect, in a seventh possible implementation, the software definition module is specifically configured to: when the storage service corresponding to the I/O operation instruction does not include an advanced function service, When the I/O operation instruction is a read operation instruction, the operating system kernel of the host is instructed to read read access data from the cache device according to the access address; the operating system kernel is specifically configured to be used according to the An instruction of the software definition module and the access address, reading read access data from the cache device, and returning the read access data to the software definition module; the software definition module is specifically configured to receive the operation The read access data returned by the system kernel, and the read access data is sent to the application.
结合第二方面的第四种可能的实现方式, 在第八种可能的实现方式中, 所述软件定义模块具体用于当所述 I/O操作指令对应的存储服务中不包括高 级功能服务, 且所述 I/O操作指令为写操作指令时, 指示所述操作系统内核 将所述访问地址和所述 I/O操作指令携带的写数据写入到所述緩存装置中; 所述操作系统内核具体用于根据所述软件定义模块的指示,将所述访问地址 和所述写数据写入到所述緩存装置中, 以使得所述緩存装置根据所述访问地 址将所述写数据写入到所述存储装置中,接收所述緩存装置返回的写数据结 果, 将所述写数据结果返回给所述软件定义模块; 则所述软件定义模块具体 用于接收所述操作系统内核返回的写数据结果,将所述写数据结果发送给所 述应用程序。  With reference to the fourth possible implementation of the second aspect, in an eighth possible implementation, the software definition module is specifically configured to not include an advanced function service in a storage service corresponding to the I/O operation instruction, And when the I/O operation instruction is a write operation instruction, instructing the operating system kernel to write the access address and the write data carried by the I/O operation instruction into the cache device; The kernel is specifically configured to write the access address and the write data into the cache device according to an indication of the software definition module, so that the cache device writes the write data according to the access address Receiving a write data result returned by the cache device, and returning the write data result to the software definition module; and the software definition module is specifically configured to receive a write returned by the operating system kernel The result of the data is sent to the application.
第三方面, 本发明实施例提供了一种访问存储设备的主机, 所述主机包 括处理器、 存储器、 总线和通信接口;  In a third aspect, an embodiment of the present invention provides a host that accesses a storage device, where the host includes a processor, a memory, a bus, and a communication interface;
所述存储器用于存储计算机执行指令, 所述处理器与所述存储器通过所 述总线连接, 当所述主机运行时, 所述处理器执行所述存储器存储的所述计 算机执行指令, 以使所述主机执行第一方面所述的访问存储设备的方法或者 第一方面任一可能的实现方式所述的访问存储设备的方法。  The memory is configured to store a computer execution instruction, the processor is connected to the memory through the bus, and when the host is running, the processor executes the computer execution instruction stored in the memory, so that The method for accessing a storage device according to the first aspect, or the method for accessing a storage device according to any of the possible implementations of the first aspect.
第四方面, 本发明实施例提供了一种计算机可读介质, 其特征在于, 包 括计算机执行指令, 以供计算机的处理器执行所述计算机执行指令时, 所述 计算机执行第一方面所述的访问存储设备的方法或者第一方面任一可能的 实现方式所述的访问存储设备的方法。 In a fourth aspect, an embodiment of the present invention provides a computer readable medium, characterized in that: The method of accessing a storage device of the first aspect or the access storage device of any of the possible implementations of the first aspect, when the computer executes the instructions for execution by the processor of the computer. Methods.
在本发明实施例中, 所述主机中运行于用户空间的软件定义模块能够截 获所述主机的应用程序发送的 I/O操作指令, 所述 I/O操作指令携带访问地 址, 避免了所述 I/O操作指令陷入到内核态, 从而所述软件定义模块能够根 据所述访问地址, 确定所述 I/O操作指令对应的存储服务, 根据所述 I/O操 作指令对应的存储服务和所述 I/O操作指令, 指示所述主机的操作系统内核 根据所述访问地址访问所述存储设备,接收所述操作系统内核返回的访问结 果, 将所述访问结果发送给所述应用程序, 实现了应用程序对存储设备的访 问。 由于软件定义模块运行于用户空间, 上述过程中, 只有软件定义模块指 示所述主机的操作系统内核访问所述存储设备时存在一次内核陷入,软件定 义模块接收所述操作系统内核返回的访问结果时存在一次内核陷出, 减少了 应用程序访问存储设备时系统的内核陷入和内核陷出次数,从而提升访问速 度, 提高系统可靠性。 附图说明  In the embodiment of the present invention, the software definition module running in the user space of the host can intercept an I/O operation instruction sent by the application of the host, and the I/O operation instruction carries an access address, which avoids the The I/O operation instruction is trapped in a kernel state, so that the software definition module can determine, according to the access address, a storage service corresponding to the I/O operation instruction, according to the storage service and the corresponding operation instruction of the I/O operation instruction. An I/O operation instruction, instructing an operating system kernel of the host to access the storage device according to the access address, receiving an access result returned by the operating system kernel, and transmitting the access result to the application, to implement The application's access to the storage device. Since the software definition module runs in the user space, in the above process, only when the software definition module instructs the operating system kernel of the host to access the storage device, there is a kernel trap, and the software definition module receives the access result returned by the operating system kernel. There is a kernel trap that reduces the number of kernel traps and kernel traps when the application accesses the storage device, which improves access speed and improves system reliability. DRAWINGS
为了更清楚地说明本发明实施例的技术方案, 下面将对现有技术或实施 例中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅 是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳 动的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the prior art or the embodiments will be briefly described below. Obviously, the drawings in the following description are only some implementations of the present invention. For example, other drawings may be obtained from those of ordinary skill in the art in light of the inventive work.
图 1是一种基于 SDS的存储系统的示意图;  1 is a schematic diagram of an SDS-based storage system;
图 2是现有技术中应用程序访问存储设备的示意图;  2 is a schematic diagram of an application accessing a storage device in the prior art;
图 3是本发明实施例提供了一种访问存储设备的方法流程图; 图 4是本发明实施例提供的一种基于 SDS的存储系统的示意图; 图 5是本发明实施例提供了又一种访问存储设备的方法流程图; 图 6是本发明实施例提供了又一种访问存储设备的方法流程图; 图 7是本发明实施例提供了又一种访问存储设备的方法流程图; 图 8是本发明实施例提供了又一种访问存储设备的方法流程图; 图 9是本发明实施例提供了一种访问存储设备的主机的示意图; 图 10是本发明实施例提供了又一种访问存储设备的主机的结构示意图。 具体实施方式 FIG. 3 is a schematic diagram of a method for accessing a storage device according to an embodiment of the present invention; FIG. 4 is a schematic diagram of an SDS-based storage system according to an embodiment of the present invention; FIG. FIG. 6 is a flowchart of still another method for accessing a storage device according to an embodiment of the present invention; FIG. 7 is a flowchart of a method for accessing a storage device according to an embodiment of the present invention; FIG. 8 is a flowchart of another method for accessing a storage device according to an embodiment of the present invention; FIG. 9 is a flowchart of an embodiment of the present invention. FIG. 10 is a schematic structural diagram of another host accessing a storage device according to an embodiment of the present invention. detailed description
本发明实施例提供了一种访问存储设备的方法, 能够减少应用程序访问 存储设备时系统的内核陷入和内核陷出次数, 从而提升访问速度, 提高系统 可靠性。  The embodiment of the invention provides a method for accessing a storage device, which can reduce the kernel trapping and kernel trapping times of the system when the application accesses the storage device, thereby improving the access speed and improving the system reliability.
如图 1所示, 基于 SDS的存储系统通常可包括主机和存储设备, 主机中 配置有软件定义模块(即软件定义层), 所述软件定义模块中集成了存储硬 件中的典型的存储控制器功能, 能够提供卷管理等存储的管理, 并能够与存 储设备配合, 对上层应用提供存储服务。 基于 SDS的存储系统中, 软件定义 模块和存储设备提供的存储服务一般不仅仅包括数据读 /写服务,还包括高级 功能服务(该高级功能服务是指除数据读 /写服务以外的功能服务), 如数据 快照、 智能分层、 去重或数据压缩等。 在实际应用中, 所述存储设备可以设 置在所述主机的远端, 也可以设置在所述主机的本地, 所述存储设备具体可 以是存储区域网络(SAN )、 网络附加存储(NAS )、磁盘簇、或磁盘阵列等, 本发明实施例在此不作限定。  As shown in FIG. 1 , an SDS-based storage system may generally include a host and a storage device, and a software definition module (ie, a software definition layer) is configured in the host, and a typical storage controller in the storage hardware is integrated in the software definition module. The function can provide storage management such as volume management, and can cooperate with the storage device to provide storage services for upper-layer applications. In an SDS-based storage system, the storage services provided by the software definition module and the storage device generally include not only data read/write services but also advanced function services (the advanced function services refer to functional services other than data read/write services). , such as data snapshots, intelligent tiering, deduplication or data compression. In a practical application, the storage device may be located at a remote end of the host, or may be set locally on the host, where the storage device may be a storage area network (SAN) or a network attached storage (NAS). The embodiments of the present invention are not limited herein.
现有技术中,主机中的应用程序访问存储设备时,工作流程一般为: 1 ) 应用程序下发输入 /输出 (又称 I/O, 或 10 )操作指令到操作系统内核; 2 )操 作系统内核将该 I/O操作指令提供给操作系统的块 /文件驱动, 操作系统的块 / 文件驱动将该 I/O操作指令进行转换后发送给软件定义模块; 3 )软件定义模 块根据转换后的 I/O操作指令, 对存储设备进行相应地读 /写访问; 4 )软件定 义模块接收存储设备返回的访问结果, 并发送给应用程序, 完成对存储设备 的访问。 通常情况下, 应用程序和软件定义模块均在用户态实现, 即运行于用户 空间, 而操作系统内核和操作系统的块 /文件驱动均在内核态实现, 即运行于 内核空间, 因此, 步骤 1 ) 中需要从用户态切换到内核态, 存在一次内核陷 入; 步骤 2 ) 中需要由内核态切换到用户态, 存在一次内核陷出; 而步骤 3 ) 中访问存储设备时, 需要从用户态切换到内核态, 存在一次内核陷入; 步骤 4 ) 中接收访问结果时, 需要由内核态切换到用户态, 存在一次内核陷出, 详见图 2。 显然, 内核陷入和内核陷出次数越多, I/O路径就越长, 因而多次 的内核陷入和内核陷出不仅会降低 I/O访问速度, 影响访问效率, 还会降低 系统的可靠性。 In the prior art, when an application in a host accesses a storage device, the workflow is generally as follows: 1) The application sends an input/output (also referred to as I/O, or 10) operation instruction to the operating system kernel; 2) the operating system The kernel provides the I/O operation instruction to the block/file driver of the operating system, and the block/file driver of the operating system converts the I/O operation instruction to the software definition module; 3) the software definition module is converted according to the The I/O operation instruction performs corresponding read/write access to the storage device; 4) the software definition module receives the access result returned by the storage device, and sends the result to the application to complete the access to the storage device. Normally, both the application and the software-defined modules are implemented in user mode, that is, running in user space, and the block/file drivers of the operating system kernel and operating system are implemented in kernel mode, that is, running in kernel space, therefore, step 1 In the case of switching from user mode to kernel mode, there is a kernel trap; in step 2), it needs to switch from kernel mode to user mode, there is a kernel trap; and when accessing the storage device in step 3), it needs to switch from user mode. In the kernel state, there is a kernel trap; in step 4), when receiving the access result, the kernel state needs to be switched to the user state, and there is a kernel trap, as shown in Figure 2. Obviously, the more the kernel is trapped and the kernel is trapped, the longer the I/O path is. Therefore, multiple core traps and kernel traps will not only reduce I/O access speed, but also affect access efficiency and system reliability. .
本发明实施例提出了一种访问存储设备的方法, 能够对应用程序模块进 行功能增强, 从而在应用程序访问存储设备时, 避免不必要的内核陷入和内 核陷出, 即现有技术步骤 1 )和 2 ) 中出现的内核陷入和内核陷出, 只保留必 要的内核陷入和内核陷出, 即访问存储设备时出现的内核陷入和内核陷出, 从而提升访问速度, 提高系统可靠性。  The embodiment of the invention provides a method for accessing a storage device, which can enhance the function of the application module, so as to avoid unnecessary kernel trapping and kernel trapping when the application accesses the storage device, that is, the prior art step 1) And 2) kernel traps and kernel traps, only retaining the necessary kernel traps and kernel traps, that is, kernel traps and kernel traps when accessing storage devices, thereby improving access speed and improving system reliability.
具体实施方式详见以下实施例。  DETAILED DESCRIPTION OF THE INVENTION The following examples are described in detail.
实施例一  Embodiment 1
发明实施例提出了一种访问存储设备的方法, 用于基于 SDS 的存储系 统, 所述基于 SDS的存储系统包括主机和所述存储设备, 如图 3所示, 所 述方法包括:  The embodiment of the present invention provides a method for accessing a storage device, which is used in an SDS-based storage system, where the SDS-based storage system includes a host and the storage device. As shown in FIG. 3, the method includes:
S301 : 所述主机中运行于用户空间的软件定义模块截获所述主机的应用 程序发送的输入 /输出 I/O操作指令, 所述 I/O操作指令携带访问地址。  S301: The software definition module running in the user space in the host intercepts an input/output I/O operation instruction sent by an application of the host, where the I/O operation instruction carries an access address.
运行于用户空间的所述应用程序在访问存储设备时,将向所述主机中的 操作系统发送 I/O操作指令。 所述软件定义模块可以在所述 I/O操作指令到 达所述操作系统内核之前, 截获所述 I/O操作指令, 由于所述软件定义模块 运行于用户空间, 避免所述 I/O操作指令陷入到内核态中。  The application running in the user space, when accessing the storage device, will send an I/O operation instruction to the operating system in the host. The software definition module may intercept the I/O operation instruction before the I/O operation instruction reaches the operating system kernel, and avoid the I/O operation instruction because the software definition module runs in a user space. Fall into the kernel state.
S302: 所述软件定义模块根据所述访问地址, 确定所述 I/O操作指令对 应的存储服务。 S302: The software definition module determines, according to the access address, the pair of I/O operation instructions. The storage service should be.
由于应用程序访问所述存储设备,相当于应用程序需要软件定义模块和 存储设备提供数据读 /写服务,甚至还需要软件定义模块和存储设备提供数据 压缩等高级功能服务。 因此, 所述软件定义模块需要确定所述 I/O操作指令 对应的存储服务, 以便后续提供所述 I/O操作指令对应的存储服务, 实现应 用程序对存储设备的访问。 其中, 所述存储服务不仅仅包括数据读 /写服务, 还包括高级功能服务(该高级功能服务是指除数据读 /写服务以外的服务), 如数据快照、 智能分层、 去重或数据压缩等。  Since the application accesses the storage device, it is equivalent to the application requiring software definition modules and storage devices to provide data read/write services, and even software definition modules and storage devices to provide advanced functional services such as data compression. Therefore, the software definition module needs to determine a storage service corresponding to the I/O operation instruction, so as to subsequently provide a storage service corresponding to the I/O operation instruction, and implement access of the application to the storage device. The storage service includes not only data read/write services, but also advanced function services (services other than data read/write services), such as data snapshots, intelligent layering, deduplication, or data. Compression and so on.
由于, 在搭建所述基于 SDS 的存储系统时, 可以定义对存储设备的哪 些地址进行访问时, 对应需要哪些存储服务, 例如可以定义访问存储设备的 哪些卷时, 对应需要哪些存储服务, 或者可以定义访问哪段逻辑地址时, 对 应需要哪些存储服务, 因而所述软件定义模块可以根据所述访问地址, 确定 所述 I/O操作指令对应的存储服务。由于所述软件定义模块运行于用户空间, 则上述确定所述 I/O操作指令对应的存储服务的过程在用户空间实现, 避免 了内核的陷入 /陷出。  When the SDS-based storage system is set up, which storage addresses of the storage device are accessed, which storage services are required, for example, which volumes of the storage device are accessed, which storage services are required, or When the logical address is accessed, which storage service is required, the software definition module can determine the storage service corresponding to the I/O operation instruction according to the access address. Since the software definition module runs in the user space, the process of determining the storage service corresponding to the I/O operation instruction is implemented in the user space, thereby avoiding the sinking/trapping of the kernel.
具体地, 所述软件定义模块可以根据所述访问地址, 查询预先配置的地 址服务映射表, 以确定所述 I/O操作指令对应的存储服务; 所述地址服务映 射表用于记录所述存储设备的地址与存储服务的对应关系; 例如, 在建立基 于 SDS 的存储系统时, 可以通过操作维护系统将地址服务映射表配置在所 述软件定义模块中, 从而所述软件定义模块可以根据所述访问地址, 查询预 先配置的地址服务映射表, 确定所述 I/O操作指令对应的存储服务。 元的地址, 也可以是所述存储设备中部分存储单元的地址; 所述存储设备的 地址即可以以逻辑地址的形式呈现, 也可以以其它形式呈现, 本发明实施例 在此不作限定。  Specifically, the software definition module may query a pre-configured address service mapping table according to the access address to determine a storage service corresponding to the I/O operation instruction; and the address service mapping table is used to record the storage. Corresponding relationship between the address of the device and the storage service; for example, when the SDS-based storage system is established, the address service mapping table may be configured in the software definition module by the operation and maintenance system, so that the software definition module may be configured according to the The access address is used to query a pre-configured address service mapping table to determine a storage service corresponding to the I/O operation instruction. The address of the element may also be the address of a part of the storage unit in the storage device. The address of the storage device may be in the form of a logical address or may be presented in other forms, which is not limited herein.
S303: 所述软件定义模块根据所述 I/O操作指令对应的存储服务和所述 I/O操作指令, 指示所述主机的操作系统内核根据所述访问地址访问所述存 储设备。 S303: The software definition module is configured according to the storage service corresponding to the I/O operation instruction and the An I/O operation instruction instructing an operating system kernel of the host to access the storage device according to the access address.
在对所述存储设备进行访问时, 可以利用操作系统的内核, 则所述软件 定义模块可以根据所述 I/O操作指令对应的存储服务和所述 I/O操作指令, 指示所述主机的操作系统内核根据所述访问地址访问所述存储设备。 由于操 作系统内核运行于内核空间, 并且访问所述存储设备时需要在内核空间进行 , 因此存储系统将从用户态切换到内核态, 出现一次内核的陷入。  When accessing the storage device, the kernel of the operating system may be utilized, and the software definition module may indicate the host according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction. The operating system kernel accesses the storage device based on the access address. Since the operating system kernel runs in kernel space and needs to be in kernel space when accessing the storage device, the storage system will switch from user mode to kernel state, and a kernel trap will occur.
具体地, 所述 I/O操作指令可以为读操作指令, 还可以为写操作指令, 如果所述 I/O操作指令对应的存储服务不包括高级功能服务, 则所述软件定 义模块只需根据所述 I/O操作指令, 指示所述主机的操作系统内核根据所述 访问地址对所述存储设备进行读 /写访问;如果所述 I/O操作指令对应的存储 服务包括高级功能服务, 则所述软件定义模块可以根据所述 I/O操作指令对 应的存储服务,对需要写入所述存储设备的数据执行相应地高级功能操作后, 再指示操作系统内核根据所述访问地址将所述操作后的数据写入所述存储 设备, 或者所述软件定义模块可以指示所述操作系统内核根据所述访问地址 从所述存储设备中读取数据,还后续再对从所述存储设备中读取到的数据执 行相应地高级功能操作。 例如, 如果所述 I/O操作指令对应的存储服务中包 括的高级功能服务为数据压缩, 则所述软件定义模块可以对需要写入所述存 储设备的数据执行数据压缩操作后, 再将压缩后的数据写入所述存储设备。  Specifically, the I/O operation instruction may be a read operation instruction, and may also be a write operation instruction. If the storage service corresponding to the I/O operation instruction does not include an advanced function service, the software definition module only needs to be based on The I/O operation instruction, indicating that the operating system kernel of the host performs read/write access to the storage device according to the access address; if the storage service corresponding to the I/O operation instruction includes an advanced function service, The software definition module may perform, according to the storage service corresponding to the I/O operation instruction, perform a corresponding advanced function operation on data that needs to be written into the storage device, and then instruct the operating system kernel to perform the The processed data is written to the storage device, or the software definition module may instruct the operating system kernel to read data from the storage device according to the access address, and then read from the storage device The retrieved data performs the corresponding advanced function operations. For example, if the advanced function service included in the storage service corresponding to the I/O operation instruction is data compression, the software definition module may perform a data compression operation on data that needs to be written to the storage device, and then compress the data. The subsequent data is written to the storage device.
S304: 所述软件定义模块接收所述操作系统内核返回的访问结果。  S304: The software definition module receives an access result returned by the operating system kernel.
所述软件定义模块可以接收所述操作系统内核返回的访问结果, 由于所 述软件定义模块运行于用户空间, 所述操作系统内核运行于内核空间, 此时 存储系统将从内核态切换到用户态, 出现一次内核的陷出。  The software definition module may receive an access result returned by the operating system kernel. Because the software definition module runs in a user space, the operating system kernel runs in a kernel space, and the storage system switches from a kernel state to a user state. , a kernel trap occurs.
S305: 所述软件定义模块将所述访问结果发送给所述应用程序。  S305: The software definition module sends the access result to the application.
所述软件定义模块将所述访问结果发送给所述应用程序是指: 如果所述 Sending, by the software definition module, the access result to the application means:
I/O操作指令对应的存储服务不包括高级功能操作时, 所述软件定义模块直 接将所述操作系统内核返回的所述访问结果发送给所述应用程序, 以完成对 所述存储设备的访问; 如果所述 I/O操作指令对应的存储服务包括高级功能 服务时, 所述软件定义模块可能需要对所述访问结果(例如从所述存储设备 中读取到的数据)进行相应地高级功能操作之后再发送给所述应用程序, 以 完成对所述存储设备的访问。 例如, 如果所述 I/O操作指令对应的存储服务 中包括的高级功能服务为数据压缩, 则所述软件定义模块可以对从所述存储 设备中读取到的数据执行数据压缩操作后, 发送给所述应用程序。 When the storage service corresponding to the I/O operation instruction does not include the advanced function operation, the software definition module is straight And sending the access result returned by the operating system kernel to the application to complete access to the storage device; if the storage service corresponding to the I/O operation instruction includes an advanced function service, The software definition module may need to perform corresponding advanced function operations on the access result (eg, data read from the storage device) before sending the application to the application to complete access to the storage device. For example, if the advanced function service included in the storage service corresponding to the I/O operation instruction is data compression, the software definition module may perform a data compression operation on the data read from the storage device, and then send Give the application.
所述软件定义模块和所述应用程序都运行于用户空间,避免了内核的陷 /陷出。  Both the software definition module and the application run in the user space, avoiding kernel trapping/sinking.
在本发明实施例中, 所述主机中运行于用户空间的软件定义模块能够截 获所述主机的应用程序发送的 I/O操作指令, 所述 I/O操作指令携带访问地 址, 避免了所述 I/O操作指令陷入到内核态, 从而所述软件定义模块能够根 据所述访问地址, 确定所述 I/O操作指令对应的存储服务, 根据所述 I/O操 作指令对应的存储服务和所述 I/O操作指令, 指示所述主机的操作系统内核 根据所述访问地址访问所述存储设备,接收所述操作系统内核返回的访问结 果, 将所述访问结果发送给所述应用程序, 实现了应用程序对存储设备的访 问。 由于软件定义模块运行于用户空间, 上述过程中, 只有软件定义模块指 示所述主机的操作系统内核访问所述存储设备时存在一次内核陷入,软件定 义模块接收所述操作系统内核返回的访问结果时存在一次内核陷出, 减少了 应用程序访问存储设备时系统的内核陷入和内核陷出次数,从而提升访问速 度, 提高系统可靠性。  In the embodiment of the present invention, the software definition module running in the user space of the host can intercept an I/O operation instruction sent by the application of the host, and the I/O operation instruction carries an access address, which avoids the The I/O operation instruction is trapped in a kernel state, so that the software definition module can determine, according to the access address, a storage service corresponding to the I/O operation instruction, according to the storage service and the corresponding operation instruction of the I/O operation instruction. An I/O operation instruction, instructing an operating system kernel of the host to access the storage device according to the access address, receiving an access result returned by the operating system kernel, and transmitting the access result to the application, to implement The application's access to the storage device. Since the software definition module runs in the user space, in the above process, only when the software definition module instructs the operating system kernel of the host to access the storage device, there is a kernel trap, and the software definition module receives the access result returned by the operating system kernel. There is a kernel trap that reduces the number of kernel traps and kernel traps when the application accesses the storage device, which improves access speed and improves system reliability.
实施例一所述的主机和存储设备分别可以是图 1所示基于 SDS的存储 系统中的 11和 12。  The host and storage device described in the first embodiment may be 11 and 12 in the SDS-based storage system shown in Fig. 1, respectively.
为了进一步提升访问速度, 还可以在图 1所示的存储设备 12中增加緩 存装置 411 , 从而得到存储设备 40, 存储设备 40中包括緩存装置 411和存 储装置 12 (即图 1中的存储设备 12 )。 当所述存储装置设置在所述主机的远 端时, 所述緩存装置可以设置在所述主机的本地, 此时所述緩存装置可以为 高速緩存设备(例如非易失性内存芯片 NVDIMM、 非易失性随机访问存储 器 NVRAM ), 还可以为磁盘设备等; 当所述存储装置设置在所述主机的本 地时, 所述緩存装置可以设置在所述主机的本地, 此时所述緩存装置可以为 高速緩存设备。 In order to further improve the access speed, the cache device 411 can also be added to the storage device 12 shown in FIG. 1, thereby obtaining the storage device 40. The storage device 40 includes the cache device 411 and the storage device 12 (ie, the storage device 12 in FIG. 1). ). When the storage device is disposed at a far side of the host In the end, the cache device may be disposed locally on the host, and the cache device may be a cache device (eg, a non-volatile memory chip NVDIMM, a non-volatile random access memory NVRAM), or a disk device or the like; when the storage device is set locally on the host, the cache device may be set locally on the host, and the cache device may be a cache device.
所述软件定义模块可以指示操作系统内核访问所述緩存装置, 以通过所 述緩存装置访问所述存储装置, 从而提高访问速度。 例如, 如果需要写数据 到所述存储设备中, 所述软件定义模块可以指示操作系统内核将写数据写入 到所述緩存装置, 后续由所述緩存装置将写数据写入到存储设备, 提升了访 问速度; 如果需要从所述存储设备中读数据, 所述软件定义模块可以指示操 作系统内核从所述緩存装置中读取数据,如果所述緩存装置中已经保存了需 要读取的数据, 则所述緩存装置可以直接提供所述需要读取的数据, 提升了 访问速度, 如果所述緩存装置中没有保存该需要读取的数据, 所述緩存装置 可以从所述存储设备中获取所述需要读取的数据给操作系统内核。 因此, 实 施例一的步骤 S303可以替换为:  The software definition module can instruct the operating system kernel to access the cache device to access the storage device through the cache device, thereby increasing access speed. For example, if it is necessary to write data to the storage device, the software definition module may instruct the operating system kernel to write write data to the cache device, and subsequently write the write data to the storage device by the cache device, Access speed; if it is required to read data from the storage device, the software definition module may instruct the operating system kernel to read data from the cache device, if the cache device has saved data that needs to be read, The cache device may directly provide the data to be read, and improve the access speed. If the cache device does not store the data to be read, the cache device may obtain the data from the storage device. The data that needs to be read is given to the operating system kernel. Therefore, step S303 of the first embodiment can be replaced by:
S303' :所述软件定义模块根据所述 I/O操作指令对应的存储服务和所述 I/O操作指令, 指示所述主机的操作系统内核根据所述访问地址, 访问所述 緩存装置, 以通过所述緩存装置访问所述存储装置。 实施例二  S303': the software definition module instructs the operating system kernel of the host to access the cache device according to the access address according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, to The storage device is accessed by the cache device. Embodiment 2
本发明实施例提出了一种访问存储设备的方法, 用于基于 SDS 的存储 系统, 所述基于 SDS 的存储系统包括主机和存储设备, 当所述主机中的应 用程序下发的 I/O操作指令对应的存储服务中包括高级功能服务,且所述 I/O 操作指令为读操作指令时, 所述软件定义模块可以通过本发明实施例所述的 方法, 访问所述存储设备, 如图 5所示, 所述方法包括:  The embodiment of the present invention provides a method for accessing a storage device, which is used for an SDS-based storage system, where the SDS-based storage system includes a host and a storage device, and an I/O operation delivered by an application in the host When the storage service corresponding to the instruction includes the advanced function service, and the I/O operation instruction is a read operation instruction, the software definition module may access the storage device by using the method described in the embodiment of the present invention, as shown in FIG. 5. As shown, the method includes:
S501 : 所述主机中运行于用户空间的软件定义模块截获所述主机的应用 程序发送的 I/O操作指令, 所述 I/O操作指令携带访问地址。 S501: The software definition module running in the user space in the host intercepts the application of the host An I/O operation instruction sent by the program, the I/O operation instruction carrying an access address.
所述软件定义模块可以在所述 I/O操作指令到达所述操作系统内核之前, 截获所述 I/O操作指令, 由于所述软件定义模块运行于用户空间, 避免了所 述 I/O操作指令陷入到内核态中。  The software definition module may intercept the I/O operation instruction before the I/O operation instruction reaches the operating system kernel, and the I/O operation is avoided because the software definition module runs in a user space. The instruction falls into the kernel state.
所述软件定义模块截获所述 I/O操作指令的方式可以有多种, 具体地可 以釆用如下方式。  The manner in which the software definition module intercepts the I/O operation instruction may be various, and specifically, the following manner may be employed.
方式一: 当应用程序使用动态链接库的方式链接操作系统的操作系统库 时, 可以釆用动态链接库预加载的方式, 截获应用程序的 I/O操作指令, 其 原理如下: 一般的应用程序运行环境中, 都提供接口用于指定程序运行时优 先加载的动态连接库。 默认情况下, 应用程序的 I/O操作优先加载操作系统 的动态链接库。 因而, 可以利用提供的接口, 将软件定义模块发布的动态链 接库设置为优先加载, 从而当应用程序进行 I/O操作时, 将加载软件定义模 块所提供的接口, 从而实现了应用程序发送的 10操作指令的截获。 例如, 在 Linux系统中, 可以通过环境变量 LD— PRELOAD指定程序运行时优先加 载的动态连接库, 从而可以通过利用 LD— PRELOAD, 将软件定义模块发布 的动态链接库的加载顺序高于操作系统的动态链接库。  Method 1: When the application uses the dynamic link library to link the operating system library of the operating system, the dynamic link library preloading method can be used to intercept the I/O operation instructions of the application. The principle is as follows: General application In the runtime environment, interfaces are provided to specify the dynamic link library that is loaded first when the program is running. By default, the application's I/O operations preferentially load the operating system's dynamic link library. Therefore, the dynamic link library issued by the software definition module can be set to be preferentially loaded by using the provided interface, so that when the application performs the I/O operation, the interface provided by the software definition module is loaded, thereby realizing the application sending. 10 interception of operation instructions. For example, in a Linux system, the dynamic link library that is preferentially loaded by the program runtime can be specified by the environment variable LD_PreLOAD, so that the load order of the dynamic link library released by the software definition module can be higher than that of the operating system by using LD-PRELOAD. Dynamic link library.
方式二: 当应用程序使用静态链接库的方式链接操作系统的操作系统库 时, 可以釆用应用程序链接过程控制的方式, 设置优先解析的符号, 截获应 用程序的 I/O操作指令, 其原理如下: 默认情况下, 应用程序进行 I/O操作 时将优先解析操作系统的符号 ( symbol )。 由于在应用程序编译和链接过程 中, 常规编译器都会提供符号优先解析控制参数, 因此可以对符号优先解析 控制参数进行设置, 从而当应用程序的 I/O操作需要查找某个符号时, 将优 先先解析软件定义模块的 symbol, 而不是优先解析操作系统的 symbol, 实 现了应用程序的 I/O操作指令的截获。  Method 2: When the application uses the static link library to link the operating system library of the operating system, you can use the application link process control method, set the priority resolution symbol, and intercept the I/O operation instruction of the application. As follows: By default, when the application performs I/O operations, the operating system's symbol ( symbol ) is prioritized. Since the regular compiler provides symbol-first parsing control parameters during application compilation and linking, the symbol-first parsing control parameters can be set so that when the application's I/O operations need to find a symbol, it will take precedence. The symbol of the software-defined module is parsed first, instead of prioritizing the symbol of the operating system, and the interception of the I/O operation instruction of the application is realized.
方式三:  Method three:
默认情形, 应用程序进行 I/O操作时, 将调用操作系统的标准库。 可以 用软件定义模块发布的私有标准库替换操作系统的标准库, 该私有标准库与 操作系统的标准库是二进制级别 (ABI ) 兼容的。 当应用程序进行 I/O操作 时, 将调用软件定义模块发布的私有标准库, 实现了应用程序的 I/O操作指 令的截获。 By default, when the application makes an I/O operation, the operating system's standard library is called. Can The standard library of the operating system is replaced with a private standard library published by the software definition module, which is binary level (ABI) compatible with the standard library of the operating system. When the application performs I/O operations, the private standard library released by the software definition module is called, and the interception of the application's I/O operation instructions is realized.
此外, 还可以釆用其他的方式, 实现软件定义模块截获所述 I/O操作指 令, 本发明实施例在此不作限制。  In addition, the I/O operation instruction may be intercepted by the software definition module in other manners, and the embodiment of the present invention is not limited herein.
S502: 所述软件定义模块根据所述访问地址, 确定所述 I/O操作指令对 应的存储服务。  S502: The software definition module determines, according to the access address, a storage service corresponding to the I/O operation instruction.
具体地, 所述软件定义模块根据所述访问地址, 查询预先配置的地址服 务映射表, 以确定所述 I/O操作指令对应的存储服务, 所述地址服务映射表 用于记录所述存储设备的地址与存储服务的对应关系。 在建立基于 SDS 的 存储系统时, 可以通过操作维护系统将地址服务映射表配置在所述软件定义 模块中, 从而所述软件定义模块可以根据所述访问地址, 查询预先配置的地 址服务映射表, 确定所述 I/O操作指令对应的存储服务。 元的地址, 也可以是所述存储设备中部分存储单元的地址; 所述存储设备的 地址即可以以逻辑地址的形式呈现, 也可以以其它形式呈现, 本发明实施例 在此不作限定。  Specifically, the software definition module queries a pre-configured address service mapping table according to the access address to determine a storage service corresponding to the I/O operation instruction, where the address service mapping table is used to record the storage device. The correspondence between the address and the storage service. When the SDS-based storage system is established, the address service mapping table may be configured in the software definition module by using the operation and maintenance system, so that the software definition module may query the pre-configured address service mapping table according to the access address. Determining a storage service corresponding to the I/O operation instruction. The address of the element may also be the address of a part of the storage unit in the storage device. The address of the storage device may be in the form of a logical address or may be presented in other forms, which is not limited herein.
S503: 当所述 I/O操作指令对应的存储服务中包括高级功能服务, 且所 述 I/O操作指令为读操作指令时, 所述软件定义模块指示所述操作系统内核 可选地, 如果所述存储设备中包括緩存装置和存储装置, 则 S503还可 以替换为 S503': 所述软件定义模块指示所述操作系统内核根据所述访问地 址从所述緩存装置中读取读访问数据。  S503: When the storage service corresponding to the I/O operation instruction includes an advanced function service, and the I/O operation instruction is a read operation instruction, the software definition module instructs the operating system kernel to optionally The storage device includes a cache device and a storage device, and S503 may be further replaced with S503': the software definition module instructs the operating system kernel to read read access data from the cache device according to the access address.
如果所述緩存装置中保存了所述读访问数据, 则所述緩存装置将自身緩 存的读访问数据返回给所述操作系统内核, 提升了访问速度; 如果所述緩存 装置中没有保存所述访问地址对应的所述读访问数据, 则所述緩存装置将根 据所述访问地址从所述存储装置中读取所述读访问数据,返回给所述操作系 统内核。 If the read access data is saved in the cache device, the cache device returns its own cached read access data to the operating system kernel, which improves the access speed; If the read access data corresponding to the access address is not stored in the device, the cache device reads the read access data from the storage device according to the access address, and returns the read access data to the operating system kernel.
S504: 所述软件定义模块接收所述操作系统内核返回的所述读访问数据。 S505: 所述软件定义模块根据所述 I/O操作指令对应的存储服务中包括 的高级功能服务, 对所述读访问数据执行高级功能操作。  S504: The software definition module receives the read access data returned by the operating system kernel. S505: The software definition module performs an advanced function operation on the read access data according to an advanced function service included in the storage service corresponding to the I/O operation instruction.
S506: 所述软件定义模块将所述执行高级功能操作之后的所述读访问数 据发送给所述应用程序。  S506: The software definition module sends the read access data after performing the advanced function operation to the application.
在本发明实施例中, 主机中的软件定义模块能够当所述主机中的应用程 序下发的 I/O操作指令对应的存储服务中包括高级功能服务, 且所述 I/O操 作指令为读操作指令时, 实现应用程序对存储设备的访问。 并且只有在所述 软件定义模块指示所述主机的操作系统内核根据所述访问地址从所述存储 设备中读取访问数据时, 存在一次内核陷入, 软件定义模块接收所述操作系 统内核返回的读访问数据时, 存在一次内核陷出, 减少了应用程序访问存储 设备时系统的内核陷入和内核陷出次数, 从而提升访问速度, 提高系统可靠 性。 进一步, 所述存储设备中还可以包括緩存装置和存储装置, 从而所述软 件定义模块可以指示所述主机的操作系统内核根据所述访问地址从所述緩 存装置中读取读访问数据, 进一步提升了访问速度。 实施例三  In the embodiment of the present invention, the software definition module in the host can include an advanced function service in the storage service corresponding to the I/O operation instruction delivered by the application in the host, and the I/O operation instruction is read. The application accesses the storage device when the instruction is manipulated. And only when the software definition module instructs the operating system kernel of the host to read the access data from the storage device according to the access address, there is a kernel trap, and the software definition module receives the read returned by the operating system kernel. When accessing data, there is a kernel trap that reduces the number of kernel traps and kernel traps when the application accesses the storage device, thereby increasing access speed and improving system reliability. Further, the storage device may further include a cache device and a storage device, so that the software definition module may instruct the operating system kernel of the host to read read access data from the cache device according to the access address, further improve The speed of access. Embodiment 3
本发明实施例提出了一种访问存储设备的方法, 用于基于 SDS 的存储 系统, 所述基于 SDS 的存储系统包括主机和存储设备, 当所述主机中的应 用程序下发的 I/O操作指令对应的存储服务中包括高级功能服务,且所述 I/O 操作指令为写操作指令时, 所述软件定义模块可以通过本发明实施例所述的 方法, 访问所述存储设备, 所述方法包括:  The embodiment of the present invention provides a method for accessing a storage device, which is used for an SDS-based storage system, where the SDS-based storage system includes a host and a storage device, and an I/O operation delivered by an application in the host When the storage service corresponding to the instruction includes the advanced function service, and the I/O operation instruction is a write operation instruction, the software definition module may access the storage device by using the method described in the embodiment of the present invention. Includes:
S601 : 所述主机中运行于用户空间的软件定义模块截获所述主机的应用 程序发送的 I/O操作指令, 所述 I/O操作指令携带访问地址。 S601: The software definition module running in the user space in the host intercepts the application of the host An I/O operation instruction sent by the program, the I/O operation instruction carrying an access address.
S602: 所述软件定义模块根据所述访问地址, 确定所述 I/O操作指令对 应的存储服务。  S602: The software definition module determines, according to the access address, a storage service corresponding to the I/O operation instruction.
步骤 S601和 S602的具体实现方式详见 S301和 S302或者 S501和 S502, 本发明实施例在此不再赘述。  The specific implementation manners of the steps S601 and S602 are described in detail in S301 and S302 or S501 and S502, and details are not described herein again.
S603: 当所述 I/O操作指令对应的存储服务中包括高级功能服务, 且所 述 I/O操作指令为写操作指令时, 所述 I/O操作指令还携带写数据, 所述软 件定义模块根据所述 I/O操作指令对应的存储服务中包括的高级功能服务, 对所述写数据执行高级功能操作。  S603: When an I/O operation instruction corresponding to the I/O operation instruction includes an advanced function service, and the I/O operation instruction is a write operation instruction, the I/O operation instruction further carries write data, where the software definition The module performs an advanced function operation on the write data according to an advanced function service included in the storage service corresponding to the I/O operation instruction.
例如, 如果所述软件定义模块根据所述 I/O操作指令对应的存储服务中 包括的高级功能服务为数据加密, 则所述软件定义模块对所述写数据执行数 据加密操作。  For example, if the software definition module encrypts data according to an advanced function service included in the storage service corresponding to the I/O operation instruction, the software definition module performs a data encryption operation on the write data.
S604: 所述软件定义模块指示所述操作系统内核根据所述访问地址将所 述执行高级功能操作之后的所述写数据写入到所述存储设备中。  S604: The software definition module instructs the operating system kernel to write the write data after performing the advanced function operation to the storage device according to the access address.
可选地, 如果所述存储设备中包括緩存装置和存储装置, 则 S604还可 以替换为 S604': 所述软件定义模块指示所述操作系统内核将所述访问地址 和所述执行高级功能操作之后的所述写数据写入到所述緩存装置中, 以使得 所述緩存装置根据所述访问地址将所述执行高级功能操作之后的所述写数 据写入到所述存储装置中。 所述软件定义模块指示所述操作系统内核将所述 执行高级功能操作之后的所述写数据写入到所述緩存装置中,提升了访问速 度。  Optionally, if the storage device includes a cache device and a storage device, S604 may also be replaced with S604': the software definition module instructs the operating system kernel to operate the access address and the performing advanced function The write data is written into the cache device such that the cache device writes the write data after performing the advanced function operation to the storage device according to the access address. The software definition module instructs the operating system kernel to write the write data after performing the advanced function operation to the cache device, which improves the access speed.
S605: 所述软件定义模块接收所述操作系统内核返回的写数据结果。 S606: 所述软件定义模块将所述写数据结果发送给所述应用程序。  S605: The software definition module receives a write data result returned by the operating system kernel. S606: The software definition module sends the write data result to the application.
在本发明实施例中, 主机中的软件定义模块能够当所述主机中的应用程 序下发的 I/O操作指令对应的存储服务中包括高级功能服务, 且所述 I/O操 作指令为写操作指令时, 实现应用程序对存储设备的访问。 并且只有在所述 软件定义模块指示所述主机的操作系统内核将所述执行高级功能操作之后 的写数据写入到所述存储设备中时, 存在一次内核陷入, 软件定义模块接收 所述操作系统内核返回的写数据结果时, 存在一次内核陷出, 减少了应用程 序访问存储设备时系统的内核陷入和内核陷出次数, 从而提升访问速度, 提 高系统可靠性。 进一步, 所述存储设备中还可以包括緩存装置和存储装置, 从而所述软件定义模块可以指示所述操作系统内核将所述执行高级功能操 作之后的写数据写入到緩存装置中, 以使所述緩存装置将所述执行高级功能 操作之后的写数据写入到所述存储装置中, 进一步提升了访问速度。 实施例四 In the embodiment of the present invention, the software definition module in the host can include an advanced function service in the storage service corresponding to the I/O operation instruction delivered by the application in the host, and the I/O operation instruction is write The application accesses the storage device when the instruction is manipulated. And only in the When the software definition module instructs the operating system kernel of the host to write the write data after performing the advanced function operation to the storage device, there is a kernel trap, and the software definition module receives the write data returned by the operating system kernel. As a result, there is a kernel trap that reduces the number of kernel traps and kernel traps when the application accesses the storage device, thereby increasing access speed and improving system reliability. Further, the storage device may further include a cache device and a storage device, so that the software definition module may instruct the operating system kernel to write the write data after performing the advanced function operation into the cache device, so that The cache device writes the write data after performing the advanced function operation to the storage device, further improving the access speed. Embodiment 4
本发明实施例提出了一种访问存储设备的方法, 用于基于 SDS 的存储 系统, 所述基于 SDS 的存储系统包括主机和存储设备, 当所述主机中的应 用程序下发的 I/O操作指令对应的存储服务中不包括高级功能服务, 且所述 I/O操作指令为读操作指令时, 所述软件定义模块可以通过本发明实施例所 述的方法, 访问所述存储设备, 所述方法包括:  The embodiment of the present invention provides a method for accessing a storage device, which is used for an SDS-based storage system, where the SDS-based storage system includes a host and a storage device, and an I/O operation delivered by an application in the host When the storage service corresponding to the instruction does not include the advanced function service, and the I/O operation instruction is a read operation instruction, the software definition module may access the storage device by using the method described in the embodiment of the present invention. Methods include:
S701 : 所述主机中运行于用户空间的软件定义模块截获所述主机的应用 程序发送的 I/O操作指令, 所述 I/O操作指令携带访问地址。  S701: The software definition module running in the user space in the host intercepts an I/O operation instruction sent by an application of the host, where the I/O operation instruction carries an access address.
S702: 所述软件定义模块根据所述访问地址, 确定所述 I/O操作指令对 应的存储服务。  S702: The software definition module determines, according to the access address, a storage service corresponding to the I/O operation instruction.
步骤 S701和 S702的具体实现方式详见 S301和 S302或者 S501和 S502, 本发明实施例在此不再赘述。  The specific implementations of the steps S701 and S702 are described in detail in S301 and S302 or S501 and S502, and details are not described herein again.
S703: 当所述 I/O操作指令对应的存储服务中不包括高级功能服务, 且 所述 I/O操作指令为读操作指令时, 所述软件定义模块指示所述主机的操作 如果所述存储设备中包括緩存装置和存储装置, 则 S703还可以替换为 S703: When the advanced service service is not included in the storage service corresponding to the I/O operation instruction, and the I/O operation instruction is a read operation instruction, the software definition module indicates the operation of the host if the storage The device includes a cache device and a storage device, and the S703 can also be replaced with
S703' : 所述软件定义模块指示所述操作系统内核根据所述访问地址, 从所 述緩存装置中读取读访问数据。 S703': the software definition module instructs the operating system kernel to follow the access address The read access data is read in the cache device.
如果所述緩存装置中保存了所述读访问数据, 则所述緩存装置将自身緩 存的读访问数据返回给所述操作系统内核, 提升了访问速度; 如果所述緩存 装置中没有保存所述访问地址对应的所述读访问数据, 则所述緩存装置将根 据所述访问地址从所述存储装置中读取所述读访问数据,返回给所述操作系 统内核。  If the read access data is saved in the cache device, the cache device returns its cached read access data to the operating system kernel, which improves the access speed; if the cache device does not save the access The read access data corresponding to the address, the cache device reads the read access data from the storage device according to the access address, and returns the read access data to the operating system kernel.
S704: 所述软件定义模块接收所述操作系统内核返回的所述读访问数据。 S705: 所述软件定义模块将所述读访问数据发送给所述应用程序。  S704: The software definition module receives the read access data returned by the operating system kernel. S705: The software definition module sends the read access data to the application.
在本发明实施例中, 主机中的软件定义模块能够当所述主机中的应用程 序下发的 I/O操作指令对应的存储服务中不包括高级功能服务, 且所述 I/O 操作指令为读操作指令时, 实现应用程序对存储设备的访问。 并且只有在所 述软件定义模块指示所述主机的操作系统内核根据所述访问地址从所述存 储设备中读取读访问数据时, 存在一次内核陷入, 软件定义模块接收所述操 作系统内核返回的读访问数据时, 存在一次内核陷出, 减少了应用程序访问 存储设备时系统的内核陷入和内核陷出次数, 从而提升访问速度, 提高系统 可靠性。 进一步, 所述存储设备中还可以包括緩存装置和存储装置, 从而所 述软件定义模块可以指示所述主机的操作系统内核根据所述访问地址从所 述緩存装置读取所述读访问数据, 进一步提升了访问速度。 实施例五  In the embodiment of the present invention, the software definition module in the host is capable of not including the advanced function service in the storage service corresponding to the I/O operation instruction delivered by the application in the host, and the I/O operation instruction is When the operation instruction is read, the application accesses the storage device. And only when the software definition module instructs the operating system kernel of the host to read the read access data from the storage device according to the access address, there is a kernel trapping, and the software definition module receives the return from the operating system kernel. When reading access data, there is a kernel trap that reduces the number of kernel traps and kernel traps when the application accesses the storage device, thereby improving access speed and improving system reliability. Further, the storage device may further include a cache device and a storage device, so that the software definition module may instruct the operating system kernel of the host to read the read access data from the cache device according to the access address, and further Increased access speed. Embodiment 5
本发明实施例提出了一种访问存储设备的方法, 用于基于 SDS 的存储 系统, 所述基于 SDS 的存储系统包括主机和存储设备, 当所述主机中的应 用程序下发的 I/O操作指令对应的存储服务中不包括高级功能服务, 且所述 I/O操作指令为写操作指令时, 所述软件定义模块可以通过本发明实施例所 述的方法, 访问所述存储设备, 所述方法包括:  The embodiment of the present invention provides a method for accessing a storage device, which is used for an SDS-based storage system, where the SDS-based storage system includes a host and a storage device, and an I/O operation delivered by an application in the host When the storage service corresponding to the instruction does not include the advanced function service, and the I/O operation instruction is a write operation instruction, the software definition module may access the storage device by using the method described in the embodiment of the present invention. Methods include:
S801 : 所述主机中运行于用户空间的软件定义模块截获所述主机的应用 程序发送的 I/O操作指令, 所述 I/O操作指令携带访问地址。 S801: The software definition module running in the user space in the host intercepts the application of the host An I/O operation instruction sent by the program, the I/O operation instruction carrying an access address.
S802: 所述软件定义模块根据所述访问地址, 确定所述 I/O操作指令对 应的存储服务。  S802: The software definition module determines, according to the access address, a storage service corresponding to the I/O operation instruction.
步骤 S801和 S802的具体实现方式详见 S301和 S302或者 S501和 S502, 本发明实施例在此不再赘述。  The specific implementations of the steps S801 and S802 are described in detail in S301 and S302 or S501 and S502, and details are not described herein again.
S803: 当所述 I/O操作指令对应的存储服务中不包括高级功能服务, 且 所述 I/O操作指令为写操作指令时, 所述 I/O操作指令还携带写数据, 所述 软件定义模块指示所述操作系统内核根据所述访问地址将所述写数据写入 到所述存储设备中。  S803: when an advanced function service is not included in the storage service corresponding to the I/O operation instruction, and the I/O operation instruction is a write operation instruction, the I/O operation instruction further carries write data, where the software The definition module instructs the operating system kernel to write the write data to the storage device according to the access address.
可选地, 如果所述存储设备中包括緩存装置和存储装置, 则 S804还可 以替换为 S804': 所述软件定义模块指示所述操作系统内核将所述访问地址 和所述写数据写入到所述緩存装置中, 以使得所述緩存装置根据所述访问地 址将所述写数据写入到所述存储装置中。 所述软件定义模块指示所述操作系 统内核将所述写数据写入到所述緩存装置中, 提升了访问速度。  Optionally, if the storage device includes a cache device and a storage device, S804 may also be replaced with S804': the software definition module instructs the operating system kernel to write the access address and the write data to The cache device, wherein the cache device writes the write data into the storage device according to the access address. The software definition module instructs the operating system kernel to write the write data into the cache device to increase access speed.
S804: 所述软件定义模块接收所述操作系统内核返回的写数据结果。 S804: The software definition module receives a write data result returned by the operating system kernel.
S805: 所述软件定义模块将所述写数据结果发送给所述应用程序。 S805: The software definition module sends the write data result to the application.
在本发明实施例中, 主机中的软件定义模块能够当所述主机中的应用程 序下发的 I/O操作指令对应的存储服务中不包括高级功能服务, 且所述 I/O 操作指令为读操作指令时, 实现所述应用程序对所述存储设备的访问。 并且 只有在所述软件定义模块指示所述主机的操作系统内核根据所述访问地址 将所述写数据写入到所述存储设备中, 存在一次内核陷入, 软件定义模块接 收所述操作系统内核返回的写数据结果时, 存在一次内核陷出, 减少了应用 程序访问存储设备时系统的内核陷入和内核陷出次数, 从而提升访问速度, 提高系统可靠性。进一步,所述存储设备中还可以包括緩存装置和存储装置, 从而所述软件定义模块可以指示所述主机的操作系统内核将所述访问地址 和所述写数据写入所述緩存装置, 以使所述緩存装置根据所述访问地址将所 述写数据写入所述存储装置, 进一步提升了访问速度。 实施例六 In the embodiment of the present invention, the software definition module in the host is capable of not including the advanced function service in the storage service corresponding to the I/O operation instruction delivered by the application in the host, and the I/O operation instruction is When the operation instruction is read, access by the application to the storage device is implemented. And only if the software definition module instructs the operating system kernel of the host to write the write data to the storage device according to the access address, there is a kernel trapping, and the software definition module receives the operating system kernel to return When writing data results, there is a kernel trap that reduces the number of kernel traps and kernel traps when the application accesses the storage device, thereby improving access speed and improving system reliability. Further, the storage device may further include a cache device and a storage device, so that the software definition module may instruct the operating system kernel of the host to write the access address and the write data to the cache device, so that The cache device will be based on the access address The write data is written to the storage device, which further improves the access speed. Embodiment 6
本发明实施例提供了一种访问存储设备的主机,用于基于软件定义存储 SDS的存储系统, 如图 9所示, 所述主机 90包括软件定义模块 901、 应用 程序 902和操作系统内核 903 , 所述软件定义模块 901运行于所述主机 90 的用户空间;  An embodiment of the present invention provides a host for accessing a storage device, and is configured to store a storage system based on a software definition. As shown in FIG. 9, the host 90 includes a software definition module 901, an application program 902, and an operating system kernel 903. The software definition module 901 runs in a user space of the host 90;
所述软件定义模块 901用于截获所述应用程序 902发送的输入 /输出 I/O 操作指令, 所述 I/O操作指令携带访问地址, 根据所述访问地址, 确定所述 I/O操作指令对应的存储服务, 根据所述 I/O操作指令对应的存储服务和所 述 I/O操作指令, 指示所述操作系统内核 903根据所述访问地址访问所述基 于 SDS的存储系统中的存储设备。其中, 所述 I/O操作指令对应的存储服务 可能包括数据读 /写服务,还可能包括高级功能服务(该高级功能服务是指除 数据读 /写服务以外的服务), 如数据快照、 智能分层、 去重或数据压缩等。 所述软件定义模块 901可以在所述 I/O操作指令到达所述操作系统内核 903 之前,截获所述 I/O操作指令,由于所述软件定义模块 901运行于用户空间, 避免所述 I/O操作指令陷入到内核态中。  The software definition module 901 is configured to intercept an input/output I/O operation instruction sent by the application 902, where the I/O operation instruction carries an access address, and the I/O operation instruction is determined according to the access address. Corresponding storage service, instructing the operating system kernel 903 to access the storage device in the SDS-based storage system according to the access address according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction . The storage service corresponding to the I/O operation instruction may include a data read/write service, and may also include an advanced function service (the advanced function service refers to a service other than a data read/write service), such as a data snapshot, an intelligent Layering, deduplication or data compression. The software definition module 901 may intercept the I/O operation instruction before the I/O operation instruction reaches the operating system kernel 903, and the I/O operation instruction is avoided because the software definition module 901 operates in a user space. The O operation instruction falls into the kernel state.
所述操作系统内核 903用于根据所述软件定义模块 901的指示和所述访 问地址访问所述存储设备, 并将访问结果返回给所述软件定义模块 901 ; 所述软件定义模块 901用于接收所述操作系统内核 903返回的所述访问 结果, 将所述访问结果发送给所述应用程序 902。  The operating system kernel 903 is configured to access the storage device according to the indication of the software definition module 901 and the access address, and return an access result to the software definition module 901; the software definition module 901 is configured to receive The access result returned by the operating system kernel 903 sends the access result to the application 902.
上述应用程序 902访问存储设备的过程中只存在一次内核陷入和一次内 核陷出, 减少了应用程序 902访问存储设备时系统的内核陷入和内核陷出次 数, 从而提升访问速度, 提高系统可靠性。  The above application 902 accesses the storage device only once for kernel trapping and one kernel trapping, which reduces the kernel trapping and kernel trapping time when the application 902 accesses the storage device, thereby improving access speed and improving system reliability.
具体地, 所述软件定义模块 901截获所述 I/O操作指令的方式可以有多 种; 例如, 所述软件定义模块 901可以当应用程序 902使用静态链接库的方 式链接操作系统时, 釆用应用程序 902链接过程控制的方式, 截获所述应用 程序 902发送的所述 I/O操作指令; 其原理如下: 一般的应用程序 902运行 环境中, 都提供接口用于指定程序运行时优先加载的动态连接库。 默认情况 下, 应用程序 902的 I/O操作优先加载操作系统的动态链接库。 因而, 可以 利用提供的接口,将所述软件定义模块 901发布的动态链接库设置为优先加 载, 从而当应用程序 902进行 I/O操作时, 将加载所述软件定义模块 901所 提供的动态链接库, 从而实现了应用程序 902发送的 10操作指令的截获; 又例如, 所述软件定义模块 901可以当应用程序 902使用动态链接库的方式 链接操作系统时, 釆用动态链接库预加载的方式, 截获所述应用程序 902发 送的所述 I/O操作指令; 其原理如下: 默认情况下, 应用程序 902进行 I/O 操作时将优先解析操作系统的符号 (symbol )。 由于在应用程序 902编译和 链接过程中, 常规编译器都会提供符号优先解析控制参数, 因此可以对符号 优先解析控制参数进行设置, 从而当应用程序 902的 I/O操作需要查找某个 符号时,将优先先解析所述软件定义模块 901的 symbol, 而不是优先解析操 作系统的 symbol, 实现了应用程序 902的 I/O操作指令的截获; 又例如, 默 认情形, 应用程序 902进行 I/O操作时, 将调用操作系统的标准库。 可以用 所述软件定义模块 901发布的私有标准库替换操作系统的标准库, 该私有标 准库与操作系统的标准库是二进制级别 (ABI ) 兼容的。 当应用程序 902进 行 I/O操作时, 将调用所述软件定义模块 901发布的私有标准库, 实现了应 用程序 902的 I/O操作指令的截获。 Specifically, the manner in which the software definition module 901 intercepts the I/O operation instruction may be multiple; for example, the software definition module 901 may use the static link library when the application 902 uses the party. When the operating system is linked, the application 902 links the process control to intercept the I/O operation instruction sent by the application 902; the principle is as follows: In the general application 902 operating environment, the interface is provided. A dynamic link library that is loaded first when the specified program runs. By default, the application 902's I/O operations preferentially load the operating system's dynamic link library. Therefore, the dynamic link library issued by the software definition module 901 can be set to be preferentially loaded by using the provided interface, so that when the application 902 performs an I/O operation, the dynamic link provided by the software definition module 901 is loaded. The library, thereby implementing the interception of the 10 operation instructions sent by the application 902; for example, the software definition module 901 can use the dynamic link library to preload when the application 902 links the operating system by using a dynamic link library. The I/O operation instruction sent by the application 902 is intercepted; the principle is as follows: By default, when the application 902 performs an I/O operation, the operating system symbol (symbol) is preferentially parsed. Since the conventional compiler provides symbol-first parsing control parameters during the compilation and linking process of the application 902, the symbol-first parsing control parameters can be set so that when the I/O operation of the application 902 needs to find a symbol, The symbol of the software definition module 901 will be parsed first, instead of preferentially parsing the symbol of the operating system, and the interception of the I/O operation instruction of the application 902 is realized; for example, by default, the application 902 performs I/O operations. The standard library of the operating system is called. The standard library of the operating system can be replaced with a private standard library issued by the software definition module 901, which is binary level (ABI) compatible with the standard library of the operating system. When the application 902 performs an I/O operation, the private standard library issued by the software definition module 901 is invoked, and the interception of the I/O operation instruction of the application 902 is implemented.
所述软件定义模块 901具体可以根据所述访问地址, 查询预先配置的地 址服务映射表, 以确定所述 I/O操作指令对应的存储服务, 所述地址服务映 射表用于记录所述存储设备的地址与存储服务的对应关系。 所述存储设备的 部分存储单元的地址; 所述存储设备的地址即可以以逻辑地址的形式呈现, 也可以以其它形式呈现, 本发明实施例在此不作限定。 所述软件定义模块 901可以当所述 I/O操作指令对应的存储服务中包括 高级功能服务, 且所述 I/O操作指令为读操作指令时, 指示所述操作系统内 作系统内核 903可以根据所述软件定义模块 901的指示和所述访问地址,从 所述存储设备中读取读访问数据, 并将所述读访问数据返回给所述软件定义 模块 901 ; 所述软件定义模块 901可以接收所述操作系统内核 903返回的所 述读访问数据, 根据所述 I/O操作指令对应的存储服务中包括的高级功能服 务, 对所述读访问数据执行高级功能操作, 将所述执行高级功能操作之后的 所述读访问数据发送给所述应用程序 902; The software definition module 901 may specifically query the pre-configured address service mapping table according to the access address to determine a storage service corresponding to the I/O operation instruction, where the address service mapping table is used to record the storage device. The correspondence between the address and the storage service. The address of the storage unit of the storage device; the address of the storage device may be in the form of a logical address, or may be presented in other forms, which is not limited herein. The software definition module 901 may include, when the storage service corresponding to the I/O operation instruction includes an advanced function service, and the I/O operation instruction is a read operation instruction, indicating that the operating system kernel 903 can be Reading the read access data from the storage device according to the indication of the software definition module 901 and the access address, and returning the read access data to the software definition module 901; the software definition module 901 may Receiving the read access data returned by the operating system kernel 903, performing an advanced function operation on the read access data according to an advanced function service included in the storage service corresponding to the I/O operation instruction, and performing the advanced function The read access data after the function operation is sent to the application 902;
所述软件定义模块 901可以当所述 I/O操作指令对应的存储服务中包括 高级功能服务, 且所述 I/O操作指令为写操作指令时, 根据所述 I/O操作指 令对应的存储服务中包括的高级功能服务, 对所述 I/O操作指令携带的写数 据执行高级功能操作,指示所述操作系统内核 903根据所述访问地址将所述 执行高级功能操作之后的所述写数据写入到所述存储设备中; 则所述操作系 统内核 903可以根据所述软件定义模块 901的指示和所述访问地址将所述写 数据写入到所述存储设备中, 接收所述存储设备返回的写数据结果, 将所述 写数据结果返回给所述软件定义模块 901 ; 所述软件定义模块 901可以接收 所述操作系统内核 903返回的写数据结果,将所述写数据结果发送给所述应 用程序 902;  The software definition module 901 may include an advanced function service in a storage service corresponding to the I/O operation instruction, and when the I/O operation instruction is a write operation instruction, according to the storage corresponding to the I/O operation instruction An advanced function service included in the service, performing an advanced function operation on the write data carried by the I/O operation instruction, instructing the operating system kernel 903 to perform the write data after the performing the advanced function operation according to the access address Writing to the storage device; the operating system kernel 903 can write the write data to the storage device according to the indication of the software definition module 901 and the access address, and receive the storage device Returning the write data result, returning the write data result to the software definition module 901; the software definition module 901 may receive the write data result returned by the operating system kernel 903, and send the write data result to the Application 902;
所述软件定义模块 901可以当所述 I/O操作指令对应的存储服务中不包 括高级功能服务, 且所述 I/O操作指令为读操作指令时, 指示所述主机的操 述操作系统内核 903可以根据所述软件定义模块 901的指示和所述访问地址 , 从所述存储设备中读取读访问数据, 并将所述读访问数据返回给所述软件定 义模块 901 ; 所述软件定义模块 901可以接收所述操作系统内核 903返回的 所述读访问数据, 将所述读访问数据发送给所述应用程序 902; 所述软件定义模块 901可以当所述 I/O操作指令对应的存储服务中不包 括高级功能服务, 且所述 I/O操作指令为写操作指令时, 指示所述操作系统 内核 903根据所述访问地址将所述写数据写入到所述存储设备中; 则所述操 作系统内核 903可以根据所述软件定义模块 901的指示和所述访问地址将所 述写数据写入到所述存储设备中, 接收所述存储设备返回的写数据结果, 将 所述写数据结果返回给所述软件定义模块 901 ; 所述软件定义模块 901可以 接收所述操作系统内核 903返回的写数据结果,将所述写数据结果发送给所 述应用程序 902 , 以完成所述对所述存储设备的访问。 The software definition module 901 may indicate the operating system kernel of the host when the storage service corresponding to the I/O operation instruction does not include the advanced function service, and the I/O operation instruction is a read operation instruction. The reading access data is read from the storage device according to the indication of the software definition module 901 and the access address, and the read access data is returned to the software definition module 901; the software definition module The 901 may receive the read access data returned by the operating system kernel 903, and send the read access data to the application 902; The software definition module 901 may indicate that the operating system kernel 903 is in accordance with the operation function when the storage service corresponding to the I/O operation instruction does not include the advanced function service, and the I/O operation instruction is a write operation instruction. The access address writes the write data to the storage device; then the operating system kernel 903 can write the write data to the storage device according to the indication of the software definition module 901 and the access address Receiving the result of the write data returned by the storage device, and returning the result of the write data to the software definition module 901; the software definition module 901 may receive the result of the write data returned by the operating system kernel 903, The result of the write data is sent to the application 902 to complete the access to the storage device.
可选地, 为了进一步提高访问速度, 所述存储设备可以包括緩存装置和 存储装置; 则所述软件定义模块 901可以用于根据所述 I/O操作指令对应的 存储服务和所述 I/O操作指令, 指示所述主机的操作系统内核 903根据所述 访问地址访问所述緩存装置; 所述操作系统内核 903可以用于根据所述软件 定义模块 901的指示和所述访问地址, 访问所述緩存装置, 以通过所述緩存 装置访问所述存储装置。  Optionally, in order to further improve the access speed, the storage device may include a cache device and a storage device; then the software definition module 901 may be configured to use a corresponding storage service and the I/O according to the I/O operation instruction. An operation instruction, indicating that the operating system kernel 903 of the host accesses the cache device according to the access address; the operating system kernel 903 may be configured to access the according to the indication of the software definition module 901 and the access address. a cache device to access the storage device through the cache device.
例如, 所述软件定义模块 901可以当所述 I/O操作指令对应的存储服务 中包括高级功能服务, 且所述 I/O操作指令为读操作指令时, 指示所述操作 系统内核 903根据所述访问地址从所述緩存装置中读取读访问数据; 则所述 操作系统内核 903可以根据所述软件定义模块 901的指示和所述访问地址, 从所述緩存装置中读取读访问数据, 并将所述读访问数据返回给所述软件定 义模块 901 ; 所述软件定义模块 901可以接收所述操作系统内核 903返回的 所述读访问数据, 根据所述 I/O操作指令对应的存储服务中包括的高级功能 服务, 对所述读访问数据执行高级功能操作, 将所述执行高级功能操作之后 的所述读访问数据发送给所述应用程序 902。  For example, the software definition module 901 may indicate that the operating system kernel 903 is in accordance with the high-performance function service when the I/O operation instruction corresponding to the I/O operation instruction is a read operation instruction. Reading the access data from the cache device; the operating system kernel 903 can read the read access data from the cache device according to the indication of the software definition module 901 and the access address, And returning the read access data to the software definition module 901; the software definition module 901 may receive the read access data returned by the operating system kernel 903, and according to the storage service corresponding to the I/O operation instruction The advanced function service included in the module performs an advanced function operation on the read access data, and sends the read access data after the performing the advanced function operation to the application 902.
例如, 所述软件定义模块 901可以当所述 I/O操作指令对应的存储服务 中包括高级功能服务, 且所述 I/O操作指令为写操作指令时, 根据所述 I/O 操作指令对应的存储服务中包括的高级功能服务, 对所述 I/O操作指令携带 的写数据执行高级功能操作,指示所述操作系统内核 903将所述访问地址和 所述执行高级功能操作之后的所述写数据写入到所述緩存装置中; 则所述操 作系统内核 903可以根据所述软件定义模块 901的指示,将所述访问地址和 所述执行高级功能操作之后的所述写数据写入到所述緩存装置中, 以使得所 述緩存装置根据所述访问地址将所述执行高级功能操作之后的所述写数据 写入到所述存储装置中, 接收所述緩存装置返回的写数据结果, 将所述写数 据结果返回给所述软件定义模块 901 ; 所述软件定义模块 901可以接收所述 操作系统内核 903返回的所述写数据结果,将所述写数据结果发送给所述应 用程序 902。 For example, the software definition module 901 may include an advanced function service in a storage service corresponding to the I/O operation instruction, and when the I/O operation instruction is a write operation instruction, corresponding to the I/O operation instruction. Advanced function services included in the storage service, carrying the I/O operation instructions Writing data performs an advanced function operation, instructing the operating system kernel 903 to write the access address and the write data after performing the advanced function operation into the cache device; then the operating system kernel 903 can Writing the access address and the write data after performing the advanced function operation to the cache device according to an instruction of the software definition module 901, so that the cache device according to the access address Writing the write data after performing the advanced function operation to the storage device, receiving the write data result returned by the cache device, and returning the write data result to the software definition module 901; the software definition The module 901 can receive the write data result returned by the operating system kernel 903, and send the write data result to the application 902.
例如, 所述软件定义模块 901可以当所述 I/O操作指令对应的存储服务 中不包括高级功能服务, 且所述 I/O操作指令为读操作指令时, 指示所述主 机的操作系统内核 903根据所述访问地址从所述緩存装置中读取读访问数据; 则所述操作系统内核 903可以根据所述软件定义模块 901的指示和所述访问 地址, 从所述緩存装置中读取读访问数据, 并将所述读访问数据返回给所述 软件定义模块 901 ; 所述软件定义模块 901可以接收所述操作系统内核 903 返回的所述读访问数据, 将所述读访问数据发送给所述应用程序 902。  For example, the software definition module 901 may indicate an operating system kernel of the host when the storage service corresponding to the I/O operation instruction does not include an advanced function service, and the I/O operation instruction is a read operation instruction. The read access data is read from the cache device according to the access address; then the operating system kernel 903 can read and read from the cache device according to the indication of the software definition module 901 and the access address. Accessing the data, and returning the read access data to the software definition module 901; the software definition module 901 can receive the read access data returned by the operating system kernel 903, and send the read access data to the The application 902 is described.
例如, 所述软件定义模块 901可以当所述 I/O操作指令对应的存储服务 中不包括高级功能服务, 且所述 I/O操作指令为写操作指令时, 指示所述操 作系统内核 903将所述访问地址和所述 I/O操作指令携带的写数据写入到所 述緩存装置中; 则所述操作系统内核 903可以根据所述软件定义模块 901的 指示, 将所述访问地址和所述写数据写入到所述緩存装置中, 以使得所述緩 存装置根据所述访问地址将所述写数据写入到所述存储装置中,接收所述緩 存装置返回的写数据结果,将所述写数据结果返回给所述软件定义模块 901 ; 所述软件定义模块 901可以接收所述操作系统内核 903返回的写数据结果, 将所述写数据结果发送给所述应用程序 902。  For example, the software definition module 901 may indicate that the operating system kernel 903 will be used when the storage service corresponding to the I/O operation instruction does not include the advanced function service, and the I/O operation instruction is a write operation instruction. The access address and the write data carried by the I/O operation instruction are written into the cache device; then the operating system kernel 903 may, according to the instruction of the software definition module 901, the access address and the location Writing data to the cache device, so that the cache device writes the write data to the storage device according to the access address, and receives a write data result returned by the cache device, The result of the data is returned to the software definition module 901; the software definition module 901 can receive the result of the write data returned by the operating system kernel 903, and send the result of the write data to the application 902.
在本发明实施例中, 所述主机中运行于用户空间的软件定义模块 901能 够截获所述主机的应用程序 902发送的 I/O操作指令, 所述 I/O操作指令携 带访问地址, 避免了所述 I/O操作指令陷入到内核态, 从而所述软件定义模 块 901能够根据所述访问地址, 确定所述 I/O操作指令对应的存储服务, 根 据所述 I/O操作指令对应的存储服务和所述 I/O操作指令, 指示所述主机的 操作系统内核 903根据所述访问地址访问所述存储设备,接收所述操作系统 内核 903返回的访问结果, 将所述访问结果发送给所述应用程序 902, 实现 了应用程序 902对存储设备的访问。由于软件定义模块 901运行于用户空间 , 上述过程中, 只有软件定义模块 901指示所述主机的操作系统内核 903访问 所述存储设备时存在一次内核陷入,软件定义模块 901接收所述操作系统内 核 903返回的访问结果时存在一次内核陷出, 减少了应用程序 902访问存储 设备时系统的内核陷入和内核陷出次数, 从而提升访问速度, 提高系统可靠 性。 In the embodiment of the present invention, the software definition module 901 running in the user space in the host can An I/O operation instruction sent by the application 902 of the host is intercepted, and the I/O operation instruction carries an access address, so that the I/O operation instruction is prevented from falling into a kernel state, so that the software definition module 901 can Determining, according to the access address, a storage service corresponding to the I/O operation instruction, instructing the operating system kernel 903 of the host according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction The access address accesses the storage device, receives an access result returned by the operating system kernel 903, and sends the access result to the application 902, thereby implementing access of the application 902 to the storage device. Since the software definition module 901 runs in the user space, in the above process, only when the software definition module 901 indicates that the operating system kernel 903 of the host accesses the storage device, there is a kernel trap, and the software definition module 901 receives the operating system kernel 903. There is a kernel trap in the returned access result, which reduces the kernel trap and kernel trap times of the application 902 when accessing the storage device, thereby improving access speed and improving system reliability.
进一步, 所述存储设备中还可以包括緩存装置和存储装置, 从而所述软 件定义模块 901可以根据所述 I/O操作指令对应的存储服务, 指示所述主机 的操作系统内核 903所述访问地址访问所述緩存装置, 以通过所述緩存装置 访问所述存储装置, 进一步提升了访问速度。 如图 10,为本发明实施例提供的一种访问存储设备的主机,所述主机可 以包括:  Further, the storage device may further include a cache device and a storage device, so that the software definition module 901 may indicate the access address of the operating system kernel 903 of the host according to the storage service corresponding to the I/O operation instruction. Accessing the cache device to access the storage device through the cache device further improves access speed. FIG. 10 is a host for accessing a storage device according to an embodiment of the present invention. The host may include:
处理器 1001、 存储器 1002、 系统总线 1004和通信接口 1005。 处理器 A processor 1001, a memory 1002, a system bus 1004, and a communication interface 1005. processor
1001、 存储器 1002和通信接口 1005之间通过系统总线 1004连接并完成相 互间的通信。 1001. The memory 1002 and the communication interface 1005 are connected through the system bus 1004 and complete communication with each other.
处理器 1001可能为单核或多核中央处理单元, 或者为特定集成电路, 或者为被配置成实施本发明实施例的一个或多个集成电路。  Processor 1001 may be a single core or multi-core central processing unit, or a particular integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
存储器 1002 可以为高速 RAM 存储器, 也可以为非易失性存储器 The memory 1002 can be a high speed RAM memory or a nonvolatile memory.
( non-volatile memory ) , 例 口至少一个磁盘存 4诸器。 存储器 1002用于计算机执行指令 1003。 具体的, 计算机执行指令 1003 中可以包括程序代码。 (non-volatile memory), at least one disk storage device. The memory 1002 is used by the computer to execute the instructions 1003. Specifically, the program code may be included in the computer execution instruction 1003.
当所述主机运行时, 处理器 1001运行计算机执行指令 1003 , 可以执行 实施例一至实施例五任一所述的访问存储设备的方法的方法流程。 本发明实施例还提供了一种计算机可读介质, 包括计算机执行指令, 以 供计算机的处理器执行所述计算机执行指令时, 所述计算机执行实施例一至 实施例五任一所述的访问存储设备的方法的方法流程。 本领域普通技术人员将会理解, 本发明的各个方面、 或各个方面的可能 实现方式可以被具体实施为系统、 方法或者计算机程序产品。 因此, 本发明 的各方面、 或各个方面的可能实现方式可以釆用完全硬件实施例、 完全软件 实施例 (包括固件、驻留软件等等), 或者组合软件和硬件方面的实施例的形 式, 在这里都统称为"电路"、 "模块"或者"系统"。 此外, 本发明的各方面、 或各个方面的可能实现方式可以釆用计算机程序产品的形式,计算机程序产 品是指存储在计算机可读介质中的计算机可读程序代码。  When the host is running, the processor 1001 runs the computer execution instruction 1003, and may execute the method flow of the method for accessing the storage device according to any one of Embodiments 1 to 5. The embodiment of the present invention further provides a computer readable medium, comprising: computer execution instructions, when the processor of the computer executes the computer execution instruction, the computer performs the access storage according to any one of Embodiments 1 to 5. Method flow of the method of the device. Those of ordinary skill in the art will appreciate that various aspects of the present invention, or possible implementations of various aspects, can be embodied as a system, method, or computer program product. Thus, aspects of the invention, or possible implementations of various aspects, may be in the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, etc.), or a combination of software and hardware aspects, They are collectively referred to herein as "circuits," "modules," or "systems." Furthermore, aspects of the invention, or possible implementations of various aspects, may take the form of a computer program product, which is a computer readable program code stored on a computer readable medium.
计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。 计算机可读存储介质包含但不限于电子、 磁性、 光学、 电磁、 红外或半导体 系统、 设备或者装置,或者前述的任意适当组合,如随机存取存储器 (RAM)、 只读存储器 (ROM)、 可擦除可编程只读存储器 (EPROM或者快闪存储器)、 光纤、 便携式只读存储器 (CD-ROM:)。  The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing, such as random access memory (RAM), read only memory (ROM), Erase programmable read-only memory (EPROM or flash memory), optical fiber, portable read-only memory (CD-ROM:).
计算机中的处理器读取存储在计算机可读介质中的计算机可读程序代 码, 使得处理器能够执行在流程图中每个步骤、 或各步骤的组合中规定的功 能动作;生成实施在框图的每一块、或各块的组合中规定的功能动作的装置。  The processor in the computer reads the computer readable program code stored in the computer readable medium, such that the processor can perform the functional actions specified in each step or combination of steps in the flowchart; A device that functions as specified in each block, or combination of blocks.
计算机可读程序代码可以完全在用户的计算机上执行、部分在用户的计 算机上执行、 作为单独的软件包、 部分在用户的计算机上并且部分在远程计 算机上, 或者完全在远程计算机或者计算机上执行。 也应该注意, 在某些替 代实施方案中, 在流程图中各步骤、 或框图中各块所注明的功能可能不按图 中注明的顺序发生。 例如, 依赖于所涉及的功能, 接连示出的两个步骤、 或 两个块实际上可能被大致同时执行, 或者这些块有时候可能被以相反顺序执 行。 The computer readable program code can execute entirely on the user's computer, partly on the user's computer, as a separate software package, partly on the user's computer and partly on the remote computer, or entirely on the remote computer or computer. . It should also be noted that in some In the implementations, the functions noted in the various steps of the flowchart or in the blocks of the block diagrams may not occur in the order noted in the drawings. For example, two steps, or two blocks shown in succession may be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结 合来实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特 定应用和设计约束条件。 专业技术人员可以对每个特定的应用来使用不同方 法来实现所描述的功能, 但是这种实现不应认为超出本发明的范围。  Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in a combination of electronic hardware or computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应所述以权利要求的保护范围为准。  The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.

Claims

权 利 要求 Rights request
1、一种访问存储设备的方法,其特征在于,用于基于软件定义存储 SDS 的存储系统, 所述基于 SDS 的存储系统包括主机和所述存储设备, 所述方 法包括:  A method for accessing a storage device, characterized by a storage system for storing an SDS based on a software definition, the SDS-based storage system comprising a host and the storage device, the method comprising:
所述主机中运行于用户空间的软件定义模块截获所述主机的应用程序 发送的输入 /输出 I/O操作指令, 所述 I/O操作指令携带访问地址;  a software definition module running in the user space of the host intercepts an input/output I/O operation instruction sent by an application of the host, where the I/O operation instruction carries an access address;
所述软件定义模块根据所述访问地址, 确定所述 I/O操作指令对应的存 储服务;  Determining, by the software definition module, a storage service corresponding to the I/O operation instruction according to the access address;
所述软件定义模块根据所述 I/O操作指令对应的存储服务和所述 I/O操 作指令,指示所述主机的操作系统内核根据所述访问地址访问所述存储设备; 所述软件定义模块接收所述操作系统内核返回的访问结果;  The software definition module instructs the operating system kernel of the host to access the storage device according to the access address according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction; the software definition module Receiving an access result returned by the operating system kernel;
所述软件定义模块将所述访问结果发送给所述应用程序。  The software definition module sends the access result to the application.
2、 根据权利要求 1 所述的方法, 其特征在于, 所述软件定义模块根据 所述访问地址, 确定所述 I/O操作指令对应的存储服务包括:  The method according to claim 1, wherein the software definition module determines, according to the access address, that the storage service corresponding to the I/O operation instruction comprises:
所述软件定义模块根据所述访问地址, 查询预先配置的地址服务映射表, 以确定所述 I/O操作指令对应的存储服务, 所述地址服务映射表用于记录所 述存储设备的地址与存储服务的对应关系。  The software definition module queries a pre-configured address service mapping table according to the access address to determine a storage service corresponding to the I/O operation instruction, where the address service mapping table is used to record an address of the storage device and The correspondence of storage services.
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述主机中运行于 用户空间的软件定义模块截获所述主机的应用程序发送的输入 /输出 I/O操 作指令包括: 当应用程序使用动态链接库的方式链接操作系统时, 所述软件 定义模块釆用动态链接库预加载的方式, 截获所述应用程序发送的所述 I/O 操作指令。  The method according to claim 1 or 2, wherein the software definition module running in the user space of the host intercepts the input/output I/O operation instructions sent by the application of the host includes: When the program links the operating system by using a dynamic link library, the software definition module intercepts the I/O operation instruction sent by the application by using a dynamic link library preloading manner.
4、 根据权利要求 1或 2所述的方法, 其特征在于, 所述主机中运行于 用户空间的软件定义模块截获所述主机的应用程序发送的输入 /输出 I/O操 作指令包括: 当应用程序使用静态链接库的方式链接操作系统时, 所述软件 定义模块釆用应用程序链接过程控制的方式,截获所述应用程序发送的所述 I/O操作指令。 The method according to claim 1 or 2, wherein the software definition module running in the user space of the host intercepts the input/output I/O operation instructions sent by the application of the host includes: The software definition module intercepts the I/O operation instructions.
5、 根据权利要求 1-4任一项所述的方法, 其特征在于, 所述存储设备 包括緩存装置和存储装置;  The method according to any one of claims 1 to 4, wherein the storage device comprises a cache device and a storage device;
则所述软件定义模块根据所述 I/O操作指令对应的存储服务和所述 I/O 操作指令,指示所述主机的操作系统内核根据所述访问地址访问所述存储设 备包括:  And the software definition module, according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, indicating that the operating system kernel of the host accesses the storage device according to the access address includes:
所述软件定义模块根据所述 I/O操作指令对应的存储服务和所述 I/O操 作指令,指示所述主机的操作系统内核根据所述访问地址访问所述緩存装置, 以通过所述緩存装置访问所述存储装置。  The software definition module instructs the operating system kernel of the host to access the cache device according to the access address according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, to pass the cache The device accesses the storage device.
6、 根据权利要求 5所述的方法, 其特征在于, 所述软件定义模块根据 所述 I/O操作指令对应的存储服务和所述 I/O操作指令, 指示所述主机的操 作系统内核根据所述访问地址访问所述緩存装置, 以通过所述緩存装置访问 所述存储装置包括:  The method according to claim 5, wherein the software definition module instructs the operating system kernel of the host according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction. Accessing the cache device by the access address to access the storage device by using the cache device includes:
当所述 I/O操作指令对应的存储服务中包括高级功能服务, 且所述 I/O 操作指令为读操作指令时, 所述软件定义模块指示所述操作系统内核根据所 述访问地址从所述緩存装置中读取读访问数据;  When the storage service corresponding to the I/O operation instruction includes an advanced function service, and the I/O operation instruction is a read operation instruction, the software definition module instructs the operating system kernel to follow the access address according to the Reading the read access data in the cache device;
则所述软件定义模块接收所述操作系统内核返回的访问结果; 所述软件 定义模块将所述访问结果发送给所述应用程序包括:  The software definition module receives the access result returned by the operating system kernel; the software definition module sends the access result to the application program, including:
所述软件定义模块接收所述操作系统内核返回的所述读访问数据; 所述软件定义模块根据所述 I/O操作指令对应的存储服务中包括的高级 功能服务, 对所述读访问数据执行高级功能操作;  The software definition module receives the read access data returned by the operating system kernel; the software definition module performs the read access data according to an advanced function service included in the storage service corresponding to the I/O operation instruction Advanced function operation;
所述软件定义模块将所述执行高级功能操作之后的所述读访问数据发 送给所述应用程序。  The software definition module sends the read access data after performing the advanced function operation to the application.
7、 根据权利要求 5所述的方法, 其特征在于, 所述软件定义模块根据 所述 I/O操作指令对应的存储服务和所述 I/O操作指令, 指示所述主机的操 作系统内核根据所述访问地址, 访问所述緩存装置, 以通过所述緩存装置访 问所述存储装置包括: The method according to claim 5, wherein the software definition module instructs the operating system kernel of the host according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction. The access address, accessing the cache device to access through the cache device Asking the storage device includes:
当所述 I/O操作指令对应的存储服务中包括高级功能服务, 且所述 I/O 操作指令为写操作指令时, 所述 I/O操作指令还携带写数据;  When the storage service corresponding to the I/O operation instruction includes an advanced function service, and the I/O operation instruction is a write operation instruction, the I/O operation instruction further carries write data;
所述软件定义模块根据所述 I/O操作指令对应的存储服务中包括的高级 功能服务对所述写数据执行高级功能操作;  The software definition module performs an advanced function operation on the write data according to an advanced function service included in the storage service corresponding to the I/O operation instruction;
所述软件定义模块指示所述操作系统内核将所述访问地址和所述执行 高级功能操作之后的所述写数据写入到所述緩存装置中, 以使得所述緩存装 置根据所述访问地址将所述执行高级功能操作之后的所述写数据写入到所 述存储装置中;  The software definition module instructs the operating system kernel to write the access address and the write data after performing the advanced function operation to the cache device, such that the cache device will be based on the access address Writing the write data after performing the advanced function operation to the storage device;
则所述软件定义模块接收所述操作系统内核返回的访问结果; 所述软件 定义模块将所述访问结果发送给所述应用程序包括:  The software definition module receives the access result returned by the operating system kernel; the software definition module sends the access result to the application program, including:
所述软件定义模块接收所述操作系统内核返回的写数据结果; 所述软件定义模块将所述写数据结果发送给所述应用程序。  The software definition module receives a write data result returned by the operating system kernel; the software definition module sends the write data result to the application.
8、 根据权利要求 5所述的方法, 其特征在于, 所述软件定义模块根据 所述 I/O操作指令对应的存储服务和所述 I/O操作指令, 指示所述主机的操 作系统内核根据所述访问地址, 访问所述緩存装置, 以通过所述緩存装置访 问所述存储装置包括:  The method according to claim 5, wherein the software definition module instructs the operating system kernel of the host to be based on the storage service corresponding to the I/O operation instruction and the I/O operation instruction. The accessing address, accessing the cache device to access the storage device by using the cache device includes:
当所述 I/O操作指令对应的存储服务中不包括高级功能服务,且所述 I/O 操作指令为读操作指令时, 所述软件定义模块指示所述主机的操作系统内核 根据所述访问地址从所述緩存装置中读取读访问数据;  When the I/O operation instruction corresponding to the I/O operation instruction does not include the advanced function service, and the I/O operation instruction is a read operation instruction, the software definition module instructs the host operating system kernel to perform the access according to the The address reads the read access data from the cache device;
则所述软件定义模块接收所述操作系统内核返回的访问结果; 所述软件 定义模块将所述访问结果发送给所述应用程序包括:  The software definition module receives the access result returned by the operating system kernel; the software definition module sends the access result to the application program, including:
所述软件定义模块接收所述操作系统内核返回的所述读访问数据; 所述软件定义模块将所述读访问数据发送给所述应用程序。  The software definition module receives the read access data returned by the operating system kernel; the software definition module sends the read access data to the application.
9、 根据权利要求 5所述的方法, 其特征在于, 所述软件定义模块根据 所述 I/O操作指令对应的存储服务和所述 I/O操作指令, 指示所述主机的操 作系统内核根据所述访问地址, 访问所述緩存装置, 以通过所述緩存装置访 问所述存储装置包括: The method according to claim 5, wherein the software definition module indicates the operation of the host according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction. Accessing the cache device by the system kernel according to the access address to access the storage device by using the cache device includes:
当所述 I/O操作指令对应的存储服务中不包括高级功能服务,且所述 I/O 操作指令为写操作指令时, 所述 I/O操作指令还携带写数据;  When the I/O operation instruction corresponding to the I/O operation instruction does not include the advanced function service, and the I/O operation instruction is a write operation instruction, the I/O operation instruction further carries the write data;
所述软件定义模块指示所述操作系统内核将所述访问地址和所述写数 据写入到所述緩存装置中 , 以使得所述緩存装置根据所述访问地址将所述写 数据写入到所述存储装置中;  The software definition module instructs the operating system kernel to write the access address and the write data into the cache device, such that the cache device writes the write data to the location according to the access address In the storage device;
则所述软件定义模块接收所述操作系统内核返回的访问结果; 所述软件 定义模块将所述访问结果发送给所述应用程序包括:  The software definition module receives the access result returned by the operating system kernel; the software definition module sends the access result to the application program, including:
所述软件定义模块接收所述操作系统内核返回的写数据结果;  The software definition module receives a write data result returned by the operating system kernel;
所述软件定义模块将所述写数据结果发送给所述应用程序。  The software definition module sends the write data result to the application.
10、 一种访问存储设备的主机, 其特征在于, 用于基于软件定义存储 SDS 的存储系统, 所述主机包括应用程序、 操作系统内核和软件定义模块; 其中, 所述软件定义模块运行于所述主机的用户空间;  A host for accessing a storage device, characterized by a storage system for storing an SDS based on a software definition, the host comprising an application, an operating system kernel, and a software definition module; wherein the software definition module runs in the The user space of the host;
所述软件定义模块用于截获所述应用程序发送的输入 /输出 I/O操作指 令, 所述 I/O操作指令携带访问地址, 根据所述访问地址, 确定所述 I/O操 作指令对应的存储服务, 根据所述 I/O操作指令对应的存储服务和所述 I/O 操作指令, 指示所述操作系统内核根据所述访问地址访问所述基于 SDS 的 存储系统中的存储设备;  The software definition module is configured to intercept an input/output I/O operation instruction sent by the application, where the I/O operation instruction carries an access address, and according to the access address, determines an I/O operation instruction corresponding to the The storage service, according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, instructing the operating system kernel to access the storage device in the SDS-based storage system according to the access address;
所述操作系统内核用于根据所述软件定义模块的指示和所述访问地址 访问所述存储设备, 并将访问结果返回给所述软件定义模块;  The operating system kernel is configured to access the storage device according to the indication of the software definition module and the access address, and return an access result to the software definition module;
所述软件定义模块用于接收所述操作系统内核返回的所述访问结果,将 所述访问结果发送给所述应用程序。  The software definition module is configured to receive the access result returned by the operating system kernel, and send the access result to the application.
11、 根据权利要求 10所述的主机, 其特征在于, 所述软件定义模块具 体用于根据所述访问地址,查询预先配置的地址服务映射表,以确定所述 I/O 操作指令对应的存储服务, 所述地址服务映射表用于记录所述存储设备的地 址与存储服务的对应关系。 The host according to claim 10, wherein the software definition module is configured to query a pre-configured address service mapping table according to the access address to determine a storage corresponding to the I/O operation instruction. Service, the address service mapping table is used to record the location of the storage device The correspondence between the address and the storage service.
12、 根据权利要求 10或 11所述的主机, 其特征在于, 所述软件定义模 块具体用于当应用程序使用动态链接库的方式链接操作系统时,釆用动态链 接库预加载的方式, 截获所述应用程序发送的所述 I/O操作指令。  The host according to claim 10 or 11, wherein the software definition module is specifically configured to use a dynamic link library preloading method to intercept an operating system when the application uses a dynamic link library to link the operating system. The I/O operation instruction sent by the application.
13、 根据权利要求 10或 11所述的主机, 其特征在于, 所述软件定义模 块具体用于当应用程序使用静态链接库的方式链接操作系统时,釆用应用程 序链接过程控制的方式, 截获所述应用程序发送的所述 I/O操作指令。  The host according to claim 10 or 11, wherein the software definition module is specifically configured to use an application link process control method to intercept an operating system when the application uses a static link library to link the operating system. The I/O operation instruction sent by the application.
14、 根据权利要求 10-13任一项所述的主机, 其特征在于, 所述存储设 备包括緩存装置和存储装置;  The host according to any one of claims 10 to 13, wherein the storage device comprises a cache device and a storage device;
则所述软件定义模块具体用于根据所述 I/O操作指令对应的存储服务和 所述 I/O操作指令, 指示所述主机的操作系统内核根据所述访问地址访问所 述緩存装置;  The software definition module is specifically configured to: according to the storage service corresponding to the I/O operation instruction and the I/O operation instruction, instruct the operating system kernel of the host to access the cache device according to the access address;
所述操作系统内核具体用于根据所述软件定义模块的指示和所述访问 地址, 访问所述緩存装置, 以通过所述緩存装置访问所述存储装置。  The operating system kernel is specifically configured to access the cache device according to the indication of the software definition module and the access address to access the storage device by using the cache device.
15、 根据权利要求 14所述的主机, 其特征在于, 所述软件定义模块具 体用于当所述 I/O操作指令对应的存储服务中包括高级功能服务,且所述 I/O 操作指令为读操作指令时,指示所述操作系统内核根据所述访问地址从所述 緩存装置中读取读访问数据;  The host according to claim 14, wherein the software definition module is specifically configured to include an advanced function service in a storage service corresponding to the I/O operation instruction, and the I/O operation instruction is Reading the operation instruction, instructing the operating system kernel to read the read access data from the cache device according to the access address;
所述操作系统内核具体用于根据所述软件定义模块的指示和所述访问 地址, 从所述緩存装置中读取读访问数据, 并将所述读访问数据返回给所述 软件定义模块;  The operating system kernel is specifically configured to read read access data from the cache device according to the indication of the software definition module and the access address, and return the read access data to the software definition module;
所述软件定义模块具体用于接收所述操作系统内核返回的所述读访问 数据, 根据所述 I/O操作指令对应的存储服务中包括的高级功能服务, 对所 述读访问数据执行高级功能操作,将所述执行高级功能操作之后的所述读访 问数据发送给所述应用程序。  The software definition module is specifically configured to receive the read access data returned by the operating system kernel, and perform advanced functions on the read access data according to an advanced function service included in the storage service corresponding to the I/O operation instruction. An operation of transmitting the read access data after performing the advanced function operation to the application.
16、 根据权利要求 14所述的主机, 其特征在于, 所述软件定义模块具 体用于当所述 I/O操作指令对应的存储服务中包括高级功能服务,且所述 I/O 操作指令为写操作指令时, 根据所述 I/O操作指令对应的存储服务中包括的 高级功能服务, 对所述 I/O操作指令携带的写数据执行高级功能操作, 指示 所述操作系统内核将所述访问地址和所述执行高级功能操作之后的所述写 数据写入到所述緩存装置中; 16. The host of claim 14, wherein the software defined module has When the storage service corresponding to the I/O operation instruction includes an advanced function service, and the I/O operation instruction is a write operation instruction, according to the storage service corresponding to the I/O operation instruction And an advanced function service, performing an advanced function operation on the write data carried by the I/O operation instruction, instructing the operating system kernel to write the access address and the write data after performing the advanced function operation to the Cache device;
所述操作系统内核具体用于根据所述软件定义模块的指示,将所述访问 地址和所述执行高级功能操作之后的所述写数据写入到所述緩存装置中, 以 使得所述緩存装置根据所述访问地址将所述执行高级功能操作之后的所述 写数据写入到所述存储装置中, 接收所述緩存装置返回的写数据结果, 将所 述写数据结果返回给所述软件定义模块;  The operating system kernel is specifically configured to write the access address and the write data after performing the advanced function operation to the cache device according to an indication of the software definition module, so that the cache device Writing the write data after performing the advanced function operation to the storage device according to the access address, receiving a write data result returned by the cache device, and returning the write data result to the software definition Module
所述软件定义模块具体用于接收所述操作系统内核返回的所述写数据 结果, 将所述写数据结果发送给所述应用程序。  The software definition module is specifically configured to receive the write data result returned by the operating system kernel, and send the write data result to the application.
17、 根据权利要求 14所述的主机, 其特征在于, 所述软件定义模块具 体用于当所述 I/O操作指令对应的存储服务中不包括高级功能服务, 且所述 I/O操作指令为读操作指令时, 指示所述主机的操作系统内核根据所述访问 地址从所述緩存装置中读取读访问数据;  The host according to claim 14, wherein the software definition module is specifically configured to not include an advanced function service in a storage service corresponding to the I/O operation instruction, and the I/O operation instruction When the operation instruction is read, the operating system kernel of the host is instructed to read the read access data from the cache device according to the access address;
所述操作系统内核具体用于根据所述软件定义模块的指示和所述访问 地址, 从所述緩存装置中读取读访问数据, 并将所述读访问数据返回给所述 软件定义模块;  The operating system kernel is specifically configured to read read access data from the cache device according to the indication of the software definition module and the access address, and return the read access data to the software definition module;
所述软件定义模块具体用于接收所述操作系统内核返回的所述读访问 数据, 将所述读访问数据发送给所述应用程序。  The software definition module is specifically configured to receive the read access data returned by the operating system kernel, and send the read access data to the application.
18、 根据权利要求 14所述的主机, 其特征在于, 所述软件定义模块具 体用于当所述 I/O操作指令对应的存储服务中不包括高级功能服务, 且所述 I/O操作指令为写操作指令时, 指示所述操作系统内核将所述访问地址和所 述 I/O操作指令携带的写数据写入到所述緩存装置中;  The host according to claim 14, wherein the software definition module is specifically configured to not include an advanced function service in a storage service corresponding to the I/O operation instruction, and the I/O operation instruction When the operation instruction is written, the operating system kernel is instructed to write the access address and the write data carried by the I/O operation instruction into the cache device;
所述操作系统内核具体用于根据所述软件定义模块的指示,将所述访问 地址和所述写数据写入到所述緩存装置中, 以使得所述緩存装置根据所述访 问地址将所述写数据写入到所述存储装置中,接收所述緩存装置返回的写数 据结果, 将所述写数据结果返回给所述软件定义模块; The operating system kernel is specifically configured to perform the access according to an indication of the software definition module Writing an address and the write data to the cache device, such that the cache device writes the write data to the storage device according to the access address, and receives a write data result returned by the cache device Returning the write data result to the software definition module;
则所述软件定义模块具体用于接收所述操作系统内核返回的写数据结 果, 将所述写数据结果发送给所述应用程序。  The software definition module is specifically configured to receive a write data result returned by the operating system kernel, and send the write data result to the application.
19、 一种访问存储设备的主机, 其特征在于, 所述主机包括处理器、 存 储器、 总线和通信接口;  19. A host for accessing a storage device, the host comprising a processor, a memory, a bus, and a communication interface;
所述存储器用于存储计算机执行指令, 所述处理器与所述存储器通过所 述总线连接, 当所述主机运行时, 所述处理器执行所述存储器存储的所述计 算机执行指令, 以使所述主机执行如权利要求 1-9中任一项所述的访问存储 设备的方法。  The memory is configured to store a computer execution instruction, the processor is connected to the memory through the bus, and when the host is running, the processor executes the computer execution instruction stored in the memory, so that A method of accessing a storage device according to any of claims 1-9.
20、 一种计算机可读介质, 其特征在于, 包括计算机执行指令, 以供计 算机的处理器执行所述计算机执行指令时, 所述计算机执行如权利要求 1-9 中任一项所述的访问存储设备的方法。  20. A computer readable medium, comprising: computer-executing instructions for execution by a processor of a computer to execute an instruction according to any one of claims 1-9 The method of storing devices.
PCT/CN2014/081214 2014-06-30 2014-06-30 Method for accessing storage device, and host WO2016000147A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201480002085.5A CN105830038B (en) 2014-06-30 2014-06-30 A kind of method and host of access storage equipment
PCT/CN2014/081214 WO2016000147A1 (en) 2014-06-30 2014-06-30 Method for accessing storage device, and host

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/081214 WO2016000147A1 (en) 2014-06-30 2014-06-30 Method for accessing storage device, and host

Publications (1)

Publication Number Publication Date
WO2016000147A1 true WO2016000147A1 (en) 2016-01-07

Family

ID=55018241

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/081214 WO2016000147A1 (en) 2014-06-30 2014-06-30 Method for accessing storage device, and host

Country Status (2)

Country Link
CN (1) CN105830038B (en)
WO (1) WO2016000147A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107764A (en) * 2023-04-03 2023-05-12 阿里云计算有限公司 Data processing method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091476A1 (en) * 1999-07-01 2005-04-28 International Business Machines Corporation Apparatus for supporting a logically partitioned computer system
CN1655129A (en) * 2005-02-25 2005-08-17 清华大学 Universal method for dynamical management of storage resource under Windows platform
CN102696020A (en) * 2009-11-16 2012-09-26 赛门铁克公司 Selective file system caching based upon a configurable cache map
CN103246542A (en) * 2012-02-01 2013-08-14 中兴通讯股份有限公司 Intelligent cache and intelligent terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9069553B2 (en) * 2011-09-06 2015-06-30 Marvell World Trade Ltd. Switching tasks between heterogeneous cores
CN103391256B (en) * 2013-07-25 2016-01-13 武汉邮电科学研究院 A kind of base station user face data processing optimization method based on linux system
CN103647658B (en) * 2013-11-27 2016-12-07 华为技术有限公司 The management method of the network equipment and controller in a kind of software defined network system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091476A1 (en) * 1999-07-01 2005-04-28 International Business Machines Corporation Apparatus for supporting a logically partitioned computer system
CN1655129A (en) * 2005-02-25 2005-08-17 清华大学 Universal method for dynamical management of storage resource under Windows platform
CN102696020A (en) * 2009-11-16 2012-09-26 赛门铁克公司 Selective file system caching based upon a configurable cache map
CN103246542A (en) * 2012-02-01 2013-08-14 中兴通讯股份有限公司 Intelligent cache and intelligent terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107764A (en) * 2023-04-03 2023-05-12 阿里云计算有限公司 Data processing method and system
CN116107764B (en) * 2023-04-03 2023-09-26 阿里云计算有限公司 Data processing method and system

Also Published As

Publication number Publication date
CN105830038B (en) 2019-03-05
CN105830038A (en) 2016-08-03

Similar Documents

Publication Publication Date Title
US10877940B2 (en) Data storage with a distributed virtual array
TWI752066B (en) Method and device for processing read and write requests
KR101993915B1 (en) Efficient live-transfer of remotely accessed data
CN109791471B (en) Virtualizing non-volatile storage at a peripheral device
TWI621023B (en) Systems and methods for supporting hot plugging of remote storage devices accessed over a network via nvme controller
US9858015B2 (en) Solid-state storage management
US9342448B2 (en) Local direct storage class memory access
JP5658197B2 (en) Computer system, virtualization mechanism, and computer system control method
EP3660686B1 (en) Method and device for transmitting data processing request
US9298375B2 (en) Method and apparatus for returning reads in the presence of partial data unavailability
US9182912B2 (en) Method to allow storage cache acceleration when the slow tier is on independent controller
KR20080031150A (en) Intelligent storage engine for disk drive operations with reduced local bus traffic
US10275175B2 (en) System and method to provide file system functionality over a PCIe interface
US9424205B2 (en) System and method for SATA virtualization and domain protection
US9361123B2 (en) Boot from logical volume spanning plurality of PCI devices
CN112015352B (en) Storage block device identification device, system and storage block device reading and writing method
US11507292B2 (en) System and method to utilize a composite block of data during compression of data blocks of fixed size
US9959050B2 (en) In-memory data storage with transparent compression
US8489686B2 (en) Method and apparatus allowing scan of data storage device from remote server
US9940155B1 (en) Protocol endpoint object duality
EP4148572B1 (en) Computational storage device and storage system including the computational storage device
WO2016000147A1 (en) Method for accessing storage device, and host
US10530870B2 (en) Direct volume migration in a storage area network
WO2017119918A1 (en) Virtual machine messaging
WO2021052230A1 (en) Storage system, storage node, and data storage method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14896664

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14896664

Country of ref document: EP

Kind code of ref document: A1