[libvirt] [PATCH 5/4] qemu: properly revert to offline snapshots
Philipp Hahn
hahn at univention.de
Wed Aug 10 06:24:22 UTC 2011
Hello Eric,
you're patch looks very similar to mine, which I created myself yesterday, but
hadn't had time to actually send after doing the testing. I'll attach it just
FYI.
On Wednesday 10 August 2011 01:28:42 Eric Blake wrote:
> qemuDomainSnapshotRevertInactive has the same FIXMEs as
> qemuDomainSnapshotCreateInactive, so algorithmic fixes to properly
> handle partial loop iterations should be applied later to both
> functions, but we're not making the situation any worse in
> this patch.
>
> * src/qemu/qemu_driver.c (qemuDomainRevertToSnapshot): Use
> qemu-img rather than 'qemu -loadvm' to revert to offline snapshot.
> (qemuDomainSnapshotRevertInactive): New helper.
s/offline/inactive/ just for consistency.
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
...
>@@ -8846,7 +8893,7 @@ static int
qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
> }
> }
>
>- if (qemuDomainSnapshotSetCurrentActive(vm, driver->snapshotDir) < 0)
>+ if (qemuDomainSnapshotRevertInactive(vm, snap) < 0)
Now you don't call qemuDomainSnapshotSetCurrent() any more, which marks the
snapshot at being current (what ever that is important for).
That's why I in my patch also have to change qemuBuildCommandLine() to not
add -loadvm, since qemu then will refuse to start.
> goto endjob;
> }
Sincerely
Philipp
--
Philipp Hahn Open Source Software Engineer hahn at univention.de
Univention GmbH Linux for Your Business fon: +49 421 22 232- 0
Mary-Somerville-Str.1 D-28359 Bremen fax: +49 421 22 232-99
http://www.univention.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snap.diff
Type: text/x-diff
Size: 4010 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110810/6fb68c9c/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110810/6fb68c9c/attachment-0001.sig>
More information about the libvir-list
mailing list