qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Use snapshots from backing disks


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] Use snapshots from backing disks
Date: Thu, 18 Mar 2010 11:37:07 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1

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 <address@hidden>
> 
> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]