libvirt/libvirt-qemu-block-Properly-handle-FD-passed-disk-hot-un-plug.patch
Jiri Denemark ff5db98bff libvirt-9.0.0-3.el9
- src: Don't use virReportSystemError() on virProcessGetStatInfo() failure (rhbz#2148266)
- qemu: Provide virDomainGetCPUStats() implementation for session connection (rhbz#2148266)
- virsh: Make domif-setlink work more than once (rhbz#2165466)
- qemu_fd: Remove declaration for 'qemuFDPassNewDirect' (rhbz#2040272)
- qemuStorageSourcePrivateDataFormat: Rename 'tmp' to 'objectsChildBuf' (rhbz#2040272)
- qemu: command: Handle FD passing commandline via qemuBuildBlockStorageSourceAttachDataCommandline (rhbz#2040272)
- qemuFDPassTransferCommand: Mark that FD was passed (rhbz#2040272)
- qemu: fd: Add helpers allowing storing FD set data in status XML (rhbz#2040272)
- qemu: domain: Store fdset ID for disks passed to qemu via FD (rhbz#2040272)
- qemu: block: Properly handle FD-passed disk hot-(un-)plug (rhbz#2040272)

Resolves: rhbz#2040272, rhbz#2148266, rhbz#2165466
2023-02-01 13:33:57 +01:00

54 lines
1.7 KiB
Diff

From bf15c630b7c54637220af65ac84cfd007c1c798a Mon Sep 17 00:00:00 2001
Message-Id: <bf15c630b7c54637220af65ac84cfd007c1c798a@dist-git>
From: Peter Krempa <pkrempa@redhat.com>
Date: Tue, 31 Jan 2023 15:35:05 +0100
Subject: [PATCH] qemu: block: Properly handle FD-passed disk hot-(un-)plug
The hotplug code paths need to be able to pass the FDs to the monitor to
ensure that hotplug works.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 3b8d669d557bd2ce8874f61e83b6d6074d365ec2)
https://bugzilla.redhat.com/show_bug.cgi?id=2040272
---
src/qemu/qemu_block.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index e865aa17f9..c218262691 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -1410,6 +1410,9 @@ qemuBlockStorageSourceAttachApplyStorageDeps(qemuMonitor *mon,
qemuMonitorAddObject(mon, &data->tlsProps, &data->tlsAlias) < 0)
return -1;
+ if (qemuFDPassTransferMonitor(data->fdpass, mon) < 0)
+ return -1;
+
return 0;
}
@@ -1559,6 +1562,8 @@ qemuBlockStorageSourceAttachRollback(qemuMonitor *mon,
if (data->tlsKeySecretAlias)
ignore_value(qemuMonitorDelObject(mon, data->tlsKeySecretAlias, false));
+ qemuFDPassTransferMonitorRollback(data->fdpass, mon);
+
virErrorRestore(&orig_err);
}
@@ -1609,6 +1614,8 @@ qemuBlockStorageSourceDetachPrepare(virStorageSource *src)
if (srcpriv->tlsKeySecret)
data->tlsKeySecretAlias = g_strdup(srcpriv->tlsKeySecret->alias);
+
+ data->fdpass = srcpriv->fdpass;
}
return g_steal_pointer(&data);
--
2.39.1