libvirt/src/qemu
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
..
libvirtd_qemu.aug migration: add support for migrateURI configuration 2014-05-20 13:13:29 +02:00
MIGRATION.txt qemu: Implement migration job phases 2011-07-27 08:45:09 -06:00
qemu_agent.c avoid 'sync' as variable name 2014-05-19 18:40:02 +02:00
qemu_agent.h qemu: Implement virDomain{Get,Set}Time 2014-05-15 16:44:45 +02:00
qemu_capabilities.c qemu: Implement ./hugepages/page/[@size, @unit, @nodeset] 2014-07-29 12:14:52 +01:00
qemu_capabilities.h qemu: Implement ./hugepages/page/[@size, @unit, @nodeset] 2014-07-29 12:14:52 +01:00
qemu_cgroup.c conf: RNG: Always fill in default random source path for default backend 2014-07-28 10:07:09 +02:00
qemu_cgroup.h qemu: leave restricting cpuset.mems after initialization 2014-07-16 20:15:46 +02:00
qemu_command.c qemu: error out if PCI passthrough type is not supported 2014-07-29 15:35:08 +02:00
qemu_command.h Add virConnectPtr for qemuBuildSCSIHostdevDrvStr 2014-07-24 06:39:28 -04:00
qemu_conf.c qemu: Utilize virFileFindHugeTLBFS 2014-07-29 11:58:35 +01:00
qemu_conf.h qemu: Utilize virFileFindHugeTLBFS 2014-07-29 11:58:35 +01:00
qemu_domain.c qemu: Add helper to initialize storage file backend with correct uid/gid 2014-07-08 14:27:19 +02:00
qemu_domain.h qemu: Add helper to initialize storage file backend with correct uid/gid 2014-07-08 14:27:19 +02:00
qemu_driver.c blockcommit: track job type in xml 2014-07-30 06:32:38 -06:00
qemu_driver.h Change file names in comments to match the files they are in 2014-03-10 14:26:04 +01:00
qemu_hostdev.c drivers: use virDirRead API 2014-04-28 17:52:45 -06:00
qemu_hostdev.h Capitalize USB, PCI and SCSI in hostdev methods 2014-03-12 16:20:01 +00:00
qemu_hotplug.c hostdev: Introduce virDomainHostdevSubsysSCSIiSCSI 2014-07-24 07:04:44 -04:00
qemu_hotplug.h Add virConnectPtr for qemuBuildSCSIHostdevDrvStr 2014-07-24 06:39:28 -04:00
qemu_hotplugpriv.h qemu: Let tests override waiting time for device unplug 2013-08-26 16:09:55 +02:00
qemu_migration.c storage: Move readonly and shared flags to disk source from disk def 2014-07-08 14:27:19 +02:00
qemu_migration.h qemu: enum cleanups in "src/qemu/*" 2014-06-24 12:56:54 -06:00
qemu_monitor_json.c qemu: allow qmp probing for cmdline options without params 2014-07-16 20:15:46 +02:00
qemu_monitor_json.h qemu: allow qmp probing for cmdline options without params 2014-07-16 20:15:46 +02:00
qemu_monitor_text.c Use virBufferCheckError everywhere we report OOM error 2014-07-03 10:48:14 +02:00
qemu_monitor_text.h conf: more enum cleanups in "src/conf/domain_conf.h" 2014-06-02 15:32:58 -06:00
qemu_monitor.c qemu: allow qmp probing for cmdline options without params 2014-07-16 20:15:46 +02:00
qemu_monitor.h qemu: allow qmp probing for cmdline options without params 2014-07-16 20:15:46 +02:00
qemu_process.c blockcommit: track job type in xml 2014-07-30 06:32:38 -06:00
qemu_process.h qemu: enum cleanups in "src/qemu/*" 2014-06-24 12:56:54 -06:00
qemu_processpriv.h qemu: Export qemuProcessHandleDeviceDeleted for tests 2013-08-26 16:09:55 +02:00
qemu.conf qemu: Utilize virFileFindHugeTLBFS 2014-07-29 11:58:35 +01:00
test_libvirtd_qemu.aug.in migration: add support for migrateURI configuration 2014-05-20 13:13:29 +02:00
THREADS.txt Remove qemuDriverLock from almost everywhere 2013-02-13 11:10:30 +00:00