[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qcow2: Fix alignment checks in encrypted images
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH] qcow2: Fix alignment checks in encrypted images |
Date: |
Thu, 13 Feb 2020 17:36:57 +0000 |
User-agent: |
Mutt/1.13.3 (2020-01-12) |
On Thu, Feb 13, 2020 at 06:16:46PM +0100, Alberto Garcia wrote:
> 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 <address@hidden>
> ---
> block/qcow2-threads.c | 12 ++++++++----
> block/qcow2.c | 2 --
> 2 files changed, 8 insertions(+), 6 deletions(-)
Reviewed-by: Daniel P. Berrangé <address@hidden>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|