| Submitter | Kevin Wolf |
|---|---|
| Date | Nov. 14, 2012, 6:47 p.m. |
| Message ID | <1352918847-3696-3-git-send-email-kwolf@redhat.com> |
| Download | mbox | patch |
| Permalink | /patch/198975/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 5e3f915..96224d1 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -301,7 +301,8 @@ static int alloc_refcount_block(BlockDriverState *bs, uint64_t last_table_size; uint64_t blocks_clusters; do { - uint64_t table_clusters = size_to_clusters(s, table_size); + uint64_t table_clusters = + size_to_clusters(s, table_size * sizeof(uint64_t)); blocks_clusters = 1 + ((table_clusters + refcount_block_clusters - 1) / refcount_block_clusters);