There are couple of things happening in this series.
The first patch fixes a bug. We are leaking /dev/mapper/control in QEMU.
See the patch for detailed info. The second patch then cleans up code a
bit.
The third patch moves namespace handling code into a separate file.
Patches 4 - 15 then prepare the code for switch to different approach
in populating the namespace. Patches 16 - 26 then do the switch and
finally, the rest of the patches drops and deduplicates some code.
You can fetch the patches from here too:
https://gitlab.com/MichalPrivoznik/libvirt/-/commits/dm_namespace/
Michal Prívozník (34):
virDevMapperGetTargetsImpl: Close /dev/mapper/control in the end
virDevMapperGetTargets: Don't ignore EBADF
qemu: Separate out namespace handling code
qemu_domain_namespace: Rename qemuDomainCreateNamespace()
qemu_domain_namespace: Drop unused @cfg argument
qemu_domain_namespace: Check for namespace enablement earlier
qemuDomainNamespaceSetupHostdev: Create paths in one go
qemuDomainAttachDeviceMknodHelper: Don't leak data->target
qemu_domain_namespace.c: Rename qemuDomainAttachDeviceMknodData
qemuDomainAttachDeviceMknodRecursive: Isolate bind mounted devices
condition
qemuDomainAttachDeviceMknodHelper: Create more files in a single go
qemuDomainNamespaceMknodPaths: Create more files in one go
qemuDomainNamespaceMknodPaths: Turn @paths into string list
qemuDomainSetupDisk: Accept @src
qemu_domain_namespace: Repurpose qemuDomainBuildNamespace()
qemuDomainBuildNamespace: Populate basic /dev from daemon's namespace
qemuDomainBuildNamespace: Populate disks from daemon's namespace
qemuDomainBuildNamespace: Populate hostdevs from daemon's namespace
qemuDomainBuildNamespace: Populate memory from daemon's namespace
qemuDomainBuildNamespace: Populate chardevs from daemon's namespace
qemuDomainBuildNamespace: Populate TPM from daemon's namespace
qemuDomainBuildNamespace: Populate graphics from daemon's namespace
qemuDomainBuildNamespace: Populate inputs from daemon's namespace
qemuDomainBuildNamespace: Populate RNGs from daemon's namespace
qemuDomainBuildNamespace: Populate loader from daemon's namespace
qemuDomainBuildNamespace: Populate SEV from daemon's namespace
qemu_domain_namespace: Drop unused functions
qemuDomainDetachDeviceUnlink: Unlink paths in one go
qemuDomainNamespaceUnlinkPaths: Turn @paths into string list
qemuDomainNamespaceTeardownHostdev: Unlink paths in one go
qemuDomainNamespaceTeardownMemory: Deduplicate code
qemuDomainNamespaceTeardownChardev: Deduplicate code
qemuDomainNamespaceTeardownRNG: Deduplicate code
qemuDomainNamespaceTeardownInput: Deduplicate code
po/POTFILES.in | 1 +
src/qemu/Makefile.inc.am | 2 +
src/qemu/qemu_cgroup.c | 2 +-
src/qemu/qemu_conf.c | 1 +
src/qemu/qemu_domain.c | 1848 +-----------------------------
src/qemu/qemu_domain.h | 57 -
src/qemu/qemu_domain_namespace.c | 1610 ++++++++++++++++++++++++++
src/qemu/qemu_domain_namespace.h | 86 ++
src/qemu/qemu_driver.c | 1 +
src/qemu/qemu_hotplug.c | 1 +
src/qemu/qemu_process.c | 23 +-
src/qemu/qemu_security.c | 1 +
src/util/virdevmapper.c | 4 +-
13 files changed, 1727 insertions(+), 1910 deletions(-)
create mode 100644 src/qemu/qemu_domain_namespace.c
create mode 100644 src/qemu/qemu_domain_namespace.h
--
2.26.2