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

Re: [Xen-devel] [RFC v3] domain snapshot documents

On Fri, May 16, 2014 at 6:00 PM, Bamvor Jian Zhang <bjzhang@xxxxxxxx> wrote:
Hi, david

> On Thu, May 15, 2014 at 4:58 PM, Bamvor Jian Zhang <bjzhang@xxxxxxxx> wrote:
> > Hi,
> >
> > here is the third version about domain snapshot documents, the second
> > version
> > and the first version is here[1][2].
> > 2, new functions
> > there is no common api like libxl_snapshot_xxx. the reason is that
> > different
> > toolstack may need to different event handling machanism(synchronize or
> > asynchronize). and obviously, domain snapshot create need async handler.
> > so i
> > decide to only provide the sub api for xl and other toolstack(e.g.
> > libvirt).
> > it make eailer for toolstack to handle the event by themselves.
> >
> > 1), in libxl/libxl.h
> > the implementation will be located in libxl_snapshot.c
> > /* disk snapshot api
> > Â* support create for external and internal disks, support delete for
> > internal
> > Â* snapshot of disks.
> > Â*/
> > /* create disk snapshot according to the device name in snapshot array. nb
> > is
> > Â* the number of snapshot array.
> > Â* use the qmp transaction to ensure all snapshot of disk is coherence.
> > Â*/
> > int libxl_disk_snapshot_create(libxl_ctx *ctx, int domid,
> > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âlibxl_disk_snapshot *snapshot, int nb,
> > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âconst libxl_asyncop_how *ao_how);
> > /* delete number of nb disk snapshot describe in snapshot array
> > Â*/
> > int libxl_disk_snapshot_delete(libxl_ctx *ctx, int domid,
> > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âlibxl_disk_snapshot *snapshot, int nb);
Are this the only two functions you are exposing?I mean the API?or am I getting something wrong?Â
> >
> >
> I think we also need revert libxl_disk_snapshot_revert() here.
there are two methods for revert disk snapshot state in qemu: call "loadvm" hmp
and "qemu-img snapshot -a". and i will call loadvm for reverting the qemu state
and disk state in libxl_snapshot_create.
user could revert the dedicate disk snapshot with qemu-img when domain is not
running.it seems not a good idea wrap the qemu-img command in libxl.



Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.