libvirt/docs/schemas
Eric Blake 232a31bea3 blockcommit: track job type in xml
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>
2014-07-30 06:32:38 -06:00
..
basictypes.rng storage: Introduce parentaddr into virStoragePoolSourceAdapter 2014-07-21 12:55:10 -04:00
capability.rng virCaps: expose pages info 2014-06-19 15:10:49 +02:00
domain.rng conf: set up for per-grammar overrides in schemas 2014-04-15 21:07:59 +02:00
domaincaps.rng Introduce domain_capabilities 2014-07-03 12:22:37 +02:00
domaincommon.rng blockcommit: track job type in xml 2014-07-30 06:32:38 -06:00
domainsnapshot.rng conf: split <disk> schema into more pieces 2014-04-16 10:45:55 +02:00
interface.rng interface: report link state for bonds and vlans too 2014-06-20 11:43:19 +03:00
Makefile.am Introduce domain_capabilities 2014-07-03 12:22:37 +02:00
network.rng Add forwarder attribute to <dns/> element 2013-09-17 17:47:33 -06:00
networkcommon.rng Add '<nat>' element to '<forward>' network schemas 2013-09-05 13:45:49 +02:00
nodedev.rng Add unique_id to nodedev output 2014-07-21 12:55:11 -04:00
nwfilter.rng Correct invalid RNG schemas 2013-03-21 17:24:08 +01:00
secret.rng secret: add iscsi to possible usage types 2013-03-22 12:10:23 +08:00
storagecommon.rng conf: set up for per-grammar overrides in schemas 2014-04-15 21:07:59 +02:00
storagepool.rng schema: pool: netfs: Don't enforce slash in glusterfs pool source 2014-07-21 18:28:17 +02:00
storagevol.rng storagevol: add nocow to vol xml 2014-07-16 13:35:20 +02:00