OSDN Git Service

qcow2: Fix snapshot restoration in snapshot_create
authorMax Reitz <mreitz@redhat.com>
Wed, 9 Oct 2013 12:42:00 +0000 (14:42 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 11 Oct 2013 14:50:00 +0000 (16:50 +0200)
commit84757f7e67cda3df8b04e06fbdeecc266415d2f3
tree434dad1032c0a6b7ff077d2fe62c68bdd2cf8b21
parentf9bff971436b5924ca3c3203c6a3dcd6437bd430
qcow2: Fix snapshot restoration in snapshot_create

If the new snapshot table could not be written in qcow2_snapshot_create,
the old snapshot table has to be restored in memory and the new one
released. This should include restoration of the old snapshot count as
well, which is added by this patch.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-snapshot.c