From: Ian Campbell <Ian.Campbell@citrix.com>
To: Chun Yan Liu <cyliu@suse.com>
Cc: kwolf@redhat.com, wei.liu2@citrix.com, ian.jackson@eu.citrix.com,
qemu-devel@nongnu.org, xen-devel@lists.xen.org,
Jim Fehlig <JFEHLIG@suse.com>,
stefanha@redhat.com
Subject: Re: [Qemu-devel] [RFC V9 4/4] domain snapshot design: libxl/libxlu
Date: Thu, 8 Jan 2015 12:11:47 +0000 [thread overview]
Message-ID: <1420719107.19787.53.camel@citrix.com> (raw)
In-Reply-To: <549856940200006600087406@soto.provo.novell.com>
On Mon, 2014-12-22 at 02:36 -0700, Chun Yan Liu wrote:
> > > b). For internal snapshot, like qcow2, lvm too. For lvm, it doesn't support
> > > snapshot of snapshot, so out of scope. For qcow2, delete any disk snapshot
> > > won't affect others.
> >
> > For either internal or external if you are removing a snapshot from the
> > middle of a chain which ends in one or more active disks, then surely
> > the disk backend associated with those domains need to get some sort of
> > notification, otherwise they would need to be written *very* carefully
> > in order to be able to cope with disk metadata changing under their
> > feet.
> >
> > Are you saying that the qemu/qcow implementation has indeed been written
> > with this in mind and can cope with arbitrary other processes modifying
> > the qcow metadata under their feet?
>
> Yes.
>
> I add qemu-devel Kevin and Stefan in this thread in case my understanding
> has somewhere wrong.
>
> Kevin & Stefan,
>
> About the qcow2 snapshot implementation, in following snapshot chain case,
> if we delete SNAPSHOT A, will it affect domain 1 and domain 2 which uses
> SNAPSHOT B and SNAPSHOT C?
>
> From my understanding, creating a snapshot will increases refcount of original data,
> deleting a snapshot only descreases the refcount (won't delete data until the refcount
> becomes 0), so I think it won't affect domain 1 and domain 2.
> Is that right?
I'm not worried about the data being deleted (I'm sure qcow2 will get
that right), but rather about the snapshot chain being collapsed and
therefore the metadata (e.g. the tables of which block is in which
backing file, and perhaps the location of the data itself) changing
while a domain is running, e.g.
BASE---SNAPSHOT A---SNAPSHOT B --- domain 1
`--SNAPSHOT C --- domain 2
becoming
BASE----------------SNAPSHOT B --- domain 1
`--SNAPSHOT C --- domain 2
(essentially changing B and C's tables to accommodate the lack of A)
For an internal snapshot I can see that it would be sensible (and easy)
to keep A around as a "ghost", to avoid this case, and the need to
perhaps move data around or duplicate it.
If A were external though an admin might think they could delete the
file...
Ian.
next prev parent reply other threads:[~2015-01-08 12:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1418711577-15449-1-git-send-email-cyliu@suse.com>
[not found] ` <1418711577-15449-5-git-send-email-cyliu@suse.com>
[not found] ` <1418916436.11882.101.camel@citrix.com>
[not found] ` <54943D220200006600086A64@soto.provo.novell.com>
[not found] ` <1418985490.20028.27.camel@citrix.com>
2014-12-22 9:36 ` [Qemu-devel] [RFC V9 4/4] domain snapshot design: libxl/libxlu Chun Yan Liu
2015-01-08 12:11 ` Ian Campbell [this message]
2015-01-09 9:59 ` Chun Yan Liu
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=1420719107.19787.53.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=JFEHLIG@suse.com \
--cc=cyliu@suse.com \
--cc=ian.jackson@eu.citrix.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).