]> git.proxmox.com Git - qemu.git/commit
qcow2: Simplify count_cow_clusters
authorKevin Wolf <kwolf@redhat.com>
Tue, 27 Mar 2012 11:17:22 +0000 (13:17 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 20 Apr 2012 13:57:28 +0000 (15:57 +0200)
commit143550a83ef4eef86a847d00023d148e1f59f743
tree2de0e606772707624172b10e83b85130280d8706
parentc7a4c37a0f768f7ad50f64414d578436019e1e96
qcow2: Simplify count_cow_clusters

count_cow_clusters() tries to reuse existing functions, and all it
achieves is to make things much more complicated than they really are:
Everything needs COW, unless it's a normal cluster with refcount 1.

This patch implements the obvious way of doing this, and by using
qcow2_get_cluster_type() it gets rid of all flag magic.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-cluster.c