]> git.proxmox.com Git - mirror_qemu.git/commit - block/qed.h
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)
committerKevin Wolf <kwolf@redhat.com>
Wed, 27 Apr 2011 14:21:00 +0000 (16:21 +0200)
commit19dfc44a94f759848a0f7de7378b2f8b9af6b5d0
tree35d5bdf0ba785bb6dd31bdd01992da7dea6411d2
parent7a2c4b82340d621bff462672b29c88d2020d68c1
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