aboutsummaryrefslogtreecommitdiff
path: root/block/qcow2-refcount.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2012-03-16 14:09:08 +0100
committerKevin Wolf <kwolf@redhat.com>2012-04-20 15:57:29 +0200
commit76dc9e0c8f369f1695e5413de2e28d69108476bb (patch)
tree7a61be9396100133151e807a643eddbd73d8242a /block/qcow2-refcount.c
parent143550a83ef4eef86a847d00023d148e1f59f743 (diff)
qcow2: Ignore reserved bits in refcount table entries
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2-refcount.c')
-rw-r--r--block/qcow2-refcount.c2
1 files changed, 1 insertions, 1 deletions
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) {