[6464] block-vpc: Fix support for images > 4 GB (Kevin Wolf)
Revision: 6464
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6464 Author: aliguori Date: 2009-01-27 14:29:15 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
block-vpc: Fix support for images > 4 GB (Kevin Wolf)
This patch fixes the truncation of sector offsets to 32 bits.
Signed-off-by Kevin Wolf <[email protected]>
Signed-off-by Anthony Liguori <[email protected]>
Modified Paths:
--------------
trunk/block-vpc.c
Modified: trunk/block-vpc.c
===================================================================
block-vpc.c +1 -1
@@ -256,7 +256,7 @@if (pagetable_index >= s->max_table_entries || s->pagetable[pagetable_index] ==0xffffffff )return -1 ;// not allocated - bitmap_offset =512 * s->pagetable[pagetable_index]; + bitmap_offset =512 * (uint64_t ) s->pagetable[pagetable_index]; block_offset = bitmap_offset + s->bitmap_size + (512 * pageentry_index);// We must ensure that we don't write to any sectors which are marked as