mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
232a31bea3
A future patch is going to wire up qemu active block commit jobs; but as they have similar events and are canceled/pivoted in the same way as block copy jobs, it is easiest to track all bookkeeping for the commit job by reusing the <mirror> element. This patch adds domain XML to track which job was responsible for creating a mirroring situation, and adds a job='copy' attribute to all existing uses of <mirror>. Along the way, it also massages the qemu monitor backend to read the new field in order to generate the correct type of libvirt job (even though it requires a future patch to actually cause a qemu event that can be reported as an active commit). It also prepares to update persistent XML to match changes made to live XML when a copy completes. * docs/schemas/domaincommon.rng: Enhance schema. * docs/formatdomain.html.in: Document it. * src/conf/domain_conf.h (_virDomainDiskDef): Add a field. * src/conf/domain_conf.c (virDomainBlockJobType): String conversion. (virDomainDiskDefParseXML): Parse job type. (virDomainDiskDefFormat): Output job type. * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Distinguish active from regular commit. * src/qemu/qemu_driver.c (qemuDomainBlockCopy): Set job type. (qemuDomainBlockPivot, qemuDomainBlockJobImpl): Clean up job type on completion. * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old.xml: Update tests. * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: Likewise. * tests/qemuxml2argvdata/qemuxml2argv-disk-active-commit.xml: New file. * tests/qemuxml2xmltest.c (mymain): Drive new test. Signed-off-by: Eric Blake <eblake@redhat.com> |
||
---|---|---|
.. | ||
qemuxml2xmlout-balloon-device-auto.xml | ||
qemuxml2xmlout-channel-virtio-auto.xml | ||
qemuxml2xmlout-console-compat-auto.xml | ||
qemuxml2xmlout-console-virtio.xml | ||
qemuxml2xmlout-cpu-numa1.xml | ||
qemuxml2xmlout-cpu-numa2.xml | ||
qemuxml2xmlout-disk-backing-chains-active.xml | ||
qemuxml2xmlout-disk-backing-chains-inactive.xml | ||
qemuxml2xmlout-disk-drive-discard.xml | ||
qemuxml2xmlout-disk-mirror-old-inactive.xml | ||
qemuxml2xmlout-disk-mirror-old.xml | ||
qemuxml2xmlout-disk-mirror.xml | ||
qemuxml2xmlout-disk-scsi-device-auto.xml | ||
qemuxml2xmlout-disk-source-pool.xml | ||
qemuxml2xmlout-graphics-listen-network2.xml | ||
qemuxml2xmlout-graphics-spice-timeout.xml | ||
qemuxml2xmlout-hostdev-scsi-autogen-address.xml | ||
qemuxml2xmlout-memtune-unlimited.xml | ||
qemuxml2xmlout-memtune.xml | ||
qemuxml2xmlout-metadata.xml | ||
qemuxml2xmlout-numad-auto-memory-vcpu-cpuset.xml | ||
qemuxml2xmlout-numad-auto-memory-vcpu-no-cpuset-and-placement.xml | ||
qemuxml2xmlout-numad-auto-vcpu-no-numatune.xml | ||
qemuxml2xmlout-numatune-auto-prefer.xml | ||
qemuxml2xmlout-numatune-memnode.xml | ||
qemuxml2xmlout-pci-autoadd-addr.xml | ||
qemuxml2xmlout-pci-autoadd-idx.xml | ||
qemuxml2xmlout-pci-bridge-many-disks.xml | ||
qemuxml2xmlout-pcie-root.xml | ||
qemuxml2xmlout-pcihole64-gib.xml | ||
qemuxml2xmlout-q35.xml | ||
qemuxml2xmlout-s390-defaultconsole.xml | ||
qemuxml2xmlout-seclabel-dynamic-labelskip.xml | ||
qemuxml2xmlout-serial-target-port-auto.xml | ||
qemuxml2xmlout-usb-ich9-ehci-addr.xml |