mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +00:00
9a212d6708
Doing a blockcopy operation across a libvirtd restart is not very robust at the moment. In particular, we are clearing the <mirror> element prior to telling qemu to finish the job. Also, thanks to the ability to request async completion, the user can easily regain control prior to qemu actually finishing the effort, and they should be able to poll the domain XML to see if the job is still going. A future patch will fix things to actually wait until qemu is done before modifying the XML to reflect the job completion. But since qemu issues identical BLOCK_JOB_COMPLETE events regardless of whether the job was cancelled (kept the original disk) or completed (pivoted to the new disk), we have to track which of the two operations were used to end the job. Furthermore, we'd like to avoid attempts to end a job where we are already waiting on an earlier request to qemu to end the job. Likewise, if we miss the qemu event (perhaps because it arrived during a libvirtd restart), we still need enough state recorded to be able to determine how to modify the domain XML once we reconnect to qemu and manually learn whether the job still exists. Although this patch doesn't actually fix the problem, it is a preliminary step that makes it possible to track whether a job has already begun steps towards completion. * src/conf/domain_conf.h (virDomainDiskMirrorState): New enum. (_virDomainDiskDef): Convert bool mirroring to new enum. * src/conf/domain_conf.c (virDomainDiskDefParseXML) (virDomainDiskDefFormat): Handle new values. * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Adjust client. * src/qemu/qemu_driver.c (qemuDomainBlockPivot) (qemuDomainBlockJobImpl): Likewise. * docs/schemas/domaincommon.rng (diskMirror): Expose new values. * docs/formatdomain.html.in (elementsDisks): Document it. * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: Test it. Signed-off-by: Eric Blake <eblake@redhat.com> |
||
---|---|---|
.. | ||
api_extension | ||
devhelp | ||
html | ||
internals | ||
schemas | ||
32favicon.png | ||
404.html.in | ||
acl.html.in | ||
aclpolkit.html.in | ||
api_extension.html.in | ||
api.html.in | ||
apibuild.py | ||
apps.html.in | ||
archdomain.html.in | ||
architecture.fig | ||
architecture.gif | ||
architecture.html.in | ||
archnetwork.html.in | ||
archnode.html.in | ||
archstorage.html.in | ||
auditlog.html.in | ||
auth.html.in | ||
bindings.html.in | ||
bugs.html.in | ||
cgroups.html.in | ||
compiling.html.in | ||
contact.html.in | ||
csharp.html.in | ||
deployment.html.in | ||
devguide.html.in | ||
docs.html.in | ||
downloads.html.in | ||
drivers.html.in | ||
drvbhyve.html.in | ||
drvesx.html.in | ||
drvhyperv.html.in | ||
drvlxc.html.in | ||
drvopenvz.html.in | ||
drvparallels.html.in | ||
drvphyp.html.in | ||
drvqemu.html.in | ||
drvremote.html.in | ||
drvtest.html.in | ||
drvuml.html.in | ||
drvvbox.html.in | ||
drvvmware.html.in | ||
drvxen.html.in | ||
errors.html.in | ||
et.png | ||
firewall.html.in | ||
footer_corner.png | ||
footer_pattern.png | ||
format.html.in | ||
formatcaps.html.in | ||
formatdomain.html.in | ||
formatdomaincaps.html.in | ||
formatnetwork.html.in | ||
formatnode.html.in | ||
formatnwfilter.html.in | ||
formatsecret.html.in | ||
formatsnapshot.html.in | ||
formatstorage.html.in | ||
formatstorageencryption.html.in | ||
genaclperms.pl | ||
generic.css | ||
goals.html.in | ||
governance.html.in | ||
hacking1.xsl | ||
hacking2.xsl | ||
hacking.html.in | ||
hooks.html.in | ||
hvsupport.pl | ||
index.html.in | ||
index.py | ||
internals.html.in | ||
intro.html.in | ||
java.html.in | ||
library.xen | ||
libvirt-daemon-arch.fig | ||
libvirt-daemon-arch.png | ||
libvirt-driver-arch.fig | ||
libvirt-driver-arch.png | ||
libvirt-header-bg.png | ||
libvirt-header-logo.png | ||
libvirt-net-logical.fig | ||
libvirt-net-logical.png | ||
libvirt-net-physical.fig | ||
libvirt-net-physical.png | ||
libvirt-object-model.fig | ||
libvirt-object-model.png | ||
libvirt-virConnect-example.fig | ||
libvirt-virConnect-example.png | ||
libvirt.css | ||
libvirtLogo404.png | ||
libvirtLogo.png | ||
locking.html.in | ||
logging.html.in | ||
madeWith.png | ||
main.css | ||
Makefile.am | ||
migration-managed-direct.fig | ||
migration-managed-direct.png | ||
migration-managed-p2p.fig | ||
migration-managed-p2p.png | ||
migration-native.fig | ||
migration-native.png | ||
migration-tunnel.fig | ||
migration-tunnel.png | ||
migration-unmanaged-direct.fig | ||
migration-unmanaged-direct.png | ||
migration.html.in | ||
newapi.xsl | ||
news.html.in | ||
news.xsl | ||
node.fig | ||
node.gif | ||
page.xsl | ||
pending.html.in | ||
php.html.in | ||
python.html.in | ||
relatedlinks.html.in | ||
remote.html.in | ||
search.php.code.in | ||
search.php.in | ||
secureusage.html.in | ||
securityprocess.html.in | ||
site.xsl | ||
sitemap.html.in | ||
storage.html.in | ||
structures.fig | ||
subsite.xsl | ||
testapi.html.in | ||
testsuites.html.in | ||
testtck.html.in | ||
todo.cfg-example | ||
todo.pl | ||
uri.html.in | ||
virshcmdref.html.in | ||
windows.html.in | ||
wrapstring.xsl |