This series requires few patches I've posted, namely:
https://www.redhat.com/archives/libvir-list/2019-July/msg00669.html
https://www.redhat.com/archives/libvir-list/2019-June/msg01133.html
which were not yet pushed upstream.
For convenience you can fetch the patches including deps by:
git fetch
https://github.com/pipo/libvirt.git job-tracking-send
Further patches will build on top of this to add metadata for individual
jobs for supporting blockdev and will be posted later as they require
some cleanups.
Peter Krempa (25):
qemu: domain: Repurpose and export helper for saving domain status XML
qemu: domain: Add helper for saving config XML
qemu: blockjob: Use VIR_AUTOUNREF in qemuBlockJobDataNew
qemu: blockjob: Separate and unify block job (un)registration
qemu: domain: Add global table of blockjobs
qemu: blockjob: Register new and running blockjobs in the global table
qemu: blockjob: Add string convertors for blockjob type and state
enums
qemu: blockjob: Export functions for allocating and registering job
data
qemu: blockjob: Add flag for invalid block job data
qemu: domain: Store blockjob data in the status XML
qemu: blockjob: Save status XML when modifying job state
qemu: driver: Remove unnecessary saving of status XML
tests: qemustatusxml2xml: Add test case for block job tracking
qemu: blockjob: Add 'concluded' state for a block job
qemu: process: Don't trigger BLOCK_JOB* events with -blockdev
qemu: blockjob: Add helper to convert monitor job status to internal
state
qemu: Add handler for job state change event
qemu: blockjob: Add modern block job event handler
qemu: process: Refresh -blockdev based blockjobs on reconnect to qemu
conf: export virDomainDiskBackingStoreParse
conf: export virDomainDiskBackingStoreFormat
qemu: blockjob: Track orphaned backing chains in blockjob status XML
qemu: Detect managed persistent reservations in block job orphan
chains
qemu: blockjob: Unplug inherited storage chains when concluding
blockjob
qemu: hotplug: Transfer ownership of backing chain to block job on
disk unplug
src/conf/domain_conf.c | 4 +-
src/conf/domain_conf.h | 13 +
src/libvirt_private.syms | 2 +
src/qemu/qemu_blockjob.c | 465 ++++++++++++++++--
src/qemu/qemu_blockjob.h | 40 +-
src/qemu/qemu_domain.c | 327 +++++++++++-
src/qemu/qemu_domain.h | 9 +
src/qemu/qemu_driver.c | 64 +--
src/qemu/qemu_hotplug.c | 19 +-
src/qemu/qemu_migration.c | 6 +-
src/qemu/qemu_process.c | 89 +++-
.../blockjob-blockdev-in.xml | 403 +++++++++++++++
.../blockjob-blockdev-out.xml | 1 +
tests/qemuxml2xmltest.c | 2 +
14 files changed, 1349 insertions(+), 95 deletions(-)
create mode 100644 tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml
create mode 120000 tests/qemustatusxml2xmldata/blockjob-blockdev-out.xml
--
2.21.0