]> git.proxmox.com Git - mirror_qemu.git/commit
qcow2: Make size_to_clusters() return uint64_t
authorMax Reitz <mreitz@redhat.com>
Mon, 14 Sep 2015 14:39:47 +0000 (16:39 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 14 Sep 2015 14:51:37 +0000 (16:51 +0200)
commitb6d36def6d9e9fd187327182d0abafc9b7085d8f
tree475f42def1a1636491174996483a98ba323276b2
parent231f66d2a3401473778c70a75d5f670765ab6d91
qcow2: Make size_to_clusters() return uint64_t

Sadly, some images may have more clusters than what can be represented
using a plain int. We should be prepared for that case (in
qcow2_check_refcounts() we actually were trying to catch that case, but
since size_to_clusters() truncated the returned value, that check never
did anything useful).

Cc: qemu-stable <qemu-stable@nongnu.org>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-cluster.c
block/qcow2-refcount.c
block/qcow2.h