]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainAttachDeviceMknodRecursive: Support file mount points
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 15 Jun 2017 15:05:06 +0000 (17:05 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 11 Jul 2017 12:45:15 +0000 (14:45 +0200)
commit7976d1a5146bc5117e7125f0cbbfe537248dc630
tree3f0589f34a708829968a1a6ac87068cd8e24c66d
parent4f05f188de5de0d5764699ba5231a7d20b42dc9c
qemuDomainAttachDeviceMknodRecursive: Support file mount points

https://bugzilla.redhat.com/show_bug.cgi?id=1462060

Just like in the previous commit, when attaching a file based
device which has its source living under /dev (that is not a
device rather than a regular file), calling mknod() is no help.
We need to:

1) bind mount device to some temporary location
2) enter the namespace
3) move the mount point to desired place
4) umount it in the parent namespace from the temporary location

At the same time, the check in qemuDomainNamespaceSetupDisk makes
no longer sense. Therefore remove it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_domain.c