From: Wei Liu Subject: Re: [RFC V8 2/3] libxl domain snapshot API design Date: Mon, 8 Dec 2014 11:24:11 +0000 Message-ID: <20141208112411.GD17128@zion.uk.xensource.com> References: <1415607424-15920-1-git-send-email-cyliu@suse.com> <1415607424-15920-3-git-send-email-cyliu@suse.com> <20141205160615.GA24938@zion.uk.xensource.com> <5485C5170200006600081D20@soto.provo.novell.com> <20141208111214.GC17128@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20141208111214.GC17128@zion.uk.xensource.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: Chun Yan Liu Cc: Ian.Jackson@citrix.com, Jim Fehlig , Wei Liu , Ian.Campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, Dec 08, 2014 at 11:12:14AM +0000, Wei Liu wrote: > On Mon, Dec 08, 2014 at 12:34:47AM -0700, Chun Yan Liu wrote: > > > > > > >>> On 12/6/2014 at 12:06 AM, in message > > <20141205160615.GA24938@zion.uk.xensource.com>, Wei Liu > > wrote: > > > I have to admit I'm confused by the back and forth discussion. It's hard > > > to justify the design of new API without knowing what the constraints > > > and requirements are from your PoV. > > > > > > Here are my two cents, not about details, but about general constraints. > > > > > > There are two layers, one is user of libxl (clients -- xl, libvirt etc) > > > and libxl (the library itself). > > > > > > 1. it's better to *not* have storage management in libxl. > > > > > > It's likely that clients can have their own management functionality > > > already. I'm told that libvirt has that as well as XAPI. Having this > > > functionality in libxl is a bit redundant and requires lots of work > > > (enlighten libxl on what a disk looks like and call out to various > > > utilities). > > > > Thanks Wei and Ian for your reply. We did have much discussion around > > can/cannot (e.g. xl can finish disk snapshot?) and should/shouldnot > > (e.g. disk snapshot process should not in xl? domain_snapshot_delete > > should not in libxl?), and confusing because have different ideas. So, > > settling it down is helpful. > > > > Talking about libvirt, it does provide storage management but through > > storage pools and volumes. But usually, we don't use storage pool/vol > > but directly use backend files, then libvirt storage driver can not > > manage them. And for libvirt vol, functionality in storage driver is > > limited, at least 'snapshot' cannot be done. So, libvirt side also > > needs to add codes to handle disk snapshot, quite like xl does. > > > > OK, so I take it that libvirt can be completely out the picture? I mean, > it's not a requirement for you to integrate with libvirt? > > I was thinking a stack like this when I replied: > > libvirt: manages snapshot (including storage snapshot) > libxl > [other lower level stuffs] > > While I read from your reply, libvirt doesn't have that functionality > (or very limited), so you would like to do things like: > > libvirt (or your homebrew toolstack) > xl (xl or libxl manages domain snapshots) > libxl > [other lower level stuffs] > Note, I'm in no way endorsing this approach. This is my understanding (or misunderstanding) of what you intended to do. I started drawing pictures so that we can understand each other better. Wei.