Re: [PATCH 4/4] qemu: Split handling of managed and unmanaged persistent reservations

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

 



On Thu, May 31, 2018 at 07:59:35PM +0200, Peter Krempa wrote:
On Thu, May 31, 2018 at 19:30:25 +0200, Peter Krempa wrote:
Add code that will handle the managed persistent reservations object
separately from the unmanaged one. There is only one managed object so
handling it with disks is awkward and does not scale well when backing
chains come into view.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_command.c                            | 113 +++++++++++++++------
 src/qemu/qemu_command.h                            |   1 +
 src/qemu/qemu_hotplug.c                            | 104 ++++++++-----------
 ...isk-virtio-scsi-reservations.x86_64-latest.args |   4 +-
 4 files changed, 130 insertions(+), 92 deletions(-)

[...]

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index e78aff7adf..21503b3905 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c

[...]

@@ -461,16 +441,13 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver,
     if (encinfo && qemuBuildSecretInfoProps(encinfo, &encobjProps) < 0)
         goto error;

-    if (qemuMaybeBuildPRManagerInfoProps(vm, disk, &prmgrProps) < 0)
+    if (qemuDomainDiskAttachManagedPR(vm, disk, &managedPrmgrProps) < 0)
         goto error;

-    /* Start daemon only after prmgrProps is built. Otherwise
-     * qemuDomainMaybeStartPRDaemon() might start daemon and set
-     * priv->prDaemonRunning which confuses props building code. */
-    if ((rv = qemuDomainMaybeStartPRDaemon(vm, disk)) < 0)
+    if (disk->src->pr &&
+        virStoragePRDefIsManaged(disk->src->pr) &&

This condition term is supposed to be inverted, since we are adding only
non-managed objects here. I'll fix it in my branch.


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[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