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

Re: [Xen-devel] [PATCH v3 4/4] libxl: add support for vscsi



On Mon, Mar 09, 2015 at 05:08:31PM +0100, Olaf Hering wrote:
> On Fri, Mar 06, Wei Liu wrote:
> 
> > > +void libxl__device_vscsi_add(libxl__egc *egc, uint32_t domid,
> > > +                             libxl_device_vscsi *vscsi,
> > > +                             libxl__ao_device *aodev)
> > You need to update this domain's JSON configuration. Cf.
> > libxl__device_vtpm_add and friends. Also look at libxl_internal.h L2310.
> 
> Its not clear to me why every libxl__device_<type>_add copies the passed
> in libxl_device_<type> into a local named <type>_saved. Why is it not
> enough to work directly with the input? Its not obvious what the purpose
> of that copy is, nothing seems to alter the input.
> 

The input might be altered in the hotplug function, see
libxl__device_<type>_setdefault functions.

We want to save the original one. However the save need to happen later,
so we need to copy the original input and save that copy if necessary.

Wei.

> Olaf

_______________________________________________
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®.