]> git.ipfire.org Git - thirdparty/qemu.git/commit
qed: Fix consistency check on 32-bit hosts
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Sun, 24 Apr 2011 17:38:58 +0000 (18:38 +0100)
committerJustin M. Forbes <jforbes@redhat.com>
Tue, 3 May 2011 13:31:32 +0000 (08:31 -0500)
commit9b33410d3bdd40b6a289c6b79d40a96b129e22af
tree8f84af4691aa001436a1228551ae263ee9301b4a
parent419f1c3503967d85d304d776a1af85b7780fed80
qed: Fix consistency check on 32-bit hosts

The qed_bytes_to_clusters() function is normally used with size_t
lengths.  Consistency check used it with file size length and therefore
failed on 32-bit hosts when the image file is 4 GB or more.

Make qed_bytes_to_clusters() explicitly 64-bit and update consistency
check to keep 64-bit cluster counts.

Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qed-check.c
block/qed.h