On 26.10.19 23:25, Alberto Garcia wrote: > qcow2 images with subclusters have 128-bit L2 entries. The first 64 > bits contain the same information as traditional images and the last > 64 bits form a bitmap with the status of each individual subcluster. > > Because of that we cannot assume that L2 entries are sizeof(uint64_t) > anymore. This function returns the proper value for the image. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cluster.c | 12 ++++++------ > block/qcow2-refcount.c | 14 ++++++++------ > block/qcow2.c | 6 +++--- > block/qcow2.h | 5 +++++ > 4 files changed, 22 insertions(+), 15 deletions(-) I suppose qcow2_calc_prealloc_size(), qcow2_co_truncate() (nb_new_l2_tables), and qcow2_measure() (l2_tables) also need some adjustment. Max