[libvirt] [PATCH v2 31/32] qemu: Use the 'device_id' property of SCSI disks to avoid regressing

Peter Krempa pkrempa at redhat.com
Fri Feb 8 07:29:07 UTC 2019


On Thu, Feb 07, 2019 at 18:15:06 +0100, Ján Tomko wrote:
> On Mon, Feb 04, 2019 at 04:47:04PM +0100, Peter Krempa wrote:
> > QEMU accidentally exposed the id of -drive (or same value as disk
> > serial, if provided) in one of the identifiers visible from the guest.
> > 
> > To avoid regression in case when -blockdev will be used we need to
> > always specify it ourselves.
> > 
> > Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> > ---
> > src/qemu/qemu_command.c                       | 22 +++++++++++++++++++
> > .../controller-virtio-scsi.x86_64-latest.args | 20 ++++++++---------
> > .../disk-cache.x86_64-latest.args             |  4 ++--
> > .../disk-scsi-device-auto.x86_64-latest.args  |  3 ++-
> > .../disk-scsi.x86_64-latest.args              | 16 ++++++++------
> > .../disk-shared.x86_64-latest.args            |  5 +++--
> > ...threads-virtio-scsi-pci.x86_64-latest.args |  4 ++--
> > 7 files changed, 50 insertions(+), 24 deletions(-)
> > 
> > @@ -2021,6 +2037,12 @@ qemuBuildDiskDeviceStr(const virDomainDef *def,
> >                               disk->info.addr.drive.target,
> >                               disk->info.addr.drive.unit);
> >         }
> > +
> > +        if (scsiVPDDeviceId) {
> > +            virBufferAddLit(&opt, ",device_id=");
> > +            virBufferEscape(&opt, '\\', " ", "%s", scsiVPDDeviceId);
> 
> commas should be escaped, not spaces

Hmm, I stole this from disk serial formatting as it's passed here when
it's present. I'll need to check first whether serial also does not need
a tweak.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190208/bcbe7437/attachment-0001.sig>


More information about the libvir-list mailing list