All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Chunyan Liu <cyliu@suse.com>
Cc: wei.liu2@citrix.com, jfehlig@suse.com, ian.jackson@eu.citrix.com,
	xen-devel@lists.xen.org
Subject: Re: [RFC V10 4/4] domain snapshot design: libxl
Date: Thu, 29 Jan 2015 16:41:09 +0000	[thread overview]
Message-ID: <1422549669.10225.0.camel@citrix.com> (raw)
In-Reply-To: <1422242713-3744-5-git-send-email-cyliu@suse.com>

On Mon, 2015-01-26 at 11:25 +0800, Chunyan Liu wrote:
> Changes to V9:
>   * update libxl_disk_snapshot structures as Ian suggests
>   * add more descriptions for libxl_disk_snapshot_delete
>   * add two functions for deleting external disk snapshot:
>     libxl_domain_block_rebase and libxl_domain_block_commit
> 
> ===========================================================================
> 
> Libxl Design
> 
> 1. New Structures
> 
> libxl_disk_snapshot_type = Struct("disk_snapshot_type", [
>     (0, "default"),

How is default handled wrt the keyed union? In particualr if default
turns out to mean external, then external_path would need to be non-null
-- how is that fabricated?

Or did you mean s/default/unknown/ suggesting this would be an illegal
input?

>     (1, "internal"),
>     (2, "external"),
>     ])
> 
> libxl_disk_snapshot = Struct("disk_snapshot",[
>     # target disk
>     ("disk",            libxl_device_disk),
> 
>     # disk snapshot name
>     ("name",            string),
> 
>     ("u", KeyedUnion(None, libxl_disk_snapshot_type, "type",
>          [("external", Struct(None, [
> 
>             # disk format for external files. Since external disk snapshot is
>             # implemented with backing file mechanism, the external file disk
>             # format must support backing file. This field can be NULL, then
>             # a proper disk format will be used by default according to the
>             # orignal disk format.
>             ("external_format", libxl_disk_format),
> 
>             # external file path. This field should be non-NULL and a new path.
>             ("external_path",   string),
>             ]))
>          ]))
>     ])
> 
> 
> 2. New Functions
[...]

> /**
>  * libxl_disk_to_snapshot:
>  * @snapshot: array of disk snapshot configuration. Has "nb" members.
>  * @nb: number of disks.
>  * @ctx: libxl context
>  * @domid: domain id
>  * @snapshot (OUTPUT): array of disk snapshot configuration.
>  * @num (OUTPUT): number of disks.

@nb must equal @num, perhaps you actually meant for this to be an IN/OUT
parameter along with @snapshot instead of passing an IN array and an OUT
array?

>  *
>  * Helper function to produce an array of libxl_disk_snapshot.
>  *
>  * Could be used when user doesn't specify disk snapshot information
>  * in creating a domain snapshot, it will by default fill disk snapshot
>  * information according to domain disks:
>  *   By default it will take internal disk snapshot to each domain
>  *   disk that could take internal disk snapshot, otherwise, take
>  *   external disk snapshot.

How does this function determine the external path?

  reply	other threads:[~2015-01-29 16:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26  3:25 [RFC V10 0/4] domain snapshot document Chunyan Liu
2015-01-26  3:25 ` [RFC V10 1/4] domain snapshot terms Chunyan Liu
2015-01-26  3:25 ` [RFC V10 2/4] domain snapshot overview Chunyan Liu
2015-01-26  3:25 ` [RFC V10 3/4] domain snapshot design: xl Chunyan Liu
2015-01-29 16:33   ` Ian Campbell
2015-01-30  7:51     ` Chun Yan Liu
2015-01-26  3:25 ` [RFC V10 4/4] domain snapshot design: libxl Chunyan Liu
2015-01-29 16:41   ` Ian Campbell [this message]
2015-01-30  6:18     ` Chun Yan Liu
2015-01-29 16:36 ` [RFC V10 0/4] domain snapshot document Ian Campbell
2015-01-30 13:38   ` Wei Liu
2015-01-30 14:01     ` Fabio Fantoni
2015-01-30 14:05       ` Wei Liu
2015-01-30 14:08         ` Wei Liu
2015-02-01 20:55   ` Dave Scott
2015-02-02 11:11     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422549669.10225.0.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=cyliu@suse.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jfehlig@suse.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.