[PATCH] qemuProcessStop: Reattach NVMe disks a domain is mirroring into

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In v5.10.0-rc1~42 (which was later fixed in v6.0.0-rc1~487) I am
removing XATTRs for a file that QEMU is mirroring a disk into but
it is killed meanwhile. Well, if we call
qemuDomainStorageSourceAccessRevoke() instead of
qemuBlockRemoveImageMetadata() then not only the file will have
perms fixed (instead of left accessible to qemu) but if the
mirror destination is not a file but a NVMe disk, then the disk
will be reattached back to the host.

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

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/qemu/qemu_process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 8ea470f75f..70c71e069c 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -7605,7 +7605,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
             virDomainDiskDefPtr disk = def->disks[i];
 
             if (disk->mirror)
-                qemuBlockRemoveImageMetadata(driver, vm, disk->dst, disk->mirror);
+                qemuDomainStorageSourceAccessRevoke(driver, vm, disk->mirror);
 
             qemuBlockRemoveImageMetadata(driver, vm, disk->dst, disk->src);
         }
-- 
2.26.2





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux