>>> On 11/11/2014 at 04:07 PM, in message
<5462343c0200006600078...@soto.provo.novell.com>, "Chun Yan Liu"
<cy...@suse.com> wrote: 

>  
>>>> On 11/11/2014 at 01:04 AM, in message 
> <caflbxzzvqzxuouciujstp-gjsuoquofuk6dy1k2rnxueeb4...@mail.gmail.com>, George 
> Dunlap <dunl...@umich.edu> wrote:  
> > On Mon, Nov 10, 2014 at 8:17 AM, Chunyan Liu <cy...@suse.com> wrote:  
> >   
> > >  
> > > 3. Function Implementation  
> > >  
> > >    libxl_domain_snapshot_create:  
> > >        1). check args validation  
> > >        2). save domain memory through save-domain  
> > >        3). take disk snapshot by qmp command (if domian is active) or 
> > qemu-img  
> > >            command (if domain is inactive).  
> >   
> > By "active" here, do you you mean "live" (vs paused)? 
> Means the domain is started (no matter is running or paused). 
> vs (libvirt defines a domain but not started). 
> Here,  I should update this to: 
> 3). take disk snapshot by qmp command 
> libxl only handles active domain. 
>  
> >   
> > >    libxl_domain_snapshot_delete:  
> > >        1). check args validation  
> > >        2). remove memory state file.  
> > >        3). delete disk snapshot. (for internal disk snapshot, through qmp 
> > >  
> > >            command or qemu-img command)  
> >   
> > Out of curiosity, why is this necessary?  Is libxl keeping track of  
> > the snapshots somewhere?  Or qemu?  
> >   
> > Or to put it a different way, since the caller knows the filenames,  
> > why can't the caller just erase the files themselves? 
>  
> Ian asks the same question. The only reason I propose an API is: 
> xl and libvirt can share the code. And in future, when support many other  
> disk 
> backend types, there is much repeated code. But as Ian mentioned in 
> last version, for handling many disk backend types, maybe better placed in 
> libxlu. Well, if both of you object, I'll remove this API. 

Similar to snapshot delete, for libxl_domain_snapshot_create, the work is
in fact: save memory by domain_save, and do disk snaphsot (by qmp, or
qemu-img can also do that). Considering xl only, not very necessary to have
a new libxl API? But xl and libvirt can share the code if wrapped in API.
So, which is preferred? Any opinion?

- Chunyan

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



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

Reply via email to