]> xenbits.xensource.com Git - libvirt.git/commit
blockjob: wire up online qemu block-commit
authorEric Blake <eblake@redhat.com>
Wed, 3 Oct 2012 18:54:09 +0000 (12:54 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 19 Oct 2012 23:35:11 +0000 (17:35 -0600)
commit2cbc1fd8922c8a42c8244d1b96b834a549dbbc7f
tree10aad4b5cab17a724a67585f0b994507b93340ff
parent3f38c7e3a92c91c9132275493132306c10e62039
blockjob: wire up online qemu block-commit

This is the bare minimum to kick off a block commit.  In particular,
flags support is missing (shallow requires us to crawl the backing
chain to determine the file name to pass to the qemu monitor command;
delete requires us to track what needs to be deleted at the time
the completion event fires).  Also, we are relying on qemu to do
error checking (such as validating 'top' and 'base' as being members
of the backing chain), including the fact that the current qemu code
does not support committing the active layer (although it is still
planned to add that before qemu 1.3).  Since the active layer won't
change, we have it easy and do not have to alter the domain XML.
Additionally, this will fail if SELinux is enforcing, because we fail
to grant qemu proper read/write access to the files it will modify.

* src/qemu/qemu_driver.c (qemuDomainBlockCommit): New function.
(qemuDriver): Register it.
src/qemu/qemu_driver.c