qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Rob Earhart <earhart@google.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Use snapshots from backing disks
Date: Thu, 18 Mar 2010 11:37:07 +0100	[thread overview]
Message-ID: <4BA20253.3070707@redhat.com> (raw)
In-Reply-To: <4B98EC2F.9010407@redhat.com>

Am 11.03.2010 14:12, schrieb Kevin Wolf:
> Am 09.03.2010 02:13, schrieb Rob Earhart:
>> Modify the snapshot load path to find and load snapshots contained in backing
>> disks, useful when the current disk is a differencing disk.
>>
>> Add the source of a snapshot when listing snapshots.
>>
>> This should only break backwards compatibility for scenarios depending on not
>> being able to load snapshots from backing disks (which doesn't seem like a
>> problem), and for code which parses the snapshot list output (if any).
>>
>> Signed-off-by: Rob Earhart <earhart@google.com>
> 
> I think I have considered this kind of thing some time ago, and I seem
> to remember that there was something dangerous about it. However, I can
> remember right away what it was. Give me a day or two to think about it
> once again.

One thing that came to my mind is the following:

1. Load a snapshot from the backing file
2. Run the VM for a while
3. savevm (to the COW file)
4. Load a different snapshot from the backing file
5. Load the snapshot saved in 3.

At this point we need not only load the snapshot in the COW file, but we
also need to load the backing file snapshot on which this snapshot is
based. Therefore we need to save the name of the current snapshot in the
whole backing file chain. This needs a file format change.

Luckily (and surprisingly) the snapshot header seems to be about the
only place in qcow2 which is actually prepared for extensions - at least
it has an extra_data_size field. So I think it might be possible to
implement it in a backwards compatible way at least (however, don't try
to open such images in older qemu versions then, they would fail horribly).

Kevin

  reply	other threads:[~2010-03-18 10:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09  1:13 [Qemu-devel] [PATCH] Use snapshots from backing disks Rob Earhart
2010-03-11 13:12 ` Kevin Wolf
2010-03-18 10:37   ` Kevin Wolf [this message]
2010-03-17 15:35 ` Anthony Liguori
2010-03-17 18:16   ` Rob Earhart

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=4BA20253.3070707@redhat.com \
    --to=kwolf@redhat.com \
    --cc=earhart@google.com \
    --cc=qemu-devel@nongnu.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).