Skip to content

Commit c508c73

Browse files
bertoggkevmw
authored andcommitted
qcow2: Use L1E_SIZE in qcow2_write_l1_entry()
We overlooked these in 02b1ecf Signed-off-by: Alberto Garcia <[email protected]> Message-Id: <[email protected]> Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
1 parent 45db4bc commit c508c73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

block/qcow2-cluster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,14 @@ int qcow2_write_l1_entry(BlockDriverState *bs, int l1_index)
240240
}
241241

242242
ret = qcow2_pre_write_overlap_check(bs, QCOW2_OL_ACTIVE_L1,
243-
s->l1_table_offset + 8 * l1_start_index, bufsize, false);
243+
s->l1_table_offset + L1E_SIZE * l1_start_index, bufsize, false);
244244
if (ret < 0) {
245245
return ret;
246246
}
247247

248248
BLKDBG_EVENT(bs->file, BLKDBG_L1_UPDATE);
249249
ret = bdrv_pwrite_sync(bs->file,
250-
s->l1_table_offset + 8 * l1_start_index,
250+
s->l1_table_offset + L1E_SIZE * l1_start_index,
251251
buf, bufsize);
252252
if (ret < 0) {
253253
return ret;

0 commit comments

Comments
 (0)