WO2016119322A1 - 确定读写路径的方法和装置 - Google Patents
确定读写路径的方法和装置 Download PDFInfo
- Publication number
- WO2016119322A1 WO2016119322A1 PCT/CN2015/077479 CN2015077479W WO2016119322A1 WO 2016119322 A1 WO2016119322 A1 WO 2016119322A1 CN 2015077479 W CN2015077479 W CN 2015077479W WO 2016119322 A1 WO2016119322 A1 WO 2016119322A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- read
- address
- virtual
- write
- virtual address
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0662—Virtualisation aspects
- G06F3/0664—Virtualisation aspects at device level, e.g. emulation of a storage device or system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/10—Address translation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/10—Address translation
- G06F12/109—Address translation for multiple virtual address spaces, e.g. segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0635—Configuration or reconfiguration of storage systems by changing the path, e.g. traffic rerouting, path reconfiguration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
Definitions
- the present invention relates to the field of computers, and more particularly to a method and apparatus for determining read and write paths.
- Virtualization includes computing virtualization, network virtualization, and storage virtualization.
- Storage virtualization provides storage and storage services for virtual machines, such as snapshots of virtual machine storage and storage hot migration.
- Providing storage for virtual machines by storing front-end and end-end methods is the mainstream use of current storage virtualization.
- the data read and write request is first sent to the storage front-end driver, and the storage front-end driver puts the read/write request To the storage front end (Storage fronted) and the storage back end (Storage backend) shared input and output (Input Output, IO) ring, and then send an interrupt to the storage back end, the storage back end receives the interrupt notification, and then removes from the IO ring
- the read/write request is then sent to path 1 or path 2 of FIG. 1 according to the virtual machine configuration. Specifically, when the virtual machine is started, the virtual machine configuration file determines which path to take.
- Path 1 does not store advanced services, or storage advanced services depend on a storage area network (SAN) or a virtual SAN, but the path is short and the storage delay is small, resulting in high storage performance.
- Path 2 has storage advanced services and has multiple storage functions, such as snapshots of virtual machines, virtual machine storage hot migration, virtual machine storage thin provisioning, etc., but the path of path 2 is long and the storage delay is large. To make storage performance worse.
- the current virtual machine determines which path the read/write request takes according to the virtual machine configuration file. It cannot flexibly handle the read and write requests according to the requirements of the read and write requests, and cannot balance the storage performance and storage functions.
- the present invention provides a method and apparatus for determining a read/write path, which can be based on the requirements of a read and write request. Handle read and write requests with the appropriate path to balance storage performance and storage.
- a method for determining a read/write path is provided, the method being used for a physical host, the physical host comprising a hardware layer, a host Host running on the hardware layer, and a virtual machine running on the Host,
- the host includes a block device and a virtual block device, and the method includes: the host acquires a first read/write request of the virtual machine, the first read/write request includes a first virtual address, and the first virtual address is searched in the address translation information set, where the address
- the conversion information set includes a correspondence between the virtual address and the information of the physical block device, the information of the physical block device includes a read/write identifier, and the first virtual address is included in the address translation information set, and the first read/write request is a read request.
- the first read/write request is processed by the block device corresponding to the first virtual address; or the first virtual address is included in the address transfer information set, the first read/write request is a write request, and the first read corresponding to the first virtual address
- the first read/write request is processed by the block device corresponding to the first virtual address in the case where the write identifier indicates readable and writable; or, in the address conversion letter
- the first virtual address is included in the information set, and the first read/write request is a write request, and the first virtual read/write identifier corresponding to the first virtual address indicates read-only, and the first virtual address device corresponding to the first virtual address processes the first
- the read/write request is received; or, if the first virtual address is not included in the address translation information set, the first read/write request is processed by the virtual block device corresponding to the first virtual address.
- the information of the physical block device further includes a physical block device identifier and a physical address
- processing, by the block device corresponding to the first virtual address, the first read/write request includes: The read/write request is converted into a block device read/write request, and the block device read/write request includes a first physical address corresponding to the first virtual address and a first physical block device identifier; and the block device reads and writes the request by the block device corresponding to the first virtual address.
- the method further includes: deleting the initial record corresponding to the first virtual address in the address translation information set.
- the method further includes: acquiring, according to the first read/write request, the first virtual The first physical address corresponding to the address, the first physical block device identifier, and the first read/write identifier are added; the corresponding relationship between the obtained first virtual address, the first physical address, the first physical block device identifier, and the first read/write identifier is added. Go to the address translation information set.
- the method further includes The first physical address corresponding to the first virtual address, the first physical block device identifier, and the first read/write identifier are obtained according to the first read/write request; the first virtual address, the first physical address, and the first physical block to be obtained are obtained. The correspondence between the device identifier and the first read/write identifier is added to the address translation information set.
- the method further includes: determining whether to enable the storage advanced service; Finding the first virtual address in the conversion information set includes: searching for the first virtual address in the address translation information set if the storage advanced service is not enabled.
- determining whether to enable the storing the advanced service includes: acquiring a path switching indication, where the path switching indication is used to indicate whether to enable the storage advanced service; determining whether the path switching indication is performed according to the path switching indication Turn on storage advanced services.
- the information of the physical block device further includes a physical address and a physical block device identifier.
- the method further includes: acquiring the first physical address corresponding to the first virtual address and the first physical block device identifier; a format of the virtual disk corresponding to the virtual address, determining a first read/write identifier corresponding to the first virtual address, and creating an address translation information set, where the address translation information set includes a first virtual address, a first physical address, a first physical block device identifier, and The correspondence between the first read and write identifiers.
- determining, according to a format of the virtual disk corresponding to the first virtual address, a first read/write identifier corresponding to the first virtual address including: in the first virtual When the address corresponds to the thick provisioning virtual disk or the thin provisioned disk, it is determined that the first read/write identifier indicates that the first read/write identifier is readable and writable; and when the first virtual address corresponds to the differential mirror virtual disk, and the first virtual address corresponds to the submirror file, Determining that the first read/write identifier indicates that the first read/write identifier indicates read-only, and the first virtual address corresponds to the differential image virtual disk, and the first virtual address corresponds to the parent image file.
- the obtaining the first read/write request includes: from the storage front end and after storage Obtaining a second read/write request of the virtual machine in the shared input and output IO ring, the second read/write request includes a second virtual address; and the first read/write request is split from the second read/write request, and the first virtual address is A partial virtual address in the second virtual address.
- a device for determining a read/write path is provided, the device being applied to a physical host,
- the physical host runs a virtual machine
- the device includes: a storage backend module, configured to: acquire a first read/write request of the virtual machine, where the first read/write request includes a first virtual address; and the first virtual address is found in the address translation information set An address, where the address translation information set includes a correspondence between the virtual address and the information of the physical block device, the information of the physical block device includes a read/write identifier, and the block device is configured to include the first virtual address in the address translation information set, and the When the read/write request is a read request, or the first virtual address is included in the address transfer information set, the first read/write request is a write request, and the first read/write identifier corresponding to the first virtual address indicates readability and writability.
- the first read/write request is processed, and the virtual block device is configured to include the first virtual address in the address translation information set, the first read/write request is a write request, and the first read/write identifier corresponding to the first virtual address In the case of indicating read-only, or in the case where the first virtual address is not included in the address translation information set, the virtual block corresponding to the first virtual address is set.
- the first process read and write requests.
- the information of the physical block device further includes a physical block device identifier and a physical address
- the storage backend module is further configured to: convert the first read/write request into The block device read and write request includes a first physical address corresponding to the first virtual address and a first physical block device identifier, and the block device is specifically configured to process the block device read and write request.
- the storage back end module is further configured to include a first virtual address in the address translation information set, where the first read/write request is a write request, and When the first read/write identifier corresponding to a virtual address indicates read-only, the initial record corresponding to the first virtual address is deleted in the address translation information set.
- the device further includes: a first acquiring module, configured to: when the first virtual address is not included in the address translation information set, The first physical address corresponding to the first virtual address, the first physical block device identifier, and the first read/write identifier are obtained by the first read/write request; the first virtual address obtained by the first obtaining module by the storage backend module and the first physical The correspondence between the address, the first physical block device identifier, and the first read/write identifier is added to the address translation information set.
- a first acquiring module configured to: when the first virtual address is not included in the address translation information set, The first physical address corresponding to the first virtual address, the first physical block device identifier, and the first read/write identifier are obtained by the first read/write request; the first virtual address obtained by the first obtaining module by the storage backend module and the first physical The correspondence between the address, the first physical block device identifier, and the first read/write identifier is added to the address translation information set.
- the apparatus further includes: a first acquiring module, configured to acquire the first virtual address according to the first read/write request Corresponding first physical address, first physical block device identifier, and first read/write identifier; the storage backend module is further configured to use the first virtual address, the first physical address, and the first physical block device identifier acquired by the first obtaining module The correspondence with the first read/write identifier is added to the address translation information set.
- the storage backend module is specifically configured to: determine whether to enable the storage advanced service; in the case that the storage advanced service is not enabled, in the address translation information set Find the first virtual address.
- the device further includes: a second acquiring module, configured to obtain a path switching indication, where the path switching indication is used to indicate Whether to enable the storage advanced service; the storage backend module is specifically configured to determine whether to open the storage advanced service according to the path switching indication.
- the information of the physical block device is further The device includes: a third obtaining module, configured to: before the first back-end module obtains the first read/write request, if the first virtual address is included in the address translation information set, Obtaining a first physical address corresponding to the first virtual address and a first physical block device identifier; determining, according to a format of the virtual disk corresponding to the first virtual address, a first read/write identifier corresponding to the first virtual address; The address translation information set is created.
- the address translation information set includes a correspondence between the first virtual address, the first physical address, the first physical block device identifier, and the first read/write identifier.
- the third acquiring module is specifically configured to: correspond to the thick provisioning virtual disk or the thin provisioning disk in the first virtual address
- the first read/write identifier indicates that the first read/write identifier is readable and writable
- the first virtual address corresponds to the differential image virtual disk
- the first virtual address corresponds to the submirror file
- the first read/write identifier indication may be determined. Read and write; in the case that the first virtual address corresponds to the differential mirror virtual disk, and the first virtual address corresponds to the parent image file, it is determined that the first read/write identifier indicates read-only.
- the storage back end is specifically used for Obtaining a second read/write request of the virtual machine from the input and output IO ring shared by the storage front end and the storage back end, the second read/write request includes a second virtual address; and the first read/write is split from the second read/write request
- the first virtual address is a partial virtual address in the second virtual address.
- a physical host in a third aspect, includes a hardware layer, a host Host running on the hardware layer, and a virtual machine running on the Host.
- the Host includes a block device and a virtual block device, and the Host includes, for example, The second to the ninth possible implementation of the second aspect or the second aspect Means for determining a read/write path as described in any of the possible implementations.
- the embodiment of the invention has the following beneficial effects:
- the method and apparatus for determining the read/write path determine the appropriate read/write path according to the virtual address of the read/write request and the address translation information set, and can balance the storage performance and the storage function.
- 1 is a schematic block diagram of a virtual storage device
- FIG. 2 is a schematic block diagram of a system to which an embodiment of the present invention is applied;
- FIG. 3 is a schematic flowchart of a method for determining a read/write path according to an embodiment of the present invention
- FIG. 4 is a schematic flowchart of a method for determining a read/write path according to another embodiment of the present invention.
- FIG. 5 is a schematic flowchart of initializing an address translation information set according to an embodiment of the present invention.
- FIG. 6 is a schematic block diagram of an apparatus for determining a read/write path according to an embodiment of the present invention.
- FIG. 7 is a schematic flowchart of a method for determining a read/write path according to another embodiment of the present invention.
- FIG. 8 is a schematic block diagram of an apparatus for determining a read/write path according to an embodiment of the present invention.
- FIG. 9 is a schematic block diagram of an apparatus for determining a read/write path according to another embodiment of the present invention.
- FIG. 10 is a schematic block diagram of an apparatus for determining a read/write path according to another embodiment of the present invention.
- FIG. 11 is a schematic block diagram of a physical host in accordance with an embodiment of the present invention.
- FIG. 2 is a schematic diagram showing a system architecture to which a method for determining a read/write path is performed according to an embodiment of the present invention. It should be understood that FIG. 2 is only a schematic explanatory diagram for convenience of understanding, and does not limit the composition mode of the system architecture. As shown in Figure 2, the system architecture can include:
- the physical host 210 and/or the physical host 220, the physical host 210, and/or the physical host 220 may be physical hosts, terminal computers, etc., which are not limited by the present invention.
- FC Fiber Channel
- IP Internet Protocol
- FCSAN Fibre Channel Storage Area Network
- IPSAN Internet Protocol Storage Area Network
- the physical host 210 adopts the XEN virtualization technology, and the physical host 220 adopts a KVM (Kernel-based Virtual Machine) virtualization technology.
- KVM Kernel-based Virtual Machine
- the physical host 210 may include: a Host Operating System (Host OS) 211, one or more virtual machines (VMs) 212, a virtual monitor 213, and a local disk 214. , HBA (Host Bus Adapter) card 215 and network card 22.
- HOS Host Operating System
- VMs virtual machines
- a local disk 214 a local disk 214
- HBA Hypervisor
- the host operating system 211 includes storage virtualization, which may include: storage backend drivers, virtual disks, file systems, and block devices, etc., such as shown in FIG.
- the virtual machine 212 can run a database, a desktop, and the like.
- the virtual machine 212 may include a storage front end, which is a disk drive in the virtual machine, and can interact with the storage virtualization in the host operating system to transfer the data in the virtual machine to the host operating system.
- a virtual monitor (hypervisor) that simulates a physical host.
- the HBA card 215 is similar to the network card 214, and the physical host 210 is connected to the switch or storage device via the HBA card or network card 214.
- the physical host 220 is similar to the physical host 210 in FIG. 2, and each module in the physical host 220 corresponds to each module in the physical host 210, and details are not described herein.
- the FC switch 230 and the IP switch 240 are configured to forward data output by the physical hosts 210 and 220 to the corresponding SAN side.
- FCSAN 240 connects HBA cards/network cards, switches, and/or storage arrays over fiber optic networks.
- IPSAN 250 which connects HBA cards/network cards, switches, and/or storage arrays over an IP network.
- FIG. 2 is an exemplary illustration of a system applicable to the method for determining a read/write path according to an embodiment of the present invention.
- the physical host 210 and the physical host 220 in the illustrated example are used as examples to describe physical hosts that may be supported in the system.
- the type of virtualization technology, and the types of physical hosts that may be supported in the system are not limited thereto, and the FC switch 230 and the IP switch 240 in the illustration indicate the types of switches that the system may support, and the types of switches that may be supported in the system.
- the embodiment of the present invention is not limited thereto, and may include one or more physical hosts of the same or different types of technologies, and may include one or more switches of the same type or different types.
- FIG. 1 is a schematic diagram of a processing flow of a read/write request by any one of the physical hosts in the system shown in FIG. 2 using the prior art path 1 and path 2.
- the storage backend sends the read/write request to the tapdev block device, the tapdev block device is created when the virtual machine is started, and the tapdev block device receives the read/write command and puts the user state tapdisk and tapdev shared memory.
- the IO ring then wakes up the tapdisk process.
- the read and write data command in the IO ring is taken out, and then the data read and write request is given to the corresponding disk image file driver.
- the disk image file driver processes the read and write commands according to the disk format, it converts to read and write operations on the file. Then call the file system's read-write interface to read and write data.
- the file system After the file system receives the read and write commands, it passes through the file system metadata, converts it into a block device, and then goes to the SCSI driver. If the physical address corresponding to the read/write request is not located on the local disk, the HBA card or the network card is used to reach the SAN side, and the corresponding target storage array in the IPSAN or FCSAN is read and written. Alternatively, if the physical address corresponding to the read/write request is on the local disk, the local disk is directly called to perform read and write operations corresponding to the read/write request.
- the storage backend When the read/write request goes to path 1, the storage backend directly sends the command to read and write data to the preset SCSI block device, and the read/write request follows the SCSI driver layer. If the physical address corresponding to the read/write request is not located on the local disk, the HBA card or the network card is used to reach the SAN side, and the corresponding target storage array in the IPSAN or FCSAN is read and written. Alternatively, if the physical address corresponding to the read/write request is on the local disk, the local disk is directly called to perform read and write operations corresponding to the read/write request.
- FIG. 3 is a schematic flowchart of a method 300 of determining a read/write path according to an embodiment of the present invention.
- the method of Figure 3 can be used for a physical host that includes a hardware layer that operates in the hardware layer Host on the host, and a virtual machine running on the host, the host includes a block device and a virtual block device.
- method 300 can include the following.
- the host acquires a first read/write request of the virtual machine, where the first read/write request includes a first virtual address.
- the storage backend in the Host obtains the first read and write request from the IO ring shared by the storage backend and the storage frontend.
- the first read and write request may also include a read and write type and read and write content.
- the first read and write request is any read or write request of the virtual machine.
- the first virtual address may be a logical block address (LBA), or may be an address represented by another addressing mode, which is not limited in this embodiment of the present invention.
- LBA logical block address
- the first virtual address can be an address or multiple addresses.
- the address in the embodiment of the present invention may be represented by a start address and an address length.
- the address translation information set includes a correspondence between the virtual address and the information of the physical block device, and the information of the physical block device includes the read/write identifier.
- the information of the physical block device may further include a physical block device identifier and a physical address.
- the address translation information set may be stored in the form of a table, a tree, or the like. The storage format of the address translation information set is not limited in the embodiment of the present invention.
- the set of address translation information may be stored in the storage backend of the Host, and step 302 may be performed by the storage backend.
- the first read/write request is processed by the block device corresponding to the first virtual address;
- the first virtual address is included in the address translation information set, and the first read/write request is a write request, and the first virtual read/write identifier corresponding to the first virtual address indicates that the first virtual read/write identifier indicates that the block corresponding to the first virtual address is
- the device processes the first read and write request; or,
- the first read/write request is a write request
- the first read/write identifier corresponding to the first virtual address indicates read-only
- the virtual block device corresponding to the first virtual address Handling the first read and write request
- the first read/write request is processed by the virtual block device corresponding to the first virtual address.
- the host may include multiple block devices and multiple virtual block devices, and the block device has a corresponding relationship with the physical block devices allocated to the virtual disks in the hardware layer, and the virtual block devices and the virtual disks in the virtual machine Have a corresponding relationship.
- the physical block device identifier corresponding to the virtual address of the read/write request can be determined, and the correspondence between the physical block device of the hardware layer and the block device in the Host is recorded in the Host, so that the read/write can be determined.
- the block device corresponding to the requested virtual address can be determined.
- the block device may correspond to the SCSI block device shown in FIG. 1.
- the read/write path of the read/write request is path 1 in FIG. 1, that is, a short path.
- the block device is only exemplified by the SCSI block device shown in FIG. 1 , and the SCSI block device can also be replaced with other block devices, which is not limited by the embodiment of the present invention.
- ATA/IDE Advanced Technology Attachment/Integrated Drive Electronics, Advanced Technology Accessories/Integrated Drive Electronics
- FC Fiber Channel
- SATA Serial ATA, Serial Advanced Technology Attachment
- SAS Serial Attached SCSI
- the virtual disk in the virtual machine has a corresponding relationship with the virtual block device in the host, and the corresponding virtual block device can be determined according to the virtual address of the read/write request.
- the virtual block device may correspond to the tapdev block device in the XEN virtualization shown in FIG. 1.
- the virtual block device in the embodiment of the present invention may also correspond to a QEMU (Quick Emulator) in KVM virtualization.
- QEMU Quad Emulator
- the virtual disk in the virtual machine has a corresponding relationship with the virtual block device in the host, and the corresponding virtual block device can be determined according to the virtual address of the read/write request.
- the virtual block device is a block device of a virtual machine, and there is no actual physical block device or physical disk corresponding to it.
- the tapdev virtual block device is used to forward data (such as read and write requests) to the user-mode tapdisk process.
- the method for determining the read/write path determines an appropriate read/write path according to the virtual address of the read/write request and the address translation information set, thereby achieving both storage performance and storage function.
- the first read/write request When the physical address corresponding to the first read/write request is located on the local disk, the first read/write request is processed by the block device or the virtual block device, and the first read/write request corresponding to the target physical disk in the hardware layer of the physical host is completed. Read and write operations. When the physical address corresponding to the first read/write request is located on the SAN side, the first read/write request is processed by the block device or the virtual block device, and the read/write operation corresponding to the first read/write request can be completed on the target physical disk in the SAN. .
- the first read and write request can be obtained directly from the IO ring, or it can be split from IO
- the read and write requests obtained in the ring are obtained.
- the method may include: acquiring, by the storage front end and the input and output IO ring shared by the storage back end, a second read/write request of the virtual machine, where the second read/write request includes a second virtual address;
- the first read/write request is split in the read/write request, and the first virtual address is a partial virtual address in the second virtual address.
- the read/write request obtained by the storage backend may be split into two reads.
- the write request is processed separately, wherein the virtual address of one read/write request is recorded in the address translation information set, and the virtual address of another read/write request is not recorded in the address translation information set. For example, if the virtual address of the read/write request obtained from the IO ring of the storage backend is 1 to 100, and only the virtual address of 1 to 70 is recorded in the address conversion information set, the read/write request can be split into two reads.
- the information of the physical block device further includes a physical block device identifier and a physical address.
- processing, by the block device, the first read/write request includes: converting the first read/write request into a block device read/write request, and the block device reads
- the write request includes a first physical address corresponding to the first virtual address and a first physical block device identifier; and the block device reads and writes the request by the block device corresponding to the first virtual address.
- the method 300 may further include: The initial record corresponding to the first virtual address is deleted in the address translation information set. It should be noted that the initial record corresponding to the first virtual address refers to the initial record corresponding to the first virtual address in the host initialization setting or the initial loaded address translation information set.
- the read/write identifier corresponding to the first virtual address in the address translation information set indicates read-only, the write operation cannot be performed. Therefore, the record corresponding to the first virtual address in the address translation information set needs to be deleted.
- the tapdisk process or QEMU and file system in the Host will reallocate the block for the first virtual address according to the first read and write request.
- the physical block corresponding to the sub-image file is readable and writable, and the physical block corresponding to the parent image file is read-only.
- the read/write identifier of the physical address corresponding to the virtual address of the read/write request is read-only, this means that the virtual address of the read/write request corresponds to the parent image file, and the record corresponding to the parent image file needs to be deleted in the address translation table. And then Reset the record corresponding to the submirror file in the address translation table.
- the first read/write request is a write request, and the first virtual address corresponds to the first
- the method 300 may further include:
- the tapdisk process in XEN virtualization or the QEMU in KVM virtualization may also be in the process of processing the first read and write request, after reallocating the physical block for the first virtual address of the first read and write request,
- the virtual address, the first physical address, the correspondence between the first physical block device and the first read/write identifier are sent to the storage backend, and the address translation information set is updated by the storage backend in time.
- the XEN virtualized tapdisk process or the KVM virtualized QEMU can obtain the information of the physical block device corresponding to the virtual address.
- the address translation information set contains all the virtual addresses and physical addresses of the virtual disk. Correspondence with physical block devices, it is not necessary to reset the address translation information set later.
- the address translation information set includes a correspondence between a partial virtual address and a physical address and a physical block device. If the virtual address of the read/write request is not included in the address translation information set, the read/write request is sent to the virtual block device corresponding to the long path, and the physical address may be allocated to the virtual address in the long path, and then The correspondence between the virtual address and the physical address, the physical block device, and the read/write identifier is set to the address translation information set of the storage backend. As time goes by, the records included in the address translation information set are gradually becoming more and more More until the correspondence of all virtual addresses is included.
- the method 300 may further include: determining whether to enable the storage advanced service, and correspondingly, searching for the first virtual address in the address translation information set in step 302 includes:
- the first virtual address is looked up in the address translation information set without opening the storage advanced service.
- the method 300 may further before determining that the storage advanced service is not enabled.
- the method includes: obtaining a path switching indication, where the path switching indication is used to indicate whether to enable the storage advanced service; and determining whether to open the storage advanced service according to the path switching indication.
- the path switch indication may be obtained by the XEN virtualized tapdisk process, or may be obtained by the KVM virtualized QEMU.
- the storage backend can directly send the obtained read/write request to the corresponding virtual block device, and take a long path with storage advanced features (path 2 shown in FIG. 1) without searching.
- the address translation information set determines the read and write path of the read and write request. At this point, you can take snapshots of virtual machines, virtual machine storage hot migration, virtual machine storage thin provisioning, and so on.
- the storage backend acquires a new path switching indication, which indicates that the storage advanced service is not enabled, and the storage back end determines the read/write request according to the address translation information set. Read and write path.
- the read/write request when the storage advanced service is enabled, the read/write request has a read/write path with a storage advanced feature, and when the storage advanced service is not enabled, the information conversion set and the read/write request are performed according to the address.
- the virtual address determines the read and write path of the read and write request, so that the read and write requests are processed according to different requirements, and the storage performance and the storage function can be balanced.
- the information of the physical block device further includes a physical address and a physical block device identifier.
- the method 300 may further include:
- the address translation information set includes a correspondence between the first virtual address, the first physical address, the first physical block device identifier, and the first read/write identifier.
- the Host can initialize the set of address translation information.
- 304 and 305 may be performed by a tapdisk process in XEN virtualization or a QEMU in KVM virtualization, 306 may be performed by the storage backend.
- the tapdisk process in the XEN virtualization or the QEMU in the KVM virtualization process can obtain the physical address, the physical block device identifier, and the read/write identifier corresponding to the virtual address of the virtual disk to which the physical block has been allocated in the virtual machine during the virtual machine startup process. And then create a set of address translation information by the storage backend initialization.
- the initialized address translation information set may include: a virtual address, a physical address, a physical block device identifier, and a correspondence between read and write identifiers.
- the content recorded in the address translation information set may be as shown in Table 1 below.
- the virtual address is represented by a virtual start address and an address length, and the flag is a read/write identifier. Since the length of the virtual address and the length of the physical address are the same, only the virtual address length can be recorded in the address translation information set.
- it may include:
- the first virtual address corresponds to a thick provisioning virtual disk or a thin provisioned disk, determining that the first read/write identifier indicates that the read/write identifier is readable and writable;
- the first virtual address corresponds to the differential mirror virtual disk, and the first virtual address corresponds to the sub-image file, determining that the first read/write identifier indicates that the read/write identifier is readable and writable;
- the first virtual address corresponds to the differential mirror virtual disk, and the first virtual address corresponds to the parent image file, it is determined that the first read/write identifier indicates read-only.
- the method for determining the read/write path of the read/write request of the virtual machine determines the appropriate read/write path according to the virtual address of the read/write request and the address translation information set, and can balance the storage performance and the storage function.
- FIG. 5 is a schematic flow chart of initializing an address translation information set.
- the virtual disk of the virtual machine is a thick provisioned virtual disk
- the corresponding interface sends the corresponding relationship between the virtual address, the physical address, the physical block device identifier, and the read/write identifier to the storage backend.
- the virtual disk of the virtual machine is a thin provisioned virtual disk
- the corresponding interface sends the corresponding relationship between the virtual address, the physical address, the physical block device identifier, and the read/write identifier to the storage backend.
- the virtual machine disk is a differential mirror virtual disk
- the read/write identifier corresponding to the file is set to be readable and writable; the physical address corresponding to the virtual address of the parent image file and the physical block device identifier are obtained, and the read/write identifier corresponding to the parent image file is set to read-only.
- the interface corresponding to the storage backend is sent to the storage backend by the corresponding relationship between the virtual address of the submirror file and the parent image file and the physical address, the physical block device identifier, and the read/write identifier.
- steps 501 to 504 may be performed by the tapdisk process in the Host in the XEN virtualization, or may also be performed by the QEMU in the Host in the KVM virtualization.
- the storage backend obtains the foregoing correspondence, and creates an address translation information set.
- the storage backend can initialize the set address translation information set, so that the read/write path of the read/write request can be determined according to the address translation information set, thereby achieving both storage performance and storage function.
- a method 300 of determining a read/write path in accordance with an embodiment of the present invention is described below by taking XEN virtualization as an example.
- the method for determining the read/write path in KVM virtualization is similar to the method for determining the read/write path in XEN virtualization, and will not be described here.
- the tapdev block device and the tapdisk process in XEN virtualization may correspond to the QEMU in KVM virtualization.
- FIG. 6 is a schematic block diagram of an apparatus for determining a read/write path according to an embodiment of the present invention.
- FIG. 7 is a schematic flowchart of a method for determining a read/write path according to an embodiment of the present invention.
- tapdisk process shown in FIG. 6 may also be a tapdisk2 process, which is not limited by the present invention.
- the host operating system creates a tapdisk process and creates a tapdev block device.
- the image file is opened.
- the file system interface is called in the tapdisk process to obtain the physical block device identifier, the physical address, and the read/write identifier corresponding to the virtual address of the virtual disk of the virtual machine to which the physical block has been allocated, and then the corresponding storage backend is called.
- the interface is set by the storage backend to the address translation information set, and the address setting information set is initialized and set.
- the address translation information set after initialization may include a correspondence between a virtual address, a physical address, a physical block device identifier, and a read/write identifier.
- the address obtaining module may be set in the tapdisk process, and the address obtaining module obtains the physical block device identifier, the physical address, and the read/write identifier corresponding to the virtual address of the virtual disk of the virtual machine to which the physical block has been allocated.
- the storage back end acquires a read and write request. Specifically, when an application in the virtual machine issues a read/write request, the file system in the virtual machine reaches the storage front-end driver, and the storage front-end driver reads and writes. After the request is put into the IO ring shared by the storage front end and the storage back end. The IO ring notifies the storage backend by an interrupt, and then the storage backend reads the read and write request from the IO ring.
- the storage backend determines whether to open the storage advanced service. In the case where the storage advanced service is turned on, 703 is performed; otherwise, 706 is performed.
- the tapdisk process instructs the obtaining module to obtain a path switching indication, and the storage back end determines whether to open the storage advanced service according to the path switching indication.
- the tapdisk process calls the path switching module to notify the storage back end, and the subsequent read and write requests need to go to the storage advanced service regardless of whether they exist in the address translation information set. Path 2.
- the tapdisk process calls the path switch module to notify the storage backend to return to the normal state.
- the storage backend sends the read/write request to the tapdev block device.
- the tapdev block device puts the read and write request into the user state tapdisk process and the IO ring of the tapdev shared memory, and then wakes up the tapdisk process.
- the Tapdisk process is woken up, the read/write request in the IO ring is taken out, and the corresponding driver is invoked according to the format of the virtual machine disk image file.
- the corresponding disk image file driver processes the read and write request according to the disk format, it converts the read and write request to the image file. Then execute 705.
- the file system After receiving the read/write request of the pair of files, the file system converts the read/write request into a block device read/write request to the block device.
- the read/write request of the block device includes: a physical address and a physical device block identifier. , read and write content and read and write types. Then execute 708.
- the address translation information set can be reset.
- the tapdisk process obtains the physical address corresponding to the newly allocated physical block, the physical block device identifier, and determines the read/write identifier according to the virtual disk format, and then the storage backend updates the address translation. In the information collection.
- the read/write request is a write request
- the record corresponding to the parent image file is deleted in the address translation information set of the storage backend, and then reset.
- the address translation information set record corresponding to the sub-image file is reset.
- the storage backend searches for the address translation information set according to the virtual address of the read/write request. If the virtual address is not in the address translation information set, 703 is performed; if the virtual address is present in the address translation information set, 707 is performed.
- the read/write request may be split into two sub-read and write requests, corresponding to a part of the virtual address recorded in the address translation information set.
- the child read/write request is executed 707; and 703 is executed for the child read/write request corresponding to the virtual address not recorded in the address translation information set.
- the storage backend determines whether the read/write request is a read request or a write request. If it is a read request, the request is converted to a block device read request, and execution continues to 708; if it is a write request, execution proceeds to 709.
- the SCSI block device is only used as an example in FIG. 7 , and the SCSI block device may be replaced with other block devices as described in the embodiment shown in FIG. 3 , and details are not described herein again.
- the block device read/write request may be sent to the SCSI block device, where the read/write request, the read/write content, the physical address, and the physical block device identifier are carried in the block device read/write request, and the physical block device is in FIG. SCSI block devices have a corresponding relationship.
- the storage backend further determines a read/write type of the read/write identifier flag corresponding to the virtual address of the write request in the address translation information set. If flag indicates writable readable, continue with 708; if flag indicates read only, continue with 710.
- the record corresponding to the source LBA in the address translation information set may be deleted directly, or the corresponding record may be deleted by splitting the record in the address translation information set.
- the virtual start address 50 and the address length 20 of the write request received by the back end are stored, but the virtual start address 1 and the address length 100 are recorded in the address translation information set, and the flag indicates read-only (as shown in Table 1).
- the storage backend needs to delete the record corresponding to the virtual start address of the write request, and the record shown in Table 1 can be split into the record shown in Table 2 below.
- the storage backend can obtain the correspondence between the virtual address of the write request and the physical address, the physical block device, and the read/write identifier from the tapdisk process, and update the address translation information set.
- the updated address translation information set can be as follows: Table 3 shows.
- a path selection module may be provided in the storage backend, and steps 702, 705, 706, and 709 may be specifically performed by the path selection module.
- the method for determining the read/write path determines the appropriate read/write path according to the virtual address of the read/write request and the address translation information set, and can balance the storage performance and the storage function.
- a method of determining a read/write path according to an embodiment of the present invention is described in detail above with reference to FIGS. 3 through 7, and an apparatus for determining a read/write path according to an embodiment of the present invention will be described in detail below with reference to FIGS. 8 through 10.
- FIG. 8 is a schematic block diagram of an apparatus 800 for determining a read/write path in accordance with an embodiment of the present invention.
- the device 800 is applied to a physical host running a virtual machine as shown in FIG. 8.
- the device 800 includes a storage backend module 810, a block device 820, and a virtual block device 830.
- the storage backend module 810 is configured to: obtain a first read/write request of the virtual machine, where the first read/write request includes a first virtual address; and the first virtual address is searched in the address translation information set, where the address translation information set includes a virtual The correspondence between the address and the information of the physical block device, and the information of the physical block device includes the read/write identifier.
- the information of the physical block device may also include a physical address and an identification of the physical block device.
- the block device 820 is configured to: when the first virtual address is included in the address translation information set, and the first read/write request is a read request, processing the first read/write request; or include the first virtual in the address translation information set
- the address, the first read/write request is a write request, and the first read/write identifier corresponding to the first virtual address indicates that the first read/write identifier is readable and writable, and the first read/write request is processed.
- the virtual block device 830 is configured to: include a first virtual address in the address translation information set, where the first read/write request is a write request, and the first read/write identifier corresponding to the first virtual address indicates a read-only condition And processing the first read/write request; or processing the first read/write request if the first virtual address is not included in the address translation information set.
- a plurality of block devices and virtual block devices may be included in device 800.
- the block device 820 is a block device corresponding to the physical block device corresponding to the first virtual address.
- the virtual block device 830 is a virtual block device corresponding to the virtual disk in which the first virtual address is located.
- the device for determining the read/write path determines the appropriate read/write path according to the virtual address of the read/write request and the address translation information set, and can balance the storage performance and the storage function.
- the storage backend module 810 is specifically configured to: obtain a second read/write request of the virtual machine from the input and output IO rings shared by the storage front end and the storage back end, where the second read/write request includes the second virtual address;
- the first read/write request is split in the second read/write request, and the first virtual address is a partial virtual address in the second virtual address.
- the information of the physical block device may further include a physical block device identifier and a physical address
- the storage backend module 810 may be specifically configured to: convert the first read/write request into a block device read and write request, and the block device read and write request includes the first virtual address.
- the block device 820 is specifically configured to process the block device read and write request.
- the storage backend module 810 is further configured to: when the address translation information set includes the first virtual address, the first read/write request is a write request, and the read/write identifier corresponding to the first virtual address in the address translation information set indicates read-only And deleting the initial record corresponding to the first virtual address in the address translation information set.
- the apparatus 800 may further include: a first obtaining module 840, configured to include the first virtual address in the address translation information set, or include the first in the address translation information set a virtual address, where the first read/write request is a write request, and the first read/write identifier corresponding to the first virtual address indicates read-only, and the first physical address corresponding to the first virtual address is obtained according to the first read/write request, and the first Physical block device identification and first read and write identification.
- the storage backend module 810 is further configured to add the first virtual address, the first physical address, the first physical block device identifier, and the first read/write identifier correspondence to the address translation information set.
- the storage backend module 810 may be specifically configured to: determine whether to enable the storage advanced service; and find the first virtual locality in the address translation information set if the storage advanced service is not enabled. site.
- the device 800 may further include: a second obtaining module 850, configured to acquire a path switching indication, where the path switching indication is used to indicate whether to enable the storage advanced service; and the storage backend module 810 is specifically configured to determine whether to enable the storage according to the path switching indication. Advanced service.
- the information of the physical block device may further include a physical address and a physical block device identifier
- the device 800 further includes: a third obtaining module 860, configured to: when the first virtual address is included in the address translation information set, after being stored Before acquiring the first read/write request, the end module 810 obtains the first physical address corresponding to the first virtual address and the first physical block device identifier; and determines the first virtual address corresponding to the format of the virtual disk corresponding to the first virtual address. A read and write identifier.
- the storage backend module 810 is further configured to create an address translation information set, where the address translation information set includes a correspondence between the first virtual address, the first physical address, the first physical block device identifier, and the first read/write identifier.
- the third obtaining module 860 can be specifically configured to:
- the first virtual address corresponds to a thick provisioning virtual disk or a thin provisioned disk, determining that the first read/write identifier indicates that the read/write identifier is readable and writable;
- the first virtual address corresponds to the differential mirror virtual disk, and the first virtual address corresponds to the sub-image file, determining that the first read/write identifier indicates readable and writable;
- the first read/write identifier indicates read-only.
- the third obtaining module 860 and the first obtaining module 840 may be the same module, or may be different modules, which is not limited by the embodiment of the present invention.
- the first obtaining module 840, the second obtaining module 850, and the third obtaining module 860 may be used to implement a corresponding function of a tapdisk process in XEN virtualization or a QEMU in KVM virtualization.
- the first obtaining module 840 and the third obtaining module 860 may correspond to the address obtaining module in the tapdisk process shown in FIG. 6, and the second obtaining module 850 may correspond to the indication acquiring module in the tapdisk process shown in FIG. 6.
- apparatus 800 for determining read and write paths in accordance with embodiments of the present invention may correspond to method 300 of determining read and write paths in accordance with embodiments of the present invention, and that the various modules and other operations and/or functions in apparatus 800 are respectively In order to implement the corresponding processes of the respective methods shown in FIG. 3 to FIG. 7 , for brevity, details are not described herein again.
- the device for determining the read/write path determines the appropriate read/write path according to the virtual address of the read/write request and the address translation information set, and can balance the storage performance and the storage function.
- the storage backend module, the first acquisition module, the second acquisition module, and the third acquisition are respectively described below with reference to the accompanying drawings.
- the fetch module can be described in detail by a technical solution implemented by the processor executing a program or instruction in the memory:
- FIG. 10 is a schematic block diagram of a device apparatus 1000 for determining a read/write path according to another embodiment of the present invention.
- the device 1000 can be applied to a physical host, and the physical host runs a virtual machine.
- apparatus 1000 includes a processor 1010, a memory 1020, and a bus system 1030.
- the processor 1010 and the memory 1020 are connected by a bus system 1030, which may include a read only memory and a random access memory, and provides instructions and data to the processor 1010.
- a portion of memory 1020 may also include non-volatile random access memory (NVRAM).
- the memory 1020 stores elements, executable modules or data structures, or a subset thereof, or their extension set:
- the host 1021 is used as a management layer to complete management and allocation of hardware resources, a virtual hardware platform for virtual machines, and scheduling and isolation of virtual machines.
- Host may be a virtual machine monitor (VMM); in addition, sometimes VMM and a privileged virtual machine work together, and the two combine to form a Host.
- the virtual hardware platform provides various hardware resources for each virtual machine running on it, such as providing a virtual processor, a memory, a virtual disk, a virtual network card, and the like.
- the virtual disk may correspond to a file of the Host or a logical block device.
- the virtual machine runs on the virtual hardware platform that Host prepares for it, and one or more virtual machines run on the Host.
- Virtual machine 1022 Virtual machine software can simulate one or more virtual computers on a physical computer, and these virtual machines work like real computers, and operating systems and applications can be installed on the virtual machines. Virtual machines also have access to network resources. For an application running in a virtual machine, the virtual machine is like working on a real computer.
- the processor 1010 by calling an operation instruction stored in the memory 1020 (the operation instruction can be stored in an operating system), the processor 1010 is configured to:
- the first read/write request is processed by the block device corresponding to the first virtual address
- the first virtual address, the first read/write request is a write request, and the first virtual address corresponding to the first read/write identifier indicates that the first virtual address is readable and writable, and the first virtual address is used.
- the corresponding block device processes the first read/write request; or,
- the first read/write request is a write request
- the first read/write identifier corresponding to the first virtual address indicates read-only
- the virtual block device corresponding to the first virtual address Handling the first read and write request
- the first read/write request is processed by the virtual block device corresponding to the first virtual address.
- the device for determining the read/write path determines the appropriate read/write path according to the virtual address of the read/write request and the address translation information set, and can balance the storage performance and the storage function.
- the processor 1010 controls the operation of the device 1000 that determines the read/write path, and the processor 1010 may also be referred to as a CPU (Central Processing Unit).
- Memory 1020 can include read only memory and random access memory and provides instructions and data to processor 1010.
- a portion of memory 1020 may also include non-volatile random access memory (NVRAM).
- NVRAM non-volatile random access memory
- the various components of the device 1000 are coupled together by a bus system 1030, which may include, in addition to the data bus, a power bus, a control bus, a status signal bus, and the like. However, for clarity of description, various buses are labeled as the bus system 1030 in the figure.
- the method disclosed in the foregoing embodiments of the present invention may be applied to the processor 1010 or implemented by the processor 1010.
- the processor 1010 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the foregoing method may be completed by an integrated logic circuit of hardware in the processor 1010 or an instruction in a form of software.
- the processor 1010 described above may be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or discrete hardware. Component.
- DSP digital signal processor
- ASIC application specific integrated circuit
- FPGA off-the-shelf programmable gate array
- the methods, steps, and logical block diagrams disclosed in the embodiments of the present invention may be implemented or carried out.
- the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
- the steps of the method disclosed in the embodiments of the present invention may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
- the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
- the storage medium is located in the memory 1020, and the processor 1010 reads the information in the memory 1020 and performs the steps of the above method in combination with its hardware.
- the processor 1010 is specifically configured to: obtain a second read/write request of the virtual machine from the input and output IO ring shared by the storage front end and the storage back end, where the second read/write request includes the second virtual Address; the first read/write request is split from the second read/write request, and the first virtual address is A partial virtual address in the second virtual address.
- the information of the physical block device may further include a physical block device identifier and a physical address
- the processor 1010 may be specifically configured to: convert the first read/write request into a block device read/write request, where the block device read/write request includes the first virtual address The first physical address and the first physical block device identifier; the block device read and write request is processed by the block device corresponding to the first virtual address.
- the processor 1010 is further configured to: when the first virtual address is included in the address translation information set, the first read/write request is a write request, and the first read/write identifier corresponding to the first virtual address indicates read-only, The initial record corresponding to the first virtual address is deleted in the address translation information set.
- the processor 1010 is further configured to: if the first virtual address is not included in the address translation information set, or include the first virtual address in the address translation information set, where the first read/write request is a write request, and If the first read/write identifier corresponding to the first virtual address indicates read-only, the first physical address corresponding to the first virtual address, the first physical block device identifier, and the first read/write identifier are acquired; the first virtual address, the first virtual address A correspondence between a physical address, a first physical block device identifier, and a first read/write identifier is recorded in the address translation information set.
- the processor 1010 is further configured to: determine whether to enable the storage advanced service before searching for the first virtual address in the address translation information set.
- the processor 1010 is specifically configured to: obtain a path switching indication, where the path switching indication is used to indicate whether to enable the storage advanced service; and determine whether to open the storage advanced service according to the path switching indication.
- the information of the physical block device further includes a physical address and a physical block device identifier
- the processor 1010 is further configured to: before the first virtual address is included in the address translation information set, before acquiring the first read/write request, Obtaining a first physical address corresponding to the first virtual address and a first physical block device identifier; determining, according to a format of the virtual disk corresponding to the first virtual address, a first read/write identifier corresponding to the first virtual address; and creating an address translation information set,
- the address translation information set includes a correspondence between the first virtual address, the first physical address, the first physical block device identifier, and the first read/write identifier.
- the processor 1010 is specifically configured to: when the first virtual address corresponds to the thick provisioning virtual disk or the thin provisioning disk, determine that the first read/write identifier indicates that the first read/write identifier indicates readable and writable; and the first virtual address corresponds to the differential mirror virtual disk. If the first virtual address corresponds to the sub-image file, determining that the first read/write identifier indicates read and write; in the case that the first virtual address corresponds to the differential mirror virtual disk, and the first virtual address corresponds to the parent image file In the case of determining, the first read/write identifier indicates read-only.
- the apparatus 1000 for determining a read/write path according to an embodiment of the present invention may correspond to The method 300 for determining a read/write path according to an embodiment of the present invention and the apparatus 800 for determining a read/write path according to an embodiment of the present invention, and the description of each module in the device 1000 and other operations and/or functions are respectively implemented in order to implement FIG. 3 to FIG. The corresponding processes of the respective methods shown in FIG. 7 are not repeated here for brevity.
- the backend storage module, the first acquisition module, the second acquisition module, and the third acquisition module may be The processor is implemented by executing a program or instruction in a memory (in other words, by a processor and a special instruction in a memory coupled to the processor); in another implementation, the backend memory module The first obtaining module, the second obtaining module, and the third obtaining module may also be implemented by using a dedicated circuit. For the specific implementation, refer to the related art, and details are not described herein. In still another implementation, the back end storage module is used.
- the first acquisition module, the second acquisition module, and the third acquisition module may also be implemented by a Field-Programmable Gate Array (FPGA).
- FPGA Field-Programmable Gate Array
- the physical host 1100 can include: a hardware device and a software device.
- the hardware device includes a hardware layer
- the software device includes a host host running on the hardware layer, and a virtual machine running on the host.
- the host further includes the device 800 for determining the read/write path in the foregoing embodiment.
- Hardware devices can also be called “hardware processing modules", or simpler, or simply “hardware”. Hardware devices mainly include dedicated hardware circuits based on FPGAs, ASICs (and other supporting devices, such as memory). The hardware circuits of certain functions are often processed much faster than general-purpose processors, but once the functions are customized, they are difficult to change. Therefore, they are not flexible to implement and are usually used to handle some fixed functions. It should be noted that the hardware device may also include an MCU (microprocessor, such as a single chip microcomputer) or a processor such as a CPU in practical applications, but the main function of these processors is not to complete the processing of big data, but mainly used for processing. Some control is performed. In this application scenario, the system that is paired with these devices is a hardware device.
- MCU microprocessor, such as a single chip microcomputer
- Software devices mainly include general-purpose processors (such as CPU) and some supporting devices (such as memory, hard disk and other storage devices), which can be programmed to let the processor have the corresponding processing functions.
- general-purpose processors such as CPU
- supporting devices such as memory, hard disk and other storage devices
- the software device is configured to determine a suitable read/write path according to the read/write request, and the hardware device completes the read/write operation corresponding to the read/write request.
- Other functions of the hardware device and the software device have been discussed in detail in the foregoing embodiments, and are not described herein again.
- the apparatus for determining the read/write path determines the appropriate read/write path according to the read/write request and the address translation information set, and can balance the storage performance and the storage function.
- the disclosed systems, devices, and methods may be implemented in other manners.
- the device embodiments described above are merely illustrative.
- the division of the unit is only a logical function division.
- there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Memory System Of A Hierarchy Structure (AREA)
- Storage Device Security (AREA)
Abstract
本发明公开了一种确定读写路径的方法和装置,该方法用于物理主机,该物理主机包括硬件层、运行在该硬件层之上的宿主机Host、以及运行在该Host之上的虚拟机,该Host包括块设备以及虚拟块设备,该方法包括:Host获取虚拟机的第一读写请求,第一读写请求包括第一虚拟地址;在地址转换信息集合中查找第一虚拟地址,其中,地址转换信息集合包括虚拟地址与物理块设备的信息的对应关系,物理块设备的信息包括读写标识;根据地址转换信息集合和第一虚拟地址确定通过块设备或者虚拟块设备处理第一读写请求。本发明实施例的确定读写路径的方法和装置,根据读写请求和地址转换信息集合确定合适的读写路径,能够兼顾存储性能和存储功能。
Description
本申请要求于2015年01月30日提交中国专利局、申请号为201510050407.X,发明名称为“确定读写路径的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及计算机领域,尤其涉及确定读写路径的方法和装置。
虚拟化包括计算虚拟化,网络虚拟化和存储虚拟化,存储虚拟化为虚拟机提供存储及存储服务,例如对虚拟机存储做快照、存储热迁移。通过存储前后端方式给虚拟机提供存储是当前存储虚拟化的主流使用方式。
在通过存储前后端方式给虚拟机提供存储的情况下,客机操作***(guest os)读写磁盘数据时,先把数据的读写请求发给存储前端驱动,存储前端驱动把该读写请求放到存储前端(Storage fronted)和存储后端(Storage backend)共享的输入输出(Input Output,IO)环,然后发送中断给存储后端,存储后端收到中断通知后,从该IO环里取出该读写请求,然后根据虚拟机配置发给图1的路径1或者路径2,具体的,可以是在虚拟机启动时,按照虚拟机配置文件决定走哪一条路径。
路径1没有存储高级服务,或者存储高级服务依赖存储区域网络(Storage Area Network,SAN)或者虚拟SAN,但是路径短、存储时延小,使得存储性能较高。路径2有存储高级服务,具有多种存储功能,例如对虚拟机做快照、虚拟机存储热迁移、虚拟机存储精简配置(Thin provision)等,但是路径2的路径较长,存储时延较大,使得存储性能较差。
当前虚拟机按照虚拟机配置文件决定读写请求走哪一条路径,无法灵活地根据读写请求的需求,采用恰当的路径处理读写请求,无法兼顾存储性能和存储功能。
发明内容
本发明提供一种确定读写路径的方法和装置,能根据读写请求的需求,
采用恰当的路径处理读写请求,从而兼顾存储性能和存储功能。
第一方面,提供了一种确定读写路径的方法,该方法用于物理主机,该物理主机包括硬件层、运行在硬件层之上的宿主机Host、以及运行在Host之上的虚拟机,Host包括块设备以及虚拟块设备,该方法包括:Host获取虚拟机的第一读写请求,第一读写请求包括第一虚拟地址;在地址转换信息集合中查找第一虚拟地址,其中,地址转换信息集合包括虚拟地址与物理块设备的信息的对应关系,物理块设备的信息包括读写标识;在地址转换信息集合中包括第一虚拟地址,且第一读写请求为读请求的情况下,通过第一虚拟地址对应的块设备处理第一读写请求;或者,在地址转信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示可读可写的情况下,通过第一虚拟地址对应的块设备处理第一读写请求;或者,在地址转换信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示只读的情况下,通过第一虚拟地址对应的虚拟块设备处理第一读写请求;或者,在地址转换信息集合中不包括第一虚拟地址的情况下,通过第一虚拟地址对应的虚拟块设备处理第一读写请求。
结合第一方面,在第一种可能的实现方式中,物理块设备的信息还包括物理块设备标识和物理地址,通过第一虚拟地址对应的块设备处理第一读写请求包括:将第一读写请求转换为块设备读写请求,块设备读写请求包括第一虚拟地址对应的第一物理地址和第一物理块设备标识;通过第一虚拟地址对应的块设备处理块设备读写请求。
结合第一方面,在第二种可能的实现方式中,当地址转换信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示只读时,该方法还包括:在地址转换信息集合中删除第一虚拟地址对应的初始记录。
结合第一方面,在第三种可能的实现方式中,在所述地址转换信息集合中不包括所述第一虚拟地址的情况下,该方法还包括:根据第一读写请求获取第一虚拟地址对应的第一物理地址、第一物理块设备标识和第一读写标识;将获取的第一虚拟地址、第一物理地址、第一物理块设备标识和第一读写标识的对应关系添加到地址转换信息集合中。
结合第二种可能的实现方式,在第四种可能的实现方式中,该方法还包
括:根据第一读写请求获取第一虚拟地址对应的第一物理地址、第一物理块设备标识和第一读写标识;将获取的第一虚拟地址、第一物理地址、第一物理块设备标识和第一读写标识的对应关系添加到地址转换信息集合中。
结合第一方面或第一种至第四种可能的实现方式中的任一种可能的实现方式,在第五种可能的实现方式中,该方法还包括:确定是否开启存储高级服务;在地址转换信息集合中查找第一虚拟地址包括:在未开启存储高级服务的情况下,在地址转换信息集合中查找第一虚拟地址。
结合第五种可能的实现方式,在第六种可能的实现方式中,确定是否开启存储高级服务包括:获取路径切换指示,路径切换指示用于指示是否开启存储高级服务;根据路径切换指示确定是否开启存储高级服务。
结合第一方面或第一种至第六种可能的实现方式中的任一种可能的实现方式,在第七种可能的实现方式中,物理块设备的信息还包括物理地址和物理块设备标识,当地址转换信息集合中包括第一虚拟地址时,在获取第一读写请求之前,该方法还包括:获取第一虚拟地址对应的第一物理地址和第一物理块设备标识;根据第一虚拟地址对应的虚拟磁盘的格式,确定第一虚拟地址对应的第一读写标识;创建地址转换信息集合,地址转换信息集合包括第一虚拟地址、第一物理地址、第一物理块设备标识和第一读写标识的对应关系。
结合第七种可能的实现方式,在第八种可能的实现方式中,根据第一虚拟地址对应的虚拟磁盘的格式,确定第一虚拟地址对应的第一读写标识,包括:在第一虚拟地址对应厚置备虚拟磁盘或精简置备磁盘的情况下,确定第一读写标识指示可读可写;在第一虚拟地址对应差分镜像虚拟磁盘,且第一虚拟地址对应子镜像文件的情况下,确定第一读写标识指示可读可写;在第一虚拟地址对应差分镜像虚拟磁盘,且第一虚拟地址对应父镜像文件的情况下,确定第一读写标识指示只读。
结合第一方面或第一种至第八种可能的实现方式中的任一种可能的实现方式,在第九种可能的实现方式中,获取第一读写请求包括:从存储前端和存储后端共享的输入输出IO环中获取虚拟机的第二读写请求,第二读写请求包括第二虚拟地址;从第二读写请求中拆分出第一读写请求,第一虚拟地址为第二虚拟地址中的部分虚拟地址。
第二方面,提供了一种确定读写路径的装置,该装置应用于物理主机,
物理主机运行有虚拟机,该装置包括:存储后端模块,用于:获取虚拟机的第一读写请求,第一读写请求包括第一虚拟地址;在地址转换信息集合中查找第一虚拟地址,其中,地址转换信息集合包括虚拟地址与物理块设备的信息的对应关系,物理块设备的信息包括读写标识;块设备,用于在地址转换信息集合中包括第一虚拟地址,且第一读写请求为读请求的情况下,或者在地址转信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示可读可写的情况下,处理第一读写请求;虚拟块设备,用于在地址转换信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示只读的情况下,或者在地址转换信息集合中不包括第一虚拟地址的情况下,通过第一虚拟地址对应的虚拟块设备处理第一读写请求。
结合第二方面,在第二方面的第一种可能的实现方式中,物理块设备的信息还包括物理块设备标识和物理地址,存储后端模块还用于:将第一读写请求转换为块设备读写请求,块设备读写请求包括第一虚拟地址对应的第一物理地址和第一物理块设备标识;块设备具体用于处理块设备读写请求。
结合第二方面,在第二方面的第二种可能的实现方式中,存储后端模块还用于,在地址转换信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示只读的情况下,在地址转换信息集合中删除第一虚拟地址对应的初始记录。
结合第二方面,在第二方面的第三种可能的实现方式中,该装置还包括:第一获取模块,用于在地址转换信息集合中不包括述第一虚拟地址的情况下,根据第一读写请求获取第一虚拟地址对应的第一物理地址、第一物理块设备标识和第一读写标识;存储后端模块将所述第一获取模块获取的第一虚拟地址、第一物理地址、第一物理块设备标识和第一读写标识的对应关系添加到地址转换信息集合中。
结合第二方面的第二种可能的实现方式,在第二方面的第四种可能的实现方式中,该装置还包括:第一获取模块,用于根据第一读写请求获取第一虚拟地址对应的第一物理地址、第一物理块设备标识和第一读写标识;存储后端模块还用于将第一获取模块获取的第一虚拟地址、第一物理地址、第一物理块设备标识和第一读写标识的对应关系添加到地址转换信息集合中。
结合第二方面或第二方面的第一种至第四种可能的实现方式中的任一
种可能的实现方式,在第二方面的第五种可能的实现方式中,存储后端模块具体用于:确定是否开启存储高级服务;在未开启存储高级服务的情况下,在地址转换信息集合中查找第一虚拟地址。
结合第二方面的第五种可能的实现方式,在第二方面的第六种可能的实现方式中,该装置还包括:第二获取模块,用于获取路径切换指示,路径切换指示用于指示是否开启存储高级服务;存储后端模块具体用于根据路径切换指示确定是否开启存储高级服务。
结合第二方面或第二方面的第一种至第六种可能的实现方式中的任一种可能的实现方式,在第二方面的第七种可能的实现方式中,物理块设备的信息还包括物理地址和物理块设备标识,该装置还包括:第三获取模块,用于:在地址转换信息集合中包括第一虚拟地址的情况下,在存储后端模块获取第一读写请求之前,获取第一虚拟地址对应的第一物理地址和第一物理块设备标识;根据第一虚拟地址对应的虚拟磁盘的格式,确定第一虚拟地址对应的第一读写标识;存储后端模块还用于,创建地址转换信息集合,地址转换信息集合包括第一虚拟地址、第一物理地址、第一物理块设备标识和第一读写标识的对应关系。
结合第二方面的第七种可能的实现方式,在第二方面的第八种可能的实现方式中,第三获取模块具体用于:在第一虚拟地址对应厚置备虚拟磁盘或精简置备磁盘的情况下,确定第一读写标识指示可读可写;在第一虚拟地址对应差分镜像虚拟磁盘的情况下,且第一虚拟地址对应子镜像文件的情况下,确定第一读写标识指示可读可写;在第一虚拟地址对应差分镜像虚拟磁盘的情况下,且第一虚拟地址对应父镜像文件的情况下,确定第一读写标识指示只读。
结合第二方面或第二方面的第一种至第八种可能的实现方式中的任一种可能的实现方式,在第二方面的第九种可能的实现方式中,存储后端具体用于:从存储前端和存储后端共享的输入输出IO环中获取虚拟机的第二读写请求,第二读写请求包括第二虚拟地址;从第二读写请求中拆分出第一读写请求,第一虚拟地址为第二虚拟地址中的部分虚拟地址。
第三方面,提供了一种物理主机,物理主机包括硬件层、运行在硬件层之上的宿主机Host、以及运行在Host之上的虚拟机,Host包括块设备以及虚拟块设备,Host包括如第二方面或第二方面的第一种至第九种可能的实现
方式中的任一种可能的实现方式所述的确定读写路径的装置。
与现有的技术相比,本发明实施例具有如下有益效果:
基于上述技术方案,本发明实施例的确定读写路径的方法和装置,根据读写请求的虚拟地址和地址转换信息集合来确定合适的读写路径,能够兼顾存储性能和存储功能。
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是虚拟存储设备的示意性框图;
图2是本发明实施例所适用的***的示意性框图;
图3是根据本发明实施例的确定读写路径的方法的示意性流程图;
图4是根据本发明另一实施例的确定读写路径的方法的示意性流程图;
图5是根据本发明实施例的初始化地址转换信息集合的示意性流程图;
图6是根据本发明实施例的确定读写路径的装置的示意性框图;
图7是根据本发明另一实施例的确定读写路径的方法的示意性流程图;
图8是根据本发明实施例的确定读写路径的装置的示意性框图图;
图9是根据本发明另一实施例的确定读写路径的装置的示意性框图;
图10是根据本发明另一实施例的确定读写路径的装置的示意性框图;
图11是根据本发明实施例的物理主机的示意性框图。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。
应理解,本发明实施例中各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。
图2所示的是本发明实施例的确定读写路径的方法所适用的***架构的示意图。需要理解的是,图2仅为方便理解的示意性说明图,并不限定该***架构的组成模式。如图2所示,该***架构可以包括:
物理主机210和/或物理主机220,物理主机210和/或物理主机220可以是物理主机、终端计算机等,本发明不做限定,
FC(Fiber Channel,光纤通道)交换机230和/或IP(Internet Protocol,因特网协议)交换机240,
FCSAN(Fiber Channel Storage Area Network,光纤通道存储区域网络)240,和IPSAN(Internet Protocol Storage Area Network,因特网协议存储区域网络)250。
其中,物理主机210采用XEN虚拟化技术,物理主机220采用KVM(Kernel-based Virtual Machine,基于内核的虚拟机)虚拟化技术。
物理主机210中可以包括:宿主机操作***(Host Operating System,Host OS)211、一个或多个虚拟机(Virtual Machine,VM)212、虚拟监控器(hypervisor)213、本地磁盘(local disk)214、HBA(Host Bus Adapter,主机总线适配器)卡215和网卡22。
宿主机操作***211包括存储虚拟化(storage virtualization),该存储虚拟化可以包括:存储后端驱动、虚拟磁盘、文件***和块设备等,例如图1所示。
虚拟机212上可以运行数据库、办公桌面等。虚拟机212中可以包括存储前端,该存储前端是虚拟机内的磁盘驱动,可以与宿主机操作***中的存储虚拟化交互,把虚拟机内的数据传送到宿主机操作***中。
虚拟监控器(hypervisor),用于模拟物理主机。
HBA卡215类似于网卡214,物理主机210通过HBA卡或网卡214连接交换机或存储设备。
如图2所示物理主机220与物理主机210类似,物理主机220中的各个模块分别与物理主机210中的各个模块相对应,在此不再赘述。
FC交换机230和IP交换机240,用于将物理主机210和220输出的数据转发至对应的SAN侧。
FCSAN 240,通过光纤网络连接HBA卡/网卡、交换机和/或存储阵列。IPSAN 250,通过IP网络连接HBA卡/网卡、交换机和/或存储阵列。
需要理解的是,图2为本发明实施例确定读写路径的方法所适用的***的一个示例性说明,以图示中的物理主机210和物理主机220为例说明***中可能支持的物理主机的虚拟化技术类型,且该***中可能支持的物理主机类型不限于此,以图示中的FC交换机230和IP交换机240表示该***可能支持的交换机类型,且该***中可能支持的交换机类型不限于此,实际***中,可能包括一台或多台技术类型相同或不同的物理主机,以及可能包括一台或多台类型相同或不同的交换机,本发明实施例不做限定。
图2所示的***中的任意一台物理主机支持本发明实施例所述的确定读写路径的方法,以及现有技术路径1和路径2对读写请求的处理流程。图1可以理解为图2所示的***中的任意一台物理主机采用现有技术路径1和路径2对读写请求的处理流程的示意图。
下面结合图1和图2简要描述现有技术中路径1和路径2对读写请求的处理流程。
读写请求走路径2时,存储后端将读写请求发送给tapdev块设备,tapdev块设备在虚拟机启动时创建,tapdev块设备收到读写命令后,放入用户态tapdisk和tapdev共享内存的IO环,然后唤醒tapdisk进程。Tapdisk被唤醒后,取出该IO环中的读写数据命令,然后将该数据读写请求交给对应的磁盘镜像文件驱动。磁盘镜像文件驱动按照磁盘格式处理读写命令后,转换成对文件的读写操作。然后调用文件***的读写接口读写数据。文件***收到读写命令后,经过文件***元数据,转换成块设备的读写,然后到SCSI驱动。如果读写请求对应的物理地址不位于本地磁盘,则通过HBA卡或网卡到达SAN侧,由IPSAN或FCSAN中对应的目标存储阵列进行读写操作。或者,如果读写请求对应的物理地址位于本地磁盘,则直接调用本地磁盘进行读写请求对应的读写操作。
读写请求走路径1时,存储后端直接把读写数据的命令发送给预设的SCSI块设备,读写请求后续走SCSI驱动层。如果读写请求对应的物理地址不位于本地磁盘,则通过HBA卡或网卡到达SAN侧,由IPSAN或FCSAN中对应的目标存储阵列进行读写操作。或者,如果读写请求对应的物理地址位于本地磁盘,则直接调用本地磁盘进行读写请求对应的读写操作。
图3是根据本发明实施例的确定读写路径的方法300的示意性流程图。图3的方法可以用于物理主机,该物理主机包括硬件层、运行在该硬件层之
上的宿主机(Host)、以及运行在该Host之上的虚拟机,该Host包括块设备以及虚拟块设备。如图3所示,方法300可以包括如下内容。
301、Host获取虚拟机的第一读写请求,第一读写请求包括第一虚拟地址。
例如,Host中的存储后端从存储后端和存储前端(Storage frontend)共享的IO环中获取第一读写请求。第一读写请求还可以包括读写类型和读写内容。第一读写请求为虚拟机的任一读写请求。
该第一虚拟地址可以为逻辑区块地址(Logical Block Address,LBA),也可以为其他寻址方式表示的地址,本发明实施例对此不做限定。
该第一虚拟地址可以为一个地址或多个地址。本发明实施例中的地址可以由起始地址和地址长度表示。
302、在地址转换信息集合中查找第一虚拟地址,其中,地址转换信息集合包括虚拟地址与物理块设备的信息的对应关系,物理块设备的信息包括读写标识。
其中,物理块设备的信息还可以包括物理块设备标识和物理地址。地址转换信息集合可以采用表、树等形式进行存储,本发明实施例对地址转换信息集合的存储形式不做限定。
具体地,地址转换信息集合可以存储在Host的存储后端中,步骤302可以由存储后端执行。
303、在地址转换信息集合中包括第一虚拟地址,且第一读写请求为读请求的情况下,通过第一虚拟地址对应的块设备处理第一读写请求;或者,
在地址转信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示可读可写的情况下,通过第一虚拟地址对应的块设备处理第一读写请求;或者,
在地址转换信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示只读的情况下,通过第一虚拟地址对应的虚拟块设备处理第一读写请求;或者,
在地址转换信息集合中不包括第一虚拟地址的情况下,通过第一虚拟地址对应的虚拟块设备处理第一读写请求。
Host中可以包括多个块设备和多个虚拟块设备,块设备与硬件层中为虚拟磁盘分配的物理块设备具有对应关系,虚拟块设备与虚拟机中的虚拟磁盘
具有对应关系。
应理解,通过查找地址转换信息集合,可以确定读写请求的虚拟地址对应的物理块设备标识,Host中记录了硬件层的物理块设备与Host中的块设备的对应关系,从而能够确定读写请求的虚拟地址对应的块设备。
块设备可对应于图1所示的SCSI块设备,当通过该块设备处理读写请求时,这意味着该读写请求的读写路径为图1中的路径1,即短路径。还应理解,该块设备仅以图1所示SCSI块设备为例,该SCSI块设备还可以替换为其他块设备,本发明实施例对此不做限定,例如:还可以为ATA/IDE(Advanced Technology Attachment/Integrated Drive Electronics,高级技术附件/集成驱动电子设备)块设备、FC(Fiber Channel,光纤通道)块设备、SATA(Serial ATA,串行高级技术附件)块设备和SAS(Serial Attached SCSI,串行连接SCSI)块设备等。
应理解,虚拟机中的虚拟磁盘与Host中的虚拟块设备具有对应关系,根据读写请求的虚拟地址能够确定对应的虚拟块设备。
虚拟块设备可对应于图1所示的XEN虚拟化中的tapdev块设备,当通过该虚拟块设备处理读写请求时,这意味着该读写请求的读写路径为图1所示的路径2,即长路径。本发明实施例中的虚拟块设备还可以对应于KVM虚拟化中的QEMU(Quick Emulator)。应理解,虚拟机中的虚拟磁盘与Host中的虚拟块设备具有对应关系,根据读写请求的虚拟地址能够确定对应的虚拟块设备。应注意,该虚拟块设备是一个虚拟机的块设备,没有实际的物理块设备或物理磁盘和它对应。例如在XEN虚拟化中,tapdev虚拟块设备用来把数据(如读写请求)转发给用户态的tapdisk进程。
因此,本发明实施例的确定读写路径的方法,根据读写请求的虚拟地址和地址转换信息集合确定合适的读写路径,从而能够兼顾存储性能和存储功能。
当第一读写请求对应的物理地址位于本地磁盘时,通过块设备或虚拟块设备处理第一读写请求,可以在物理主机的硬件层中的目标物理磁盘的上完成第一读写请求对应的读写操作。当第一读写请求对应的物理地址位于SAN侧时,通过块设备或虚拟块设备处理第一读写请求,可以在SAN中的目标物理磁盘的上完成第一读写请求对应的读写操作。
第一读写请求可以是直接从IO环中获取到的,还可以是通过拆分从IO
环中获取到的读写请求得到的。
可选地,在301中可以包括:从存储前端和存储后端共享的输入输出IO环中获取虚拟机的第二读写请求,该第二读写请求包括第二虚拟地址;从该第二读写请求中拆分出第一读写请求,第一虚拟地址为第二虚拟地址中的部分虚拟地址。
举例说明,当存储后端获取到的读写请求的虚拟地址中仅有部分虚拟地址记录在该地址转换信息集合中时,可以将存储后端获取到的该读写请求拆分为两个读写请求分别处理,其中一个读写请求的虚拟地址记录在该地址转换信息集合中,另一读写请求的虚拟地址没有记录在该地址转换信息集合中。例如存储后端从IO环中获取的读写请求的虚拟地址为1~100,而地址转换信息集合中仅记录了1~70的虚拟地址,则可以将该读写请求拆分为两个读写请求,其中一个读写请求的虚拟地址为1~70,另一读写请求的虚拟地址为71~100,然后分别处理拆分而成的这两个读写请求。应理解,在拆分读写请求的过程中,还应根据虚拟地址的拆分情况将读写内容做相应拆分。
具体地,物理块设备的信息还包括物理块设备标识和物理地址,在303中,通过块设备处理第一读写请求包括:将第一读写请求转换为块设备读写请求,块设备读写请求包括第一虚拟地址对应的第一物理地址和第一物理块设备标识;通过第一虚拟地址对应的块设备处理块设备读写请求。
可选地,当所述地址转换信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示只读时,方法300还可以包括:在地址转换信息集合中删除第一虚拟地址对应的初始记录。需要说明的是,第一虚拟地址对应的初始记录,指的是Host初始化设置或者初始化加载的地址转换信息集合中第一虚拟地址对应的初始记录。
进一步的,由于地址转换信息集合中第一虚拟地址对应的读写标识指示只读,无法进行写操作,因此需要将地址转换信息集合中第一虚拟地址对应的记录删除。Host中的tapdisk进程或QEMU和文件***会根据第一读写请求为第一虚拟地址重新分配块。
例如,当虚拟机的虚拟磁盘为差分镜像虚拟磁盘时,子镜像文件对应的物理块为可读可写,父镜像文件对应的物理块为只读。当读写请求的虚拟地址对应的物理地址的读写标识为只读时,这意味着该读写请求的虚拟地址对应的是父镜像文件,需要在地址转换表中删除父镜像文件对应的记录,然后
在地址转换表中重新设置子镜像文件对应的记录。
可选地,在地址转换信息集合中不包括第一虚拟地址的情况下,或者在地址转换信息集合中包括第一虚拟地址,第一读写请求为写请求,第一虚拟地址对应的第一读写标识指示只读的情况下,方法300还可以包括:
根据第一读写请求获取所述第一虚拟地址对应的第一物理地址、第一物理块设备标识和第一读写标识;
将获取的第一虚拟地址、第一物理地址、第一物理块设备标识和第一读写标识的对应关系添加到所述地址转换信息集合中。
例如,XEN虚拟化中的tapdisk进程或KVM虚拟化中的QEMU还可以在处理第一读写请求的过程中,在为第一读写请求的第一虚拟地址重新分配物理块之后,将第一虚拟地址、第一物理地址、第一物理块设备和第一读写标识的对应关系发送到存储后端,由存储后端及时更新地址转换信息集合。
XEN虚拟化的tapdisk进程或KVM虚拟化的QEMU可以获取虚拟地址对应的物理块设备的信息。
在虚拟磁盘为厚置备虚拟磁盘的情况下,由于厚置备虚拟磁盘在创建镜像文件时,磁盘空间已经全部分配和占有,此时该地址转换信息集合内包含该虚拟磁盘的所有虚拟地址与物理地址和物理块设备的对应关系,后续不需要重新设置地址转换信息集合。
在虚拟机的虚拟磁盘为精简置备虚拟磁盘和差分镜像虚拟磁盘的情况下,该地址转换信息集合中包含了部分虚拟地址与物理地址和物理块设备的对应关系。在该地址转换信息集合中不包括读写请求的虚拟地址的情况下,将该读写请求发送至对应长路径的虚拟块设备,在长路径中可能会为该虚拟地址分配物理块,然后会将该虚拟地址与物理地址、物理块设备、读写标识的对应关系设置到存储后端的地址转换信息集合中,随着时间的推移,慢慢的该地址转换信息集合中包含的记录越来越多,直到包含所有虚拟地址的对应关系。
可选地,方法300还可以包括:确定是否开启存储高级服务,相应的,步骤302中,在地址转换信息集合中查找所述第一虚拟地址包括:
在未开启存储高级服务的情况下,在地址转换信息集合中查找所述第一虚拟地址。
在本发明实施例中,在确定未开启存储高级服务之前,方法300还可以
包括:获取路径切换指示,路径切换指示用于指示是否开启存储高级服务;根据路径切换指示确定是否开启存储高级服务。
可以由XEN虚拟化的tapdisk进程获取该路径切换指示,或者,也可以由KVM虚拟化的QEMU获取该路径切换指示。
例如,当开启存储高级服务时,存储后端可以直接将获取到的读写请求发送至对应的虚拟块设备,走具有存储高级特性的长路径(如图1所示路径2),而无需查找地址转换信息集合来确定该读写请求的读写路径。此时可以对虚拟机做快照、虚拟机存储热迁移、虚拟机存储精简配置等。
应理解,在存储高级服务结束之后,存储后端会获取新的路径切换指示,该新的路径切换指示会指示未开启存储高级服务,此时存储后端会根据地址转换信息集合确定读写请求的读写路径。
本发明实施例的确定读写路径的方法,当开启存储高级服务时,读写请求走具有存储高级特性的读写路径,当未开启存储高级服务时,根据地址转换信息集合和读写请求的虚拟地址确定读写请求的读写路径,这样根据不同的需求处理读写请求,能够兼顾存储性能和存储功能。
可选地,物理块设备的信息还包括物理地址和物理块设备标识,当地址转换信息集合中包括第一虚拟地址时,如图4所示,在301之前,方法300还可以包括:
304、获取第一虚拟地址对应的第一物理地址和第一物理块设备标识;
305、根据第一虚拟地址对应的虚拟磁盘的格式,确定第一虚拟地址对应的第一读写标识;
306、创建地址转换信息集合,地址转换信息集合包括第一虚拟地址、第一物理地址、第一物理块设备标识和第一读写标识的对应关系。
也就是说,在301之前,Host可以初始化设置地址转换信息集合。
304和305可以由XEN虚拟化中的tapdisk进程或KVM虚拟化中的QEMU执行,306可以由存储后端执行。
例如,XEN虚拟化中的tapdisk进程或KVM虚拟化中的QEMU可以在虚拟机启动过程中获取虚拟机中已经分配物理块的虚拟磁盘的虚拟地址对应的物理地址、物理块设备标识和读写标识,然后由存储后端初始化创建地址转换信息集合。初始化后的地址转换信息集合中可以包括:虚拟地址、物理地址、物理块设备标识和读写标识的对应关系。
具体地,地址转换信息集合中记录的内容可以如下表1所示,例如,虚拟地址用虚拟起始地址和地址长度表示,flag为读写标识。由于虚拟地址的长度和物理地址的长度是相同的,因此在地址转换信息集合中可以只记录虚拟地址长度。
表1 地址转换信息集合
虚拟起始地址 | 地址长度 | 物理起始地址 | 物理块设备标识 | flag |
1 | 100 | 200 | /dev/sda | 只读 |
具体地,在305中可以包括:
在第一虚拟地址对应厚置备虚拟磁盘或精简置备磁盘的情况下,确定第一读写标识指示可读可写;
在第一虚拟地址对应差分镜像虚拟磁盘,且第一虚拟地址对应子镜像文件的情况下,确定第一读写标识指示可读可写;
在第一虚拟地址对应差分镜像虚拟磁盘,且第一虚拟地址对应父镜像文件的情况下,确定第一读写标识指示只读。
因此,本发明实施例的确定虚拟机的读写请求的读写路径的方法,根据读写请求的虚拟地址和地址转换信息集合确定合适的读写路径,能够兼顾存储性能和存储功能。
下面结合图5详细描述根据本发明实施例的确定读写路径的方法中初始化地址转换信息集合的方法。图5是初始化地址转换信息集合的示意性流程图。
501、根据虚拟机的配置文件判断虚拟机的虚拟磁盘的格式。
502、当虚拟机的虚拟磁盘为厚置备虚拟磁盘时,获取该厚置备虚拟磁盘的虚拟地址对应的物理块设备标识和物理地址,将读写标识flag设置为可读可写,调用存储后端对应的接口将该虚拟地址、物理地址、物理块设备标识、读写标识的对应关系发送到存储后端。
503、当虚拟机的虚拟磁盘为精简置备虚拟磁盘时,获取该精简置备虚拟磁盘的虚拟地址对应的物理块设备标识和物理地址,将读写标识flag设置为可读可写,调用存储后端对应的接口将该虚拟地址、物理地址、物理块设备标识、读写标识的对应关系发送到存储后端。
504、当该虚拟机的磁盘为差分镜像虚拟磁盘时,获取该差分镜像虚拟磁盘的子镜像文件的虚拟地址对应的物理地址和物理块设备标识,将子镜像
文件对应的读写标识设置为可读可写;获取父镜像文件的虚拟地址对应的物理地址和物理块设备标识,将父镜像文件对应的读写标识设置为只读。然后调用存储后端对应的接口将子镜像文件和父镜像文件的虚拟地址与物理地址、物理块设备标识、读写标识的对应关系发送至存储后端。
需要说明的是,步骤501至504可以由XEN虚拟化中Host内的tapdisk进程执行,或者也可以由KVM虚拟化中Host内的QEMU执行。
505、存储后端获取上述对应关系,创建地址转换信息集合中。
在本发明实施例中,在虚拟机启动过程中,存储后端能够初始化设置地址转换信息集合,使得能够根据地址转换信息集合确定读写请求的读写路径,从而能够兼顾存储性能和存储功能。
下面以XEN虚拟化为例,描述根据本发明实施例的确定读写路径的方法300。KVM虚拟化中确定读写路径的方法与XEN虚拟化中确定读写路径的方法类似,在此不再赘述。应理解,XEN虚拟化中的tapdev块设备和tapdisk进程可对应于KVM虚拟化中的QEMU。
下面结合图6和图7详细描述根据本发明实施例的确定读写路径的方法。图6为根据本发明实施例的确定读写路径的设备的示意性框图。如图7所示是根据本发明实施例的确定读写路径的方法的示意性流程图。
应理解,图6中所示tapdisk进程也可以为tapdisk2进程,本发明对此不做限定。
应理解,在虚拟机启动过程中,宿主机操作***会创建tapdisk进程并创建tapdev块设备,在tapdisk进程启动过程中,会打开镜像文件。在打开镜像文件的过程中,tapdisk进程中调用文件***接口获取虚拟机的已经分配物理块的虚拟磁盘的虚拟地址对应的物理块设备标识、物理地址和读写标识,然后调用存储后端对应的接口,由存储后端设置到地址转换信息集合中,完成初始化设置地址转换信息集合。初始化后地址转换信息集合中可以包括虚拟地址、物理地址、物理块设备标识和读写标识的对应关系。具体地,可以在tapdisk进程中设置地址获取模块,由该地址获取模块获取虚拟机的已经分配物理块的虚拟磁盘的虚拟地址对应的物理块设备标识、物理地址和读写标识。
701、存储后端获取读写请求。具体地,虚拟机内的应用程序发出读写请求时,通过虚拟机内的文件***到达存储前端驱动,存储前端驱动把读写
请求放入存储前端和存储后端共享的IO环后。该IO环通过中断通知存储后端,然后存储后端从IO环里读取该读写请求。
702、存储后端确定是否开启存储高级服务。在开启存储高级服务的情况下,执行703;否则,执行706。
具体地,tapdisk进程中指示获取模块获取路径切换指示,存储后端根据该路径切换指示确定是否开启存储高级服务。
在开启存储高级服务的情况下,例如存储热迁移启动时,tapdisk进程调用路径切换模块通知存储后端,后续的读写请求不管是否在地址转换信息集合中已经存在都要走存储高级服务的长路径2。存储高级服务结束后,tapdisk进程调用路径切换模块通知存储后端恢复正常状态。
703、存储后端将该读写请求发送至tapdev块设备。
tapdev块设备将该读写请求放入用户态tapdisk进程和tapdev共享内存的IO环,然后唤醒tapdisk进程。
704、Tapdisk进程被唤醒后,取出IO环中的该读写请求,根据虚拟机磁盘镜像文件的格式调用相应的驱动程序。对应的磁盘镜像文件驱动按照磁盘格式处理该读写请求后,转换成对镜像文件的读写请求。然后执行705。
705、文件***收到该对文件的读写请求后,将该读写请求转换成对块设备的块设备读写请求,此时该块设备读写请求中包括:物理地址、物理设备块标识、读写内容和读写类型。然后执行708。
另外,tapdisk进程和文件***处理该读写请求完后,还可以重新设置地址转换信息集合。
举例说明,读写请求如果需要新分配块,则tapdisk进程会获取新分配的物理块对应的物理地址、物理块设备标识,并根据虚拟磁盘格式确定读写标识,然后由存储后端更新地址转换信息集合中。
或者,如果是差分镜像虚拟磁盘,例如对应diff格式的磁盘镜像文件,并且该读写请求为写请求,则首先需要在存储后端的地址转换信息集合里删除父镜像文件对应的记录,然后重新设置子镜像文件对应的地址转换信息集合记录。
另外,在存储高级服务进行的过程中,有可能更改虚拟机的虚拟地址。例如存储热迁移,目标存储或源存储的虚拟机的虚拟地址和对应的物理块已经改变了,则需要调用存储后端的接口删除原来的地址转换信息集合,新建
新的地址转换信息集合。
706、存储后端根据该读写请求的虚拟地址查找地址转换信息集合。如果在地址转换信息集合中没有该虚拟地址,执行703;如果在地址转换信息集合中有该虚拟地址,执行707。
如果该地址转换信息集合中仅记录了该读写请求的虚拟地址中的部分地址,则可以将该读写请求拆分为两个子读写请求,对于地址转换信息集合中记录的部分虚拟地址对应的子读写请求,执行707;对于地址转换信息集合中没有记录的虚拟地址对应的子读写请求,执行703。
707、存储后端判断该读写请求是读请求还是写请求。如果是读请求,将该请求转换为块设备读请求,继续执行708;如果是写请求,则继续执行709。
708、将读写请求发送至SCSI块设备。
应理解,图7中仅以SCSI块设备为例描述,如图3所示实施例中所述该SCSI块设备还可以替换为其他块设备,在此不再赘述。
具体地,可以向该SCSI块设备发送块设备读写请求,在该块设备读写请求中携带读写类型、读写内容、物理地址和物理块设备标识,该物理块设备与图6中的SCSI块设备具有对应关系。
709、存储后端进一步判断地址转换信息集合中该写请求的虚拟地址对应的读写标识flag的读写类型。如果flag指示可写可读,继续执行708;如果flag指示只读,继续执行710。
应理解,如果flag指示只读,这意味着虚拟磁盘为差分镜像虚拟磁盘,且该写命令的虚拟地址对应的是差分镜像虚拟磁盘中的父镜像文件。
710、删除该虚拟地址在地址转换信息集合中的记录,然后继续执行703。
具体地,可以直接删除该源LBA在地址转换信息集合中对应的记录,或者,也可以通过***地址转换信息集合中的记录来删除对应的记录。例如,存储后端接收到的写请求的虚拟起始地址50、地址长度20,但是地址转换信息集合中记录虚拟起始地址1、地址长度100、flag指示只读(如表1所示)。此时存储后端需要将写请求的虚拟起始地址对应的记录删除掉,则可以将表1所示的记录***为下表2所示的记录。
表2 地址转换信息集合
虚拟起始地址 | 地址长度 | 物理起始地址 | 物理块设备标识 | flag |
1 | 49 | 200 | /dev/sda | 只读 |
71 | 30 | 271 | /dev/sda | 只读 |
经过步骤704之后,存储后端可以从tapdisk进程获取到写请求的虚拟地址与物理地址、物理块设备、读写标识的对应关系,并更新地址转换信息集合,更新后的地址转换信息集合可以如下表3所示。
表3 地址转换信息集合
虚拟起始地址 | 地址长度 | 物理起始地址 | 物理块设备标识 | flag |
1 | 49 | 200 | /dev/sda | 只读 |
71 | 30 | 271 | /dev/sda | 只读 |
50 | 20 | 250 | /dev/sda | 可读可写 |
具体地,如图9中所示,可以在存储后端中设置路径选择模块,步骤702、705、706和709可以由该路径选择模块具体执行。
因此,本发明实施例的确定读写路径的方法,根据读写请求的虚拟地址和地址转换信息集合确定合适的读写路径,能够兼顾存储性能和存储功能。
上文结合图3至图7详细描述了根据本发明实施例的确定读写路径的方法,下面将结合图8至图10详细描述根据本发明实施例的确定读写路径的设备。
图8是根据本发明实施例的确定读写路径的装置800的示意性框图。装置800应用于物理主机,该物理主机运行有虚拟机如图8所示,装置800包括:存储后端模块810、块设备820和虚拟块设备830。
存储后端模块810,用于:获取虚拟机的第一读写请求,第一读写请求包括第一虚拟地址;在地址转换信息集合中查找第一虚拟地址,其中,地址转换信息集合包括虚拟地址与物理块设备的信息的对应关系,物理块设备的信息包括读写标识。
物理块设备的信息还可以包括物理地址和物理块设备的标识。
块设备820用于:在地址转换信息集合中包括第一虚拟地址,且第一读写请求为读请求的情况下,处理第一读写请求;或者,在地址转信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示可读可写的情况下,处理第一读写请求。
虚拟块设备830用于:在地址转换信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示只读的情况
下,处理第一读写请求;或者,在地址转换信息集合中不包括第一虚拟地址的情况下,处理第一读写请求。
装置800中可以包括多个块设备和虚拟块设备。
当地址转换信息集合中包括第一虚拟地址时,能够确定第一虚拟地址在硬件层中对应的物理块设备。块设备820是与第一虚拟地址对应的物理块设备对应的块设备。
虚拟块设备830是与第一虚拟地址所在的虚拟磁盘对应的虚拟块设备。
因此,根据本发明实施例的确定读写路径的设备,根据读写请求的虚拟地址和地址转换信息集合确定合适的读写路径,能够兼顾存储性能和存储功能。
可选地,存储后端模块810可以具体用于:从存储前端和存储后端共享的输入输出IO环中获取虚拟机的第二读写请求,第二读写请求包括第二虚拟地址;从第二读写请求中拆分出第一读写请求,第一虚拟地址为第二虚拟地址中的部分虚拟地址。
物理块设备的信息还可以包括物理块设备标识和物理地址,存储后端模块810可以具体用于:将第一读写请求转换为块设备读写请求,块设备读写请求包括第一虚拟地址对应的第一物理地址和第一物理块设备标识;块设备820具体用于处理块设备读写请求。
存储后端模块810还可以用于,当地址转换信息集合中包括第一虚拟地址,第一读写请求为写请求,且地址转换信息集合中第一虚拟地址对应的读写标识指示只读时,在地址转换信息集合中删除第一虚拟地址对应的初始记录。
可选地,如图9所示,装置800还可以包括:第一获取模块840,用于在地址转换信息集合中不包括第一虚拟地址的情况下,或者在地址转换信息集合中包括第一虚拟地址,第一读写请求为写请求,第一虚拟地址对应的第一读写标识指示只读的情况下,根据第一读写请求获取第一虚拟地址对应的第一物理地址、第一物理块设备标识和第一读写标识。存储后端模块810还用于,将第一虚拟地址、第一物理地址、第一物理块设备标识和第一读写标识对应关系添加到地址转换信息集合中。
可选地,存储后端模块810可以具体用于:确定是否开启存储高级服务;在未开启存储高级服务的情况下,在地址转换信息集合中查找第一虚拟地
址。
具体地,装置800还可以包括:第二获取模块850,用于获取路径切换指示,路径切换指示用于指示是否开启存储高级服务;存储后端模块810具体用于根据路径切换指示确定是否开启存储高级服务。
可选地,物理块设备的信息还可以包括物理地址和物理块设备标识,装置800还包括:第三获取模块860,用于:当地址转换信息集合中包括第一虚拟地址时,在存储后端模块810获取第一读写请求之前,获取第一虚拟地址对应的第一物理地址和第一物理块设备标识;根据第一虚拟地址对应的虚拟磁盘的格式,确定第一虚拟地址对应的第一读写标识。存储后端模块810还用于,创建地址转换信息集合,地址转换信息集合包括第一虚拟地址、第一物理地址、第一物理块设备标识和第一读写标识的对应关系。
其中,第三获取模块860可以具体用于:
在第一虚拟地址对应厚置备虚拟磁盘或精简置备磁盘的情况下,确定第一读写标识指示可读可写;
在第一虚拟地址对应差分镜像虚拟磁盘的情况下,且第一虚拟地址对应子镜像文件的情况下,确定第一读写标识指示可读可写;
在第一虚拟地址对应差分镜像虚拟磁盘的情况下,且第一虚拟地址对应父镜像文件的情况下,确定第一读写标识指示只读。
需要说明的是,第三获取模块860与第一获取模块840可以为同一模块,也可以为不同模块,本发明实施例对此不做限定。第一获取模块840、第二获取模块850和第三获取模块860可以用于实现XEN虚拟化中的tapdisk进程或者KVM虚拟化中的QEMU的相应功能。例如,第一获取模块840和第三获取模块860可对应于图6所示tapdisk进程中的地址获取模块,第二获取模块850可对应于图6所示tapdisk进程中的指示获取模块。
应理解,根据本发明实施例的确定读写路径的装置800可对应于根据本发明实施例的确定读写路径的方法300,并且装置800中的各个模块的述和其它操作和/或功能分别为了实现图3至图7所示各个方法的相应流程,为了简洁,在此不再赘述。
因此,本发明实施例的确定读写路径的设备,根据读写请求的虚拟地址和地址转换信息集合确定合适的读写路径,能够兼顾存储性能和存储功能。
下面结合附图就存储后端模块、第一获取模块、第二获取模块和第三获
取模块可以由处理器执行存储器中的程序或指令来实现的技术方案来做详细的介绍:
图10是根据本发明另一实施例的确定读写路径的装置设备1000的示意性框图。具体的,装置1000可以应用于物理主机,物理主机运行有虚拟机。如图10所示,装置1000包括:处理器1010、存储器1020和总线***1030。其中,处理器1010和存储器1020通过总线***1030相连,该存储器1020可以包括只读存储器和随机存取存储器,并向处理器1010提供指令和数据。存储器1020的一部分还可以包括非易失性随机存取存储器(NVRAM)。在一些实施方式中,存储器1020存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:
宿主机1021:作为管理层,用以完成硬件资源的管理、分配;为虚拟机呈现虚拟硬件平台;实现虚拟机的调度和隔离。其中,Host可能是虚拟机监控器(VMM);此外,有时VMM和1个特权虚拟机配合,两者结合组成Host。其中,虚拟硬件平台对其上运行的各个虚拟机提供各种硬件资源,如提供虚拟处理器、内存、虚拟磁盘、虚拟网卡等等。其中,该虚拟磁盘可对应Host的一个文件或者一个逻辑块设备。虚拟机则运行在Host为其准备的虚拟硬件平台上,Host上运行一个或多个虚拟机。
虚拟机1022:通过虚拟机软件可以在一台物理计算机上模拟出一台或者多台虚拟的计算机,而这些虚拟机就像真正的计算机那样进行工作,虚拟机上可以安装操作***和应用程序,虚拟机还可访问网络资源。对于在虚拟机中运行的应用程序而言,虚拟机就像是在真正的计算机中进行工作。
在本发明实施例中,通过调用存储器1020存储的操作指令(该操作指令可存储在操作***中),处理器1010用于:
获取虚拟机的第一读写请求,第一读写请求包括第一虚拟地址;
在地址转换信息集合中查找第一虚拟地址,其中,地址转换信息集合包括虚拟地址与物理块设备的信息的对应关系,物理块设备的信息包括读写标识;
在地址转换信息集合中包括第一虚拟地址,且第一读写请求为读请求的情况下,通过第一虚拟地址对应的块设备处理第一读写请求;或者,
在地址转信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示可读可写的情况下,通过第一虚拟地址
对应的块设备处理第一读写请求;或者,
在地址转换信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示只读的情况下,通过第一虚拟地址对应的虚拟块设备处理第一读写请求;或者,
在地址转换信息集合中不包括第一虚拟地址的情况下,通过第一虚拟地址对应的虚拟块设备处理第一读写请求。
因此,本发明实施例的确定读写路径的设备,根据读写请求的虚拟地址和地址转换信息集合确定合适的读写路径,能够兼顾存储性能和存储功能。
处理器1010控制确定读写路径的装置1000的操作,处理器1010还可以称为CPU(Central Processing Unit,中央处理单元)。存储器1020可以包括只读存储器和随机存取存储器,并向处理器1010提供指令和数据。存储器1020的一部分还可以包括非易失性随机存取存储器(NVRAM)。具体的应用中,装置1000的各个组件通过总线***1030耦合在一起,其中总线***1030除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线***1030。
上述本发明实施例揭示的方法可以应用于处理器1010中,或者由处理器1010实现。处理器1010可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1010中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1010可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1020,处理器1010读取存储器1020中的信息,结合其硬件完成上述方法的步骤。
可选地,作为另一实施例,处理器1010具体用于:从存储前端和存储后端共享的输入输出IO环中获取虚拟机的第二读写请求,第二读写请求包括第二虚拟地址;从第二读写请求中拆分出第一读写请求,第一虚拟地址为
第二虚拟地址中的部分虚拟地址。
物理块设备的信息还可以包括物理块设备标识和物理地址,处理器1010可具体用于:将第一读写请求转换为块设备读写请求,块设备读写请求包括第一虚拟地址对应的第一物理地址和第一物理块设备标识;通过第一虚拟地址对应的块设备处理块设备读写请求。
可选地,处理器1010还用于,当地址转换信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示只读时,在地址转换信息集合中删除第一虚拟地址对应的初始记录。
可选地,处理器1010还用于:在地址转换信息集合中不包括第一虚拟地址的情况下,或者在地址转换信息集合中包括第一虚拟地址,第一读写请求为写请求,且第一虚拟地址对应的第一读写标识指示只读的情况下,获取第一虚拟地址对应的第一物理地址、第一物理块设备标识和第一读写标识;将第一虚拟地址、第一物理地址、第一物理块设备标识和第一读写标识的对应关系记录在地址转换信息集合中。
可选地,处理器1010还用于:在地址转换信息集合中查找第一虚拟地址之前,确定是否开启存储高级服务。
处理器1010可具体用于,获取路径切换指示,路径切换指示用于指示是否开启存储高级服务;根据路径切换指示确定是否开启存储高级服务。
可选地,物理块设备的信息还包括物理地址和物理块设备标识,处理器1010还用于:在地址转换信息集合中包括第一虚拟地址的情况下,在获取第一读写请求之前,获取第一虚拟地址对应的第一物理地址和第一物理块设备标识;根据第一虚拟地址对应的虚拟磁盘的格式,确定第一虚拟地址对应的第一读写标识;创建地址转换信息集合,地址转换信息集合包括第一虚拟地址、第一物理地址、第一物理块设备标识和第一读写标识的对应关系。
处理器1010可具体用于:在第一虚拟地址对应厚置备虚拟磁盘或精简置备磁盘的情况下,确定第一读写标识指示可读可写;在第一虚拟地址对应差分镜像虚拟磁盘的情况下,且第一虚拟地址对应子镜像文件的情况下,确定第一读写标识指示可读可写;在第一虚拟地址对应差分镜像虚拟磁盘的情况下,且第一虚拟地址对应父镜像文件的情况下,确定第一读写标识指示只读。
应理解,根据本发明实施例的确定读写路径的装置1000可对应于根据
本发明实施例的确定读写路径的方法300以及根据本发明实施例的确定读写路径的装置800,并且装置1000中的各个模块的述和其它操作和/或功能分别为了实现图3至图7所示各个方法的相应流程,为了简洁,在此不再赘述。
在上述确定读写路径的装置的多个实施例中,应当理解的是,在一种实现方式下,后端存储模块、第一获取模块、第二获取模块和第三获取模块可以是可以由处理器执行存储器中的程序或指令来实现的(换言之,即由处理器以及与所述处理器耦合的存储器中的特殊指令相互配合来实现);在另一种实现方式下,后端存储模块、第一获取模块、第二获取模块和第三获取模块也可以分别通过专有电路来实现,具体实现方式参见现有技术,这里不再赘述;在再一种实现方式下,后端存储模块、第一获取模块、第二获取模块和第三获取模块也可以通过现场可编程门阵列(FPGA,Field-Programmable Gate Array)来实现,具体实现方式参见现有技术,这里不再赘述,本发明包括但不限于前述实现方式,应当理解的是,只要按照本发明的思想实现的方案,都落入本发明实施例所保护的范围。
本实施例还提供了一种物理主机。如图11所示,物理主机1100可以包括:硬件器件以及软件器件两部分。其中,硬件器件包括硬件层,软件器件包括运行在硬件层上的宿主机Host,以及运行在Host上的虚拟机,Host还包括上述实施例中的确定读写路径的装置800。
硬件器件也可称“硬件处理模块”,或者更简单的,也可简称为“硬件”,硬件器件主要包括基于FPGA、ASIC之类专用硬件电路(也会配合其他配套器件,如存储器)来实现某些特定功能的硬件电路,其处理速度相比通用处理器往往要快很多,但功能一经定制,便很难更改,因此,实现起来并不灵活,通常用来处理一些固定的功能。需要说明的是,硬件器件在实际应用中,也可以包括MCU(微处理器,如单片机)、或者CPU等处理器,但这些处理器的主要功能并不是完成大数据的处理,而主要用于进行一些控制,在这种应用场景下,由这些器件搭配的***为硬件器件。
软件器件(或者也简单“软件”)主要包括通用的处理器(例如CPU)及其一些配套的器件(如内存、硬盘等存储设备),可以通过编程来让处理器具备相应的处理功能,用软件来实现时,可以根据业务需求灵活配置,但往往速度相比硬件器件来说要慢。
本实施例中,软件器件用于根据读写请求确定合适的读写路径,硬件器件完成读写请求对应的读写操作。硬件器件及软件器件的其他功能在前述实施例中已经详细论述,这里不再赘述。
因此,根据本发明实施例的确定读写路径的装置,根据读写请求和地址转换信息集合确定合适的读写路径,能够兼顾存储性能和存储功能。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的***、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质
中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。
Claims (21)
- 一种确定读写路径的方法,所述方法用于物理主机,所述物理主机包括硬件层、运行在所述硬件层之上的宿主机Host、以及运行在所述Host之上的虚拟机,所述Host包括块设备以及虚拟块设备,其特征在于,包括:所述Host获取所述虚拟机的第一读写请求,所述第一读写请求包括第一虚拟地址;在地址转换信息集合中查找所述第一虚拟地址,其中,所述地址转换信息集合包括虚拟地址与物理块设备的信息的对应关系,所述物理块设备的信息包括读写标识;在所述地址转换信息集合中包括所述第一虚拟地址,且所述第一读写请求为读请求的情况下,通过所述第一虚拟地址对应的块设备处理所述第一读写请求;或者,在所述地址转信息集合中包括所述第一虚拟地址,所述第一读写请求为写请求,且所述第一虚拟地址对应的第一读写标识指示可读可写的情况下,通过所述块设备处理所述第一读写请求;或者,在所述地址转换信息集合中包括所述第一虚拟地址,所述第一读写请求为写请求,且所述第一虚拟地址对应的第一读写标识指示只读的情况下,通过所述虚拟块设备处理所述第一读写请求;或者,在所述地址转换信息集合中不包括所述第一虚拟地址的情况下,通过所述虚拟块设备处理所述第一读写请求。
- 根据权利要求1所述的方法,其特征在于,所述物理块设备的信息还包括物理块设备标识和物理地址,所述通过所述第一虚拟地址对应的块设备处理所述第一读写请求包括:将所述第一读写请求转换为块设备读写请求,所述块设备读写请求包括所述第一虚拟地址对应的第一物理地址和第一物理块设备标识;通过所述第一虚拟地址对应的块设备处理所述块设备读写请求。
- 根据权利要求1所述的方法,其特征在于,在所述地址转换信息集合中包括所述第一虚拟地址,所述第一读写请求为写请求,且所述第一虚拟地址对应的第一读写标识指示只读的情况下,所述方法还包括:在所述地址转换信息集合中删除所述第一虚拟地址对应的初始记录。
- 根据权利要求1所述的方法,其特征在于,在所述地址转换信息集 合中不包括所述第一虚拟地址的情况下,所述方法还包括:根据所述第一读写请求获取所述第一虚拟地址对应的第一物理地址、第一物理块设备标识和第一读写标识;将获取的所述第一虚拟地址、所述第一物理地址、所述第一物理块设备标识和所述第一读写标识的对应关系添加到所述地址转换信息集合中。
- 根据权利要求3所述的方法,其特征在于,所述方法还包括:根据所述第一读写请求获取所述第一虚拟地址对应的第一物理地址、第一物理块设备标识和第一读写标识;将获取的所述第一虚拟地址、所述第一物理地址、所述第一物理块设备标识和所述第一读写标识的对应关系添加到所述地址转换信息集合中。
- 根据权利要求1至5中任一项所述的方法,其特征在于,所述方法还包括:确定是否开启存储高级服务;所述在地址转换信息集合中查找所述第一虚拟地址包括:在未开启存储高级服务的情况下,在地址转换信息集合中查找所述第一虚拟地址。
- 根据权利要求6所述的方法,其特征在于,所述确定是否开启存储高级服务包括:获取路径切换指示,所述路径切换指示用于指示是否开启所述存储高级服务;根据所述路径切换指示确定是否开启存储高级服务。
- 根据权利要求1至7中任一项所述的方法,其特征在于,所述物理块设备的信息还包括物理地址和物理块设备标识,在所述地址转换信息集合中包括所述第一虚拟地址的情况下,所述方法还包括:获取所述第一虚拟地址对应的第一物理地址和第一物理块设备标识;根据所述第一虚拟地址对应的虚拟磁盘的格式,确定所述第一虚拟地址对应的所述第一读写标识;创建所述地址转换信息集合,所述地址转换信息集合包括所述第一虚拟地址、所述第一物理地址、所述第一物理块设备标识和所述第一读写标识的对应关系。
- 根据权利要求8所述的方法,其特征在于,所述根据所述第一虚拟地址对应的虚拟磁盘的格式,确定所述第一虚拟地址对应的所述第一读写标 识,包括:在所述第一虚拟地址对应厚置备虚拟磁盘或精简置备磁盘的情况下,确定所述第一读写标识指示可读可写;在所述第一虚拟地址对应差分镜像虚拟磁盘,且所述第一虚拟地址对应子镜像文件的情况下,确定所述第一读写标识指示可读可写;在所述第一虚拟地址对应差分镜像虚拟磁盘,且所述第一虚拟地址对应父镜像文件的情况下,确定所述第一读写标识指示只读。
- 根据权利要求1至9所述的方法,其特征在于,所述获取第一读写请求包括:从存储前端和存储后端共享的输入输出IO环中获取所述虚拟机的第二读写请求,所述第二读写请求包括第二虚拟地址;从所述第二读写请求中拆分出所述第一读写请求,所述第一虚拟地址为所述第二虚拟地址中的部分虚拟地址。
- 一种确定读写路径的装置,其特征在于,所述装置应用于物理主机,所述物理主机运行有虚拟机,其特征在于,所述装置包括:存储后端模块,用于:获取所述虚拟机的第一读写请求,所述第一读写请求包括第一虚拟地址;在地址转换信息集合中查找所述第一虚拟地址,其中,所述地址转换信息集合包括虚拟地址与物理块设备的信息的对应关系,所述物理块设备的信息包括读写标识;块设备,用于在所述地址转换信息集合中包括所述第一虚拟地址,且所述第一读写请求为读请求的情况下,或者在所述地址转信息集合中包括所述第一虚拟地址,所述第一读写请求为写请求,且所述第一虚拟地址对应的第一读写标识指示可读可写的情况下,处理所述第一读写请求;虚拟块设备,用于在所述地址转换信息集合中包括所述第一虚拟地址,所述第一读写请求为写请求,且所述第一虚拟地址对应的第一读写标识指示只读的情况下,或者在所述地址转换信息集合中不包括所述第一虚拟地址的情况下,处理所述第一读写请求。
- 根据权利要求11所述的装置,其特征在于,所述物理块设备的信息还包括物理块设备标识和物理地址,所述存储后端模块还用于:将所述第一读写请求转换为块设备读写请求,所述块设备读写请求包括所述第一虚拟地址对应的第一物理地址和第一物理块设备标识;所述块设备具体用于处理所述块设备读写请求。
- 根据权利要求11所述的装置,其特征在于,所述存储后端模块还用于,在所述地址转换信息集合中包括所述第一虚拟地址,所述第一读写请求为写请求,且所述第一虚拟地址对应的第一读写标识指示只读的情况下,在所述地址转换信息集合中删除所述第一虚拟地址对应的初始记录。
- 根据权利要求11所述的装置,其特征在于,还包括:第一获取模块,用于在所述地址转换信息集合中不包括所述第一虚拟地址的情况下,根据所述第一读写请求获取所述第一虚拟地址对应的第一物理地址、第一物理块设备标识和第一读写标识;所述存储后端模块将所述第一获取模块获取的所述第一虚拟地址、所述第一物理地址、所述第一物理块设备标识和所述第一读写标识的对应关系添加到所述地址转换信息集合中。
- 根据权利要求13所述的装置,其特征在于,还包括:第一获取模块,用于根据所述第一读写请求获取所述第一虚拟地址对应的第一物理地址、第一物理块设备标识和第一读写标识;所述存储后端模块还用于,将所述第一获取模块获取的所述第一虚拟地址、所述第一物理地址、所述第一物理块设备标识和所述第一读写标识的对应关系添加到所述地址转换信息集合中。
- 根据权利要求11至15中任一项所述的装置,其特征在于,所述存储后端模块具体用于:确定是否开启存储高级服务;在未开启存储高级服务的情况下,在所述地址转换信息集合中查找所述第一虚拟地址。
- 根据权利要求16所述的装置,其特征在于,还包括:第二获取模块,用于获取路径切换指示,所述路径切换指示用于指示是否开启所述存储高级服务;所述存储后端模块具体用于根据所述路径切换指示确定是否开启存储高级服务。
- 根据权利要求11至17中任一项所述的装置,其特征在于,还包括: 第三获取模块,用于:在所述地址转换信息集合中包括所述第一虚拟地址的情况下,获取所述第一虚拟地址对应的第一物理地址和第一物理块设备标识;根据所述第一虚拟地址对应的虚拟磁盘的格式,确定所述第一虚拟地址对应的所述第一读写标识;所述存储后端模块还用于,创建所述地址转换信息集合,所述地址转换信息集合包括所述第一虚拟地址、所述第一物理地址、所述第一物理块设备标识和所述第一读写标识的对应关系。
- 根据权利要求18所述的装置,其特征在于,所述第三获取模块具体用于:在所述第一虚拟地址对应厚置备虚拟磁盘或精简置备磁盘的情况下,确定所述第一读写标识指示可读可写;在所述第一虚拟地址对应差分镜像虚拟磁盘,且所述第一虚拟地址对应子镜像文件的情况下,确定所述第一读写标识指示可读可写;在所述第一虚拟地址对应差分镜像虚拟磁盘,且所述第一虚拟地址对应父镜像文件的情况下,确定所述第一读写标识指示只读。
- 根据权利要求11至19中任一项所述的装置,其特征在于,所述存储后端模块具体用于:从存储前端和存储后端共享的输入输出IO环中获取所述虚拟机的第二读写请求,所述第二读写请求包括第二虚拟地址;从所述第二读写请求中拆分出所述第一读写请求,所述第一虚拟地址为所述第二虚拟地址中的部分虚拟地址。
- 一种物理主机,其特征在于,所述物理主机包括硬件层、运行在所述硬件层之上的宿主机Host、以及运行在所述Host之上的虚拟机,所述Host包括块设备以及虚拟块设备,所述Host包括如权利要求11到20中任一所述的确定读写路径的装置。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP15879529.4A EP3249515B1 (en) | 2015-01-30 | 2015-04-27 | Method and apparatus for determining read/write path |
US15/663,570 US10642539B2 (en) | 2015-01-30 | 2017-07-28 | Read/write path determining method and apparatus |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510050407.X | 2015-01-30 | ||
CN201510050407.XA CN104598170B (zh) | 2015-01-30 | 2015-01-30 | 确定读写路径的方法和装置 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/663,570 Continuation US10642539B2 (en) | 2015-01-30 | 2017-07-28 | Read/write path determining method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
WO2016119322A1 true WO2016119322A1 (zh) | 2016-08-04 |
WO2016119322A8 WO2016119322A8 (zh) | 2016-11-10 |
Family
ID=53123997
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/077479 WO2016119322A1 (zh) | 2015-01-30 | 2015-04-27 | 确定读写路径的方法和装置 |
Country Status (4)
Country | Link |
---|---|
US (1) | US10642539B2 (zh) |
EP (1) | EP3249515B1 (zh) |
CN (1) | CN104598170B (zh) |
WO (1) | WO2016119322A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106961475A (zh) * | 2017-03-14 | 2017-07-18 | 云宏信息科技股份有限公司 | 一种基于nbd的远程磁盘共享方法和共享*** |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105700826A (zh) * | 2015-12-31 | 2016-06-22 | 华为技术有限公司 | 虚拟化方法和装置 |
CN106201652B (zh) * | 2016-06-29 | 2020-05-26 | 联想(北京)有限公司 | 一种数据处理方法及虚拟机 |
CN107463369B (zh) * | 2017-06-30 | 2020-10-16 | 北京北信源软件股份有限公司 | 一种虚拟桌面的接入设备控制方法与装置 |
US11003372B2 (en) | 2018-05-31 | 2021-05-11 | Portworx, Inc. | Protecting volume namespaces from corruption in a distributed container orchestrator |
US10942670B2 (en) * | 2018-12-06 | 2021-03-09 | Vmware, Inc. | Direct access flash transition layer |
US11409619B2 (en) | 2020-04-29 | 2022-08-09 | The Research Foundation For The State University Of New York | Recovering a virtual machine after failure of post-copy live migration |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101288054A (zh) * | 2004-07-30 | 2008-10-15 | M-***快闪盘开拓者公司 | 快闪文件***中的虚拟至物理地址翻译 |
CN101419535A (zh) * | 2008-11-19 | 2009-04-29 | 北京航空航天大学 | 虚拟机的分布式虚拟磁盘*** |
CN102375695A (zh) * | 2010-08-23 | 2012-03-14 | 联想(北京)有限公司 | 一种磁盘的访问方法及计算机*** |
CN103098043A (zh) * | 2010-09-10 | 2013-05-08 | 国际商业机器公司 | 随需虚拟机映像流式传输 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7669032B2 (en) * | 2003-11-26 | 2010-02-23 | Symantec Operating Corporation | Host-based virtualization optimizations in storage environments employing off-host storage virtualization |
JP5261661B2 (ja) * | 2005-05-24 | 2013-08-14 | ストラタス・テクノロジーズ・バミューダ・リミテッド | 対称型マルチプロセッサ・フォルトトレラントコンピュータシステム |
US8700852B2 (en) * | 2010-02-03 | 2014-04-15 | International Business Machines Corporation | Processing read and write requests in a storage controller |
US8683466B2 (en) * | 2011-05-24 | 2014-03-25 | Vmware, Inc. | System and method for generating a virtual desktop |
US10019159B2 (en) * | 2012-03-14 | 2018-07-10 | Open Invention Network Llc | Systems, methods and devices for management of virtual memory systems |
-
2015
- 2015-01-30 CN CN201510050407.XA patent/CN104598170B/zh active Active
- 2015-04-27 EP EP15879529.4A patent/EP3249515B1/en active Active
- 2015-04-27 WO PCT/CN2015/077479 patent/WO2016119322A1/zh active Application Filing
-
2017
- 2017-07-28 US US15/663,570 patent/US10642539B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101288054A (zh) * | 2004-07-30 | 2008-10-15 | M-***快闪盘开拓者公司 | 快闪文件***中的虚拟至物理地址翻译 |
CN101419535A (zh) * | 2008-11-19 | 2009-04-29 | 北京航空航天大学 | 虚拟机的分布式虚拟磁盘*** |
CN102375695A (zh) * | 2010-08-23 | 2012-03-14 | 联想(北京)有限公司 | 一种磁盘的访问方法及计算机*** |
CN103098043A (zh) * | 2010-09-10 | 2013-05-08 | 国际商业机器公司 | 随需虚拟机映像流式传输 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3249515A4 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106961475A (zh) * | 2017-03-14 | 2017-07-18 | 云宏信息科技股份有限公司 | 一种基于nbd的远程磁盘共享方法和共享*** |
Also Published As
Publication number | Publication date |
---|---|
CN104598170B (zh) | 2017-12-05 |
EP3249515A4 (en) | 2018-03-07 |
CN104598170A (zh) | 2015-05-06 |
EP3249515A1 (en) | 2017-11-29 |
EP3249515B1 (en) | 2022-04-06 |
WO2016119322A8 (zh) | 2016-11-10 |
US20180018135A1 (en) | 2018-01-18 |
US10642539B2 (en) | 2020-05-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2016119322A1 (zh) | 确定读写路径的方法和装置 | |
CN107209681B (zh) | 一种存储设备访问方法、装置和*** | |
US9575786B2 (en) | System and method for raw device mapping in traditional NAS subsystems | |
US7945436B2 (en) | Pass-through and emulation in a virtual machine environment | |
US10067777B2 (en) | Supporting multiple operating system environments in computing device without contents conversion | |
US10620963B2 (en) | Providing fallback drivers for IO devices in a computing system | |
JP2016167143A (ja) | 情報処理システムおよび情報処理システムの制御方法 | |
US11231953B2 (en) | Minimizing downtime when importing virtual machines from other platforms | |
US11016817B2 (en) | Multi root I/O virtualization system | |
WO2016101282A1 (zh) | 一种i/o任务处理的方法、设备和*** | |
US11709692B2 (en) | Hot growing a cloud hosted block device | |
US9424205B2 (en) | System and method for SATA virtualization and domain protection | |
US20170337064A1 (en) | System and method for booting an information handling system | |
WO2017097176A1 (zh) | 一种操作***启动的方法、装置及*** | |
US9864621B2 (en) | Virtual machine joiner | |
CN114417373A (zh) | 一种NVMe-oF用户态客户端的数据访问方法和装置 | |
US9729660B2 (en) | Method and system for detecting virtual machine migration | |
US11263082B2 (en) | Data recovery of guest virtual machines | |
US20220358049A1 (en) | Memory access handling for peripheral component interconnect devices | |
WO2017097114A1 (zh) | 一种共享文件的访问方法、***及相关设备 | |
US11194606B2 (en) | Managing related devices for virtual machines utilizing shared device data | |
US10754676B2 (en) | Sharing ownership of an input/output device using a device driver partition | |
US10831520B2 (en) | Object to object communication between hypervisor and virtual machines | |
US11822948B2 (en) | Peripheral component interconnect (PCI) device removal for virtual machines |
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: 15879529 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
REEP | Request for entry into the european phase |
Ref document number: 2015879529 Country of ref document: EP |