libvirt/src/qemu
Michal Privoznik cdd8a6690e qemu: Forcibly mknod() even if it exists
Another weird bug appeared concerning qemu namespaces. Basically
the problem is as follows:

1) Issue an API that causes libvirt to create a node in domain's
   namespace, say /dev/nvme0n1 with 8:0 as major:minor (the API can
   be attach-disk for instance). Or simply create the node from a
   console by hand.

2) Detach the disk from qemu.

3) Do something that makes /dev/nvme0n1 change it's minor number.

4) Try to attach the disk again.

The problem is, in a few cases - like disk-detach - we don't
remove the corresponding /dev node from the mount namespace
(because it may be used by some other disk's backing chain). But
this creates a problem, because if the node changes its MAJ:MIN
numbers we don't propagate the change into the domain's
namespace. We do plain mknod() and ignore EEXIST which obviously
is not enough because it doesn't guarantee that the node has
updated MAJ:MIN pair.

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

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-20 14:05:37 +01:00
..
EVENTHANDLERS.txt
libvirtd_qemu.aug
Makefile.inc.am qemu: Remove qemu_hotplugpriv.h and qemuDomainRemoveDeviceWaitTime 2019-11-13 15:03:40 -05:00
MIGRATION.txt
qemu_agent.c replace use of gnulib snprintf by g_snprintf 2019-11-15 15:07:40 +01:00
qemu_agent.h Add API to change qemu agent response timeout 2019-11-14 19:10:01 +01:00
qemu_alias.c qemu: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:58 +01:00
qemu_alias.h
qemu_block.c qemu: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:58 +01:00
qemu_block.h qemu: block: Don't query monitor in qemuBlockStorageSourceCreateDetectSize 2019-10-21 16:53:42 +02:00
qemu_blockjob.c qemu: blockjob: Transfer 'readonly' state of images after active layer block commit 2019-11-14 12:42:09 +01:00
qemu_blockjob.h
qemu_capabilities.c qemu: set domain capability for video type "none" 2019-11-14 11:37:50 -05:00
qemu_capabilities.h cpu_conf: Pass policy to CPU feature filtering callbacks 2019-11-12 20:14:15 +01:00
qemu_capspriv.h
qemu_cgroup.c qemu: remove unneeded cleanup labels 2019-11-19 15:22:37 +01:00
qemu_cgroup.h
qemu_checkpoint.c qemu: checkpoint: Fix rollback and access to unlocked 'vm' when deleting checkpoints 2019-11-20 13:24:54 +01:00
qemu_checkpoint.h qemu: checkpoint: Extract finalizing steps of checkpoint creation 2019-10-24 19:35:34 +02:00
qemu_command.c qemu: add 'ramfb' attribute for mediated devices 2019-11-14 11:37:50 -05:00
qemu_command.h
qemu_conf.c qemu: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:58 +01:00
qemu_conf.h qemu: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:58 +01:00
qemu_dbus.c qemu: use g_strdup instead of VIR_STRDUP 2019-10-21 12:51:57 +02:00
qemu_dbus.h
qemu_domain_address.c qemu: remove unneeded cleanup labels 2019-11-19 15:22:37 +01:00
qemu_domain_address.h
qemu_domain.c qemu: Forcibly mknod() even if it exists 2019-11-20 14:05:37 +01:00
qemu_domain.h Add API to change qemu agent response timeout 2019-11-14 19:10:01 +01:00
qemu_driver.c qemu: remove unneeded cleanup labels 2019-11-19 15:22:37 +01:00
qemu_driver.h
qemu_extdevice.c
qemu_extdevice.h
qemu_firmware.c qemu: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:58 +01:00
qemu_firmware.h
qemu_hostdev.c qemu_hostdev: Introduce qemuHostdevNeedsVFIO() 2019-10-21 13:50:24 +02:00
qemu_hostdev.h qemu_hostdev: Introduce qemuHostdevNeedsVFIO() 2019-10-21 13:50:24 +02:00
qemu_hotplug.c qemu: remove unneeded cleanup labels 2019-11-19 15:22:37 +01:00
qemu_hotplug.h qemu_hotplug.c: adding qemuDomainGetUnplugTimeout 2019-11-13 15:03:40 -05:00
qemu_interface.c qemu: remove unneeded cleanup labels 2019-11-19 15:22:37 +01:00
qemu_interface.h
qemu_interop_config.c qemu: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:58 +01:00
qemu_interop_config.h
qemu_migration_cookie.c cpu_map: Drop pconfig from Icelake-Server CPU model 2019-11-12 20:14:16 +01:00
qemu_migration_cookie.h
qemu_migration_params.c qemu/qemu_migration_params: use virStringParseYesNo helper 2019-11-14 08:14:50 -05:00
qemu_migration_params.h
qemu_migration_paramspriv.h
qemu_migration.c qemu: remove unneeded cleanup labels 2019-11-19 15:22:37 +01:00
qemu_migration.h
qemu_monitor_json.c bootstrap.conf: drop c-strcasestr gnulib module 2019-11-20 13:31:13 +01:00
qemu_monitor_json.h qemu: monitor: Remove non-transaction based dirty bitmap APIs 2019-11-20 13:24:54 +01:00
qemu_monitor_priv.h
qemu_monitor_text.c qemu: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:58 +01:00
qemu_monitor_text.h
qemu_monitor.c qemu: monitor: Remove non-transaction based dirty bitmap APIs 2019-11-20 13:24:54 +01:00
qemu_monitor.h qemu: monitor: Remove non-transaction based dirty bitmap APIs 2019-11-20 13:24:54 +01:00
qemu_process.c qemu: remove unneeded cleanup labels 2019-11-19 15:22:37 +01:00
qemu_process.h
qemu_processpriv.h
qemu_qapi.c
qemu_qapi.h
qemu_security.c
qemu_security.h
qemu_slirp.c qemu: Use g_strdup_printf() instead of virAsprintf() 2019-11-12 16:15:58 +01:00
qemu_slirp.h
qemu_tpm.c qemu: remove unneeded cleanup labels 2019-11-19 15:22:37 +01:00
qemu_tpm.h
qemu_vhost_user_gpu.c qemu: gpu: Sanitize error values in qemuVhostUserGPUGetPid 2019-11-14 12:42:09 +01:00
qemu_vhost_user_gpu.h
qemu_vhost_user.c Drop needless ret variable 2019-10-24 08:10:37 +02:00
qemu_vhost_user.h
qemu.conf qemu: Warn verbosely if using old loader:nvram pairs 2019-11-12 08:34:37 +01:00
test_libvirtd_qemu.aug.in
THREADS.txt
virtqemud.service.in