aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2020-09-28 18:23:33 +0200
committerKevin Wolf <kwolf@redhat.com>2020-10-02 15:46:40 +0200
commitc508c73dca636cc0fc7413d1e4a43fcfe4a5698c (patch)
tree6ef9d89cf0910823d67a4aac31bf8be3f3ede5aa
parent45db4bc1fccf10e8a49d1052e4be30c547ff1824 (diff)
downloadqemu-c508c73dca636cc0fc7413d1e4a43fcfe4a5698c.zip
qemu-c508c73dca636cc0fc7413d1e4a43fcfe4a5698c.tar.gz
qemu-c508c73dca636cc0fc7413d1e4a43fcfe4a5698c.tar.bz2
qcow2: Use L1E_SIZE in qcow2_write_l1_entry()
We overlooked these in 02b1ecfa100e7ecc2306560cd27a4a2622bfeb04 Signed-off-by: Alberto Garcia <berto@igalia.com> Message-Id: <20200928162333.14998-1-berto@igalia.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--block/qcow2-cluster.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index 9acc6ce..aa87d3e 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -240,14 +240,14 @@ int qcow2_write_l1_entry(BlockDriverState *bs, int l1_index)
}
ret = qcow2_pre_write_overlap_check(bs, QCOW2_OL_ACTIVE_L1,
- s->l1_table_offset + 8 * l1_start_index, bufsize, false);
+ s->l1_table_offset + L1E_SIZE * l1_start_index, bufsize, false);
if (ret < 0) {
return ret;
}
BLKDBG_EVENT(bs->file, BLKDBG_L1_UPDATE);
ret = bdrv_pwrite_sync(bs->file,
- s->l1_table_offset + 8 * l1_start_index,
+ s->l1_table_offset + L1E_SIZE * l1_start_index,
buf, bufsize);
if (ret < 0) {
return ret;