From 76dc9e0c8f369f1695e5413de2e28d69108476bb Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 16 Mar 2012 14:09:08 +0100 Subject: qcow2: Ignore reserved bits in refcount table entries Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/qcow2-refcount.c') diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 909d61560a..e0854dc85d 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -167,7 +167,7 @@ static int alloc_refcount_block(BlockDriverState *bs, if (refcount_table_index < s->refcount_table_size) { uint64_t refcount_block_offset = - s->refcount_table[refcount_table_index]; + s->refcount_table[refcount_table_index] & REFT_OFFSET_MASK; /* If it's already there, we're done */ if (refcount_block_offset) { -- cgit v1.2.3