On 08/20/2014 05:46 AM, Michal Privoznik wrote: > On 19.08.2014 22:11, Giuseppe Scrivano wrote: >> Generate the qemu command line option: >> >> -device 'usb-mtp,root=$SRC,desc=$TARGET' >> >> from the definition XML: >> >> <filesystem type='mount'> >> <source dir='$SRC'/> >> <target dir='$TARGET'/> >> <model type='mtp'/> >> </filesystem> >> >> Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1121781 >> >> Signed-off-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx> >> --- >> + virBufferAddLit(&opt, "usb-mtp"); >> + virBufferAsprintf(&opt, ",root=%s,desc=%s", fs->src, >> fs->dst); > > Reading qemu sources the root property is called 'x-root'. And indeed > domain fails to start: Ouch. Qemu has explicitly documented that anything starting with x- is unstable, and may change. We probably should NOT be targetting this in libvirt API just yet, in case qemu changes their mind. It's nice that you've done the patch as a proof of concept, but I don't think we want it in the tree yet :( > > usb: mtp: tag root property as experimental > > Reason: we don't want commit to that interface yet. Possibly > the implementation will be switched over to use fsdev. > > Suggested-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> > Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx> > > diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c > index 1b51a90..384d4a5 100644 > --- a/hw/usb/dev-mtp.c > +++ b/hw/usb/dev-mtp.c > @@ -1090,7 +1090,7 @@ static const VMStateDescription vmstate_usb_mtp = { > }; > > static Property mtp_properties[] = { > - DEFINE_PROP_STRING("root", MTPState, root), > + DEFINE_PROP_STRING("x-root", MTPState, root), > DEFINE_PROP_STRING("desc", MTPState, desc), > DEFINE_PROP_END_OF_LIST(), > }; > > > Question that pops up immediately: do we want to commit to something > that even qemu developers don't believe yet? What will happen when qemu > decides to switch to 'root' attribute again? Libvirt will have to adapt > which won't work with older qemus supporting 'x-root' only. Yep - anything in qemu with x- is not a candidate for libvirt support (for the longest time, we refused to support RDMA migration because it still had an x- prefix). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list