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. > + !(unmanagedPrmgrProps = qemuBuildPRManagerInfoProps(disk->src))) > goto error;
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list