diff options
author | Alberto Garcia <berto@igalia.com> | 2020-08-28 13:08:28 +0200 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2020-09-15 11:05:12 +0200 |
commit | 02b1ecfa100e7ecc2306560cd27a4a2622bfeb04 (patch) | |
tree | fd2067510fcef3381b01bae8719756e27533c9a0 /block/qcow2.h | |
parent | af8d43d3933a4bec0977b9f33d69443a2d166861 (diff) |
qcow2: Use macros for the L1, refcount and bitmap table entry sizes
This patch replaces instances of sizeof(uint64_t) in the qcow2 driver
with macros that indicate what those sizes are actually referring to.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-Id: <20200828110828.13833-1-berto@igalia.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/qcow2.h')
-rw-r--r-- | block/qcow2.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/block/qcow2.h b/block/qcow2.h index 065ec3df0b..83cfa0c391 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -99,6 +99,12 @@ #define L2E_SIZE_NORMAL (sizeof(uint64_t)) #define L2E_SIZE_EXTENDED (sizeof(uint64_t) * 2) +/* Size of L1 table entries */ +#define L1E_SIZE (sizeof(uint64_t)) + +/* Size of reftable entries */ +#define REFTABLE_ENTRY_SIZE (sizeof(uint64_t)) + #define MIN_CLUSTER_BITS 9 #define MAX_CLUSTER_BITS 21 |