diff options
author | Max Reitz <mreitz@redhat.com> | 2014-10-22 14:09:28 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-10-23 15:34:01 +0200 |
commit | 1d13d654666a7fd6d6a85a0ce9285dbf0d0444c2 (patch) | |
tree | afc4fe0f17cb9f8c441ebebdc9597cdb7c6dc1bb /block/qcow2.h | |
parent | 9ebd84480583bb6d9a7666c079d99ff3266c423d (diff) |
qcow2: Calculate refcount block entry count
The size of a refblock entry is (in theory) variable; calculate
therefore the number of entries per refblock and the according bit shift
(1 << x == entry count) when opening an image.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2.h')
-rw-r--r-- | block/qcow2.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/qcow2.h b/block/qcow2.h index 7d61e615ff..47cd4b3f76 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -223,6 +223,8 @@ typedef struct BDRVQcowState { int l2_size; int l1_size; int l1_vm_state_index; + int refcount_block_bits; + int refcount_block_size; int csize_shift; int csize_mask; uint64_t cluster_offset_mask; |