First part of the series refactors close callbacks to allow having more of them and then implements new API virDomainFDAssociate and plumbs it to pass to qemu. Peter Krempa (36): datatypes: Simplify error path of 'virGetDomain' datatypes: Clean up whitespace in definition of struct _virConnect conf: virdomainobjlist: Convert header to contemporary style conf: virdomainobjlist: Introduce 'virDomainObjListCollectAll' conf: virdomainobjlist: Remove return value from virDomainObjListCollect conf: domain: Add helper infrastructure for new connection close callbacks virclosecallbacks: Add new close callbacks APIs lxc: Use new connection close callbacks API bhyve: Use new connection close callbacks API qemu: Use new connection close callbacks API qemuMigrationSrcIsAllowed: Remove unused 'driver' argument qemuMigrationSrcBeginResumePhase: Remove unused 'driver' argument virclosecallbacks: Remove old close callbacks code gendispatch: Add 'G_GNUC_WARN_UNUSED_RESULT' to output of 'aclheader' remote_driver: Return 'virLockGuard' from 'remoteDriverLock' remote_driver: Refactor few functions as example of auto-locking virStorageSourceIsSameLocation: Use switch statement for individual storage types qemuxml2argvtest: Add seclabels in <backingStore> to disk-backing-chains-(no)index qemuxml2xmltest: Remove 'disk-backing-chain' case and output files lib: Introduce virDomainFDAssociate API virsh: Introduce 'dom-fd-associate' for invoking virDomainFDAssociate() conf: storage_source: Introduce type for storing FDs associated for storage qemu: Implement qemuDomainFDAssociate qemuxml2argvtest: Add support for populating 'fds' in private data conf: Add 'fdgroup' attribute for 'file' disks qemu: domain: Introduce qemuDomainStartupCleanup conf: storage_source: Introduce virStorageSourceIsFD qemu: Prepare data for FD-passed disk image sources qemu: block: Add support for passing FDs of disk images secuirity: DAC: Don't relabel FD-passed virStorageSource images security: selinux: Handle security labelling of FD-passed images qemu: Prepare storage backing chain traversal code for FD passed images qemu: driver: Don't allow certain operations with FD-passed disks qemu: cgroup: Don't setup cgroups for FD-passed images qemu: Enable support for FD passed disk sources qemuxml2*test: Enable testing of disks with 'fdgroup' docs/formatdomain.rst | 8 + docs/manpages/virsh.rst | 22 + include/libvirt/libvirt-domain.h | 22 + po/POTFILES | 1 - src/bhyve/bhyve_domain.c | 15 +- src/bhyve/bhyve_driver.c | 6 +- src/bhyve/bhyve_process.c | 9 +- src/bhyve/bhyve_utils.h | 2 - src/conf/domain_conf.c | 15 + src/conf/domain_conf.h | 26 + src/conf/domain_postparse.c | 9 + src/conf/schemas/domaincommon.rng | 3 + src/conf/storage_source_conf.c | 80 ++- src/conf/storage_source_conf.h | 27 ++ src/conf/virdomainobjlist.c | 39 +- src/conf/virdomainobjlist.h | 160 +++--- src/datatypes.c | 14 +- src/datatypes.h | 5 +- src/driver-hypervisor.h | 8 + src/hypervisor/virclosecallbacks.c | 454 ++++++++++-------- src/hypervisor/virclosecallbacks.h | 37 +- src/libvirt-domain.c | 82 ++++ src/libvirt_private.syms | 14 +- src/libvirt_public.syms | 5 + src/lxc/lxc_conf.c | 15 +- src/lxc/lxc_conf.h | 3 - src/lxc/lxc_driver.c | 8 +- src/lxc/lxc_process.c | 8 +- src/qemu/qemu_block.c | 31 +- src/qemu/qemu_cgroup.c | 4 +- src/qemu/qemu_command.c | 22 + src/qemu/qemu_conf.c | 17 +- src/qemu/qemu_conf.h | 3 - src/qemu/qemu_domain.c | 129 ++++- src/qemu/qemu_domain.h | 11 +- src/qemu/qemu_driver.c | 108 ++++- src/qemu/qemu_hotplug.c | 1 + src/qemu/qemu_migration.c | 54 +-- src/qemu/qemu_migration.h | 3 +- src/qemu/qemu_process.c | 37 +- src/qemu/qemu_process.h | 11 +- src/qemu/qemu_snapshot.c | 4 +- src/remote/remote_daemon_dispatch.c | 40 ++ src/remote/remote_driver.c | 70 ++- src/remote/remote_protocol.x | 14 +- src/remote_protocol-structs | 6 + src/rpc/gendispatch.pl | 2 +- src/security/security_dac.c | 16 +- src/security/security_selinux.c | 32 +- src/security/virt-aa-helper.c | 3 +- src/storage_file/storage_source.c | 14 + src/test/test_driver.c | 4 +- src/vz/vz_driver.c | 7 +- .../disk-backing-chains-index.xml | 6 +- .../disk-backing-chains-noindex.xml | 6 +- .../qemuxml2argvdata/disk-backing-chains.xml | 98 ---- .../disk-source-fd.x86_64-latest.args | 49 ++ tests/qemuxml2argvdata/disk-source-fd.xml | 40 ++ tests/qemuxml2argvtest.c | 9 + .../disk-backing-chains-active.xml | 110 ----- .../disk-backing-chains-inactive.xml | 110 ----- .../disk-backing-chains-index-active.xml | 6 +- .../disk-backing-chains-index-inactive.xml | 6 +- .../disk-backing-chains-noindex.xml | 6 +- .../disk-source-fd.x86_64-latest.xml | 52 ++ tests/qemuxml2xmltest.c | 3 +- tests/testutilsqemu.c | 33 ++ tests/testutilsqemu.h | 2 + tools/virsh-domain.c | 83 ++++ 69 files changed, 1512 insertions(+), 847 deletions(-) delete mode 100644 tests/qemuxml2argvdata/disk-backing-chains.xml create mode 100644 tests/qemuxml2argvdata/disk-source-fd.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-source-fd.xml delete mode 100644 tests/qemuxml2xmloutdata/disk-backing-chains-active.xml delete mode 100644 tests/qemuxml2xmloutdata/disk-backing-chains-inactive.xml create mode 100644 tests/qemuxml2xmloutdata/disk-source-fd.x86_64-latest.xml -- 2.38.1