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

Re: [Xen-devel] [PATCH v1 07/12] libxl: add prepare/unprepare operations to the libxl public interface



On 13/03/13 17:19, Ian Jackson wrote:
> Roger Pau Monne writes ("[Xen-devel] [PATCH v1 07/12] libxl: add 
> prepare/unprepare operations to the libxl public interface"):
>> Add public functions for the prepare/unprepare disk operations.
> 
> I'm not sure I understand how the caller is supposed to use this.

The caller should execute prepare before adding the disk (hopefully in a
not performance sensitive path).

> How does the eventual script manage to correlate the preparation with
> the unpreparation ?

You call the script with the prepare or unprepare parameters, so the
script knows which action it has to execute.

> How can the caller see what has been prepared ?

The caller should take care of this states by himself (just as we do
with add or remove), so it knows if the device has been prepared or not.

The only downfall of not calling prepare before add is that libxl will
thread this device as using the v1 hotplug interface, so old users of
libxl will still have the same functionality, but they will not be able
to use new hotplug scripts using the v2 interface.

This functions are only used for disk attach/detach (xl
block-attach/block-detach), for domain creation the domain builder logic
already takes care of preparing the devices before adding them.


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