
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@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/