qcow2-refcount: Snapshot update for zero clusters
commit8b81a7b6ba8686f35f9cb0acdd54004d63206f03
authorMax Reitz <mreitz@redhat.com>
Fri, 30 Aug 2013 08:40:14 +0000 (30 10:40 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 30 Aug 2013 13:28:52 +0000 (30 15:28 +0200)
tree9676950cef9e6f2b37e03883a9c9f67083e61ff7
parentd4ca092a423f1f853a99357bab01a168bb57d625
qcow2-refcount: Snapshot update for zero clusters

Account for all cluster types in qcow2_update_snapshot_refcounts;
this prevents this function from updating the refcount of unallocated
zero clusters which effectively led to wrong adjustments of the refcount
of cluster 0 (the main qcow2 header). This in turn resulted in images
with (unallocated) zero clusters having a cluster 0 refcount greater
than one after creating a snapshot.

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