[libvirt] [PATCHv2 0/2] Support setting the 'removable' flag for USB disks

Peter Krempa pkrempa at redhat.com
Wed Aug 28 13:41:28 UTC 2013


On 08/28/13 15:34, anonym wrote:
> 27/08/13 14:40, Peter Krempa wrote:
>> On 08/23/13 12:38, Fred A. Kemp wrote:
>>> From: "Fred A. Kemp" <anonym at riseup.net>
>>>
>>> The commit message of patch #2 explains the purpose of this patch set.
>>> A review would be greatly appreciated!
>>>
>>> Note that I've only added the new capability for usb-storage.removable
>>> to the qemu help tests of qemu(-kvm) version 1.2.0, since that's what I
>>> had easily available to get the output of `-device usb-storage,?` from.
>>> I hope that's not an issue, otherwise, is there a way to obtain these
>>> outputs without having to hunt down and install all supported versions?
>>>
>>> Previous submissions of this patch set to this list:
>>> http://www.redhat.com/archives/libvir-list/2013-March/msg01051.html
>>> http://www.redhat.com/archives/libvir-list/2013-May/msg02039.html
>>> https://www.redhat.com/archives/libvir-list/2013-July/msg01635.html
>>> https://www.redhat.com/archives/libvir-list/2013-August/msg00581.html
>>>
>>> Fred A. Kemp (2):
>>>   qemu: Add capability flag for usb-storage
>>>   qemu: Support setting the 'removable' flag for USB disks
>>>
>>
>> This patchset unfortunately breaks the recently added qemuhotplugtest:
>>
>> 14) hotplug-base ATTACH disk-usb                                      ... libvirt: QEMU Driver error : unsupported configuration: This QEMU doesn't support '-device usb-storage'
>> FAILED
>> 15) hotplug-base DETACH disk-usb                                      ... libvirt: QEMU Driver error : operation failed: disk sdq not found
>> FAILED
>> 16) hotplug-base ATTACH disk-usb                                      ... libvirt: QEMU Driver error : unsupported configuration: This QEMU doesn't support '-device usb-storage'
>> FAILED
>> 17) hotplug-base DETACH disk-usb                                      ... domain XML should not match the expected result
>> libvirt: QEMU Driver error : operation failed: disk sdq not found
>> FAILED
>> 18) hotplug-base DETACH disk-usb                                      ... libvirt: QEMU Driver error : operation failed: disk sdq not found
>> FAILED
> 
> After a two minute investigation of this new test, I threw in the
> following fix which *seemingly* does the trick (i.e. I see no test
> failures any more):
> 
> --- a/tests/qemuhotplugtest.c
> +++ b/tests/qemuhotplugtest.c
> @@ -78,6 +78,7 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt,
>      /* for attach & detach qemu must support -device */
>      virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DRIVE);
>      virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE);
> +    virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_USB_STORAGE);
>      virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_NET_NAME);
>      virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VIRTIO_SCSI);
>      if (event)
> 
> 
> I'm very time constrained at the moment so I didn't have time to read
> the sources in detail, so the above fix is based on "pattern matching"
> only. If the fix looks good any way, it should be fixup'ed into my patch #1.
> 
> I'm a bit confused with the process now, as my previous patches were
> ACKed but not pushed. Should send a new patchset?

Ususaly the reviewer is responsible for checking and pushing patches
from non-maintainers. If the fix is indeed to enable the one capability
bit I'll amend those patches and push them later today.

> 
> Cheers!
> 

Peter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130828/21459f99/attachment-0001.sig>


More information about the libvir-list mailing list