[libvirt] [PATCH] qemu: format serial, geometry and error policy on frontend disk device
Peter Krempa
pkrempa at redhat.com
Mon Jun 25 10:42:13 UTC 2018
On Mon, Jun 25, 2018 at 11:37:07 +0100, Daniel Berrange wrote:
> On Mon, Jun 25, 2018 at 12:29:48PM +0200, Peter Krempa wrote:
> > On Mon, Jun 25, 2018 at 10:50:32 +0100, Daniel Berrange wrote:
> > > Currently we format the serial, geometry and error policy on the -drive
> > > backend argument.
> > >
> > > QEMU added the ability to set serial and geometry on the frontend in
> > > the 1.2 release, and ability to set error policy in the 2.7 release.
> > > usb-storage is an oddity, however, as it lacks error policy support
> > > right now.
> > >
> > > Setting any of these on -drive has been deprecated and support for this
> > > will be removed very soon.
> > >
> > > Note that some disk buses (sd) still don't support -device. Although
> > > QEMU allowed these properties to be set on -drive for if=sd, they
> > > have been ignored so we don't loose anything by removing this.
> > >
> > > Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
>
> > > @@ -2125,6 +2141,11 @@ qemuBuildDriveDevStr(const virDomainDef *def,
> > > if (qemuBuildDriveDevCacheStr(disk, &opt, qemuCaps) < 0)
> > > goto error;
> > >
> > > + qemuBuildDiskFrontendAttributes(disk, &opt);
> > > + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DISK_ERROR) &&
> > > + disk->bus != VIR_DOMAIN_DISK_BUS_USB)
> >
> > Why is USB special here? Switching to -blockdev will require doing this
> > also for the USB disk, so I'd rather have a single case here.
>
> We have no choice - QEMU didn't add it....
>
> $ for i in virtio-blk ide-hd scsi-hd usb-storage ; do ./x86_64-softmmu/qemu-system-x86_64 -device $i,? 2>&1 | grep werror ; done
> virtio-blk-pci.werror=BlockdevOnError (Error handling policy, report/ignore/enospc/stop/auto)
> ide-hd.werror=BlockdevOnError (Error handling policy, report/ignore/enospc/stop/auto)
> scsi-hd.werror=BlockdevOnError (Error handling policy, report/ignore/enospc/stop/auto)
Hmm, thats awesome. If they intend to support it for the usb-storage
device they should add it prior to us converting it to the new place.
That will also block enabling of -blockdev
-------------- 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/20180625/b8ca3227/attachment-0001.sig>
More information about the libvir-list
mailing list