From: Ian Jackson Subject: Re: [PATCH v1 07/12] libxl: add prepare/unprepare operations to the libxl public interface Date: Fri, 15 Mar 2013 12:20:30 +0000 Message-ID: <20803.4622.73421.248204@mariner.uk.xensource.com> References: <1358963317-10221-1-git-send-email-roger.pau@citrix.com> <1358963317-10221-8-git-send-email-roger.pau@citrix.com> <20800.42788.524880.95800@mariner.uk.xensource.com> <514306F9.7060709@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <514306F9.7060709@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne Cc: Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Roger Pau Monne writes ("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: > > 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). That's a non-backward-compatible API change, then ? We're trying to avoid those. > > 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. No, I mean, is it just the target string that is relevant for identifying the preparation ? Can the same disk be prepared multiple times (eg for multiple guests) ? How is this synchronised ? > 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. Perhaps it would be better to hide this from the caller and implement the old API in terms of the new one ? ian.