]> Git Repo - qemu.git/commit - block/qcow2-threads.c
qcow2: Fix alignment checks in encrypted images
authorAlberto Garcia <[email protected]>
Thu, 13 Feb 2020 17:16:46 +0000 (18:16 +0100)
committerKevin Wolf <[email protected]>
Tue, 18 Feb 2020 09:53:56 +0000 (10:53 +0100)
commit2d4b5256cf6a091bb6c3516661be11b9ec690f95
tree1ba5dfd01193640a8c7e48a290d35d2718b1e93b
parent7e6c4ff792734e196c8ca82564c56b5e7c6288ca
qcow2: Fix alignment checks in encrypted images

I/O requests to encrypted media should be aligned to the sector size
used by the underlying encryption method, not to BDRV_SECTOR_SIZE.
Fortunately this doesn't break anything at the moment because
both existing QCRYPTO_BLOCK_*_SECTOR_SIZE have the same value as
BDRV_SECTOR_SIZE.

The checks in qcow2_co_preadv_encrypted() are also unnecessary because
they are repeated immediately afterwards in qcow2_co_encdec().

Signed-off-by: Alberto Garcia <[email protected]>
Message-Id: <20200213171646[email protected]>
Reviewed-by: Daniel P. BerrangĂ© <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/qcow2-threads.c
block/qcow2.c
This page took 0.026028 seconds and 4 git commands to generate.