[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/3] libxl: libxl__device_from_disk should retrieve backend from xenstore



Jim Fehlig writes ("Re: [PATCH 3/3] libxl: libxl__device_from_disk should 
retrieve backend from xenstore"):
> Wei Liu wrote:
> > On Tue, Feb 10, 2015 at 11:01:46AM +0000, Ian Jackson wrote:
> >> What should happen if the caller specifies a different target in disk
> >> to the one the device is actually using ?  The documentation should
> >> specify which of the fields are important.
> >
> > I'm not sure because it's not documented.

I know :-).  I meant: what should we write in the documentation ?
(And, obviously, implement.)

> > We should take a step back to define the important fields first.

Right.

> >> Maybe libxl_device_disk_remove needs to call libxl_vdev_to_device_disk
> >> and check that the supplied disk struct is plausible somehow.  In that
> >> case it might be nice for the caller to be able to fill in only the
> >> vdev.
> >
> > If so we need to make clear in the documentation. I'm of course fine
> > with this behaviour.

Well, feel free to object if you think my (rather vague) suggestion is
wrong.

> > Jim, does libvirt (as an example of libxl user) actually cares
> > specifying every fields in that struct? The other user (xl) doesn't seem
> > to care that much.
> 
> At minimum, libvirt will populate the pdev_path, vdev, backend, and
> format fields. If backend and format (which, in libvirt-speack
> correspond to the 'name' and 'type' attributes on the optional <driver>
> element) are not specified, they are set to LIBXL_DISK_BACKEND_UNKNOWN
> and LIBXL_DISK_FORMAT_RAW respectively.

I think for fields libvirt has gone to the trouble of specifying,
libxl should check that they match.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.