]> xenbits.xensource.com Git - libvirt.git/commit
qemu: hotplug: Add helper to initialize/teardown new disks for VMs
authorPeter Krempa <pkrempa@redhat.com>
Tue, 5 Aug 2014 12:53:01 +0000 (14:53 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 20 Aug 2014 07:28:03 +0000 (09:28 +0200)
commitca91ba78bd7c35526e3f6dace394494fc01e0b3d
tree3a2fa3aa7ec70457a78b746126d0f700b1d23903
parent240eb2fb8973929eccbdd2a0ddcc0905094b54a9
qemu: hotplug: Add helper to initialize/teardown new disks for VMs

When we are changing media (or doing other hotplug operations) we need
to setup cgroups, locking and seclabels on the new disk. This is a
multi-step process where every piece can fail. To simplify dealing with
this introduce qemuDomainPrepareDisk that similarly to
qemuDomainPrepareDiskChainElement initializes/tears down  a whole new
disk to be used with the domain.

Additionally the function supports passing a different source struct for
media changes of cdroms that will be refactored later.
src/qemu/qemu_driver.c
src/qemu/qemu_hotplug.c