[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/36] qcow2: Get the request alignment for encrypted
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 08/36] qcow2: Get the request alignment for encrypted images from QCryptoBlock |
Date: |
Mon, 5 Nov 2018 17:37:16 +0100 |
From: Alberto Garcia <address@hidden>
This doesn't have any practical effect at the moment because the
values of BDRV_SECTOR_SIZE, QCRYPTO_BLOCK_LUKS_SECTOR_SIZE and
QCRYPTO_BLOCK_QCOW_SECTOR_SIZE are all the same (512 bytes), but
future encryption methods could have different requirements.
Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qcow2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index de94b290e6..991d6ac91b 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1677,7 +1677,7 @@ static void qcow2_refresh_limits(BlockDriverState *bs,
Error **errp)
if (bs->encrypted) {
/* Encryption works on a sector granularity */
- bs->bl.request_alignment = BDRV_SECTOR_SIZE;
+ bs->bl.request_alignment = qcrypto_block_get_sector_size(s->crypto);
}
bs->bl.pwrite_zeroes_alignment = s->cluster_size;
bs->bl.pdiscard_alignment = s->cluster_size;
--
2.19.1
- [Qemu-devel] [PULL 00/36] Block layer patches, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 02/36] block: replace "discard" literal with BDRV_OPT_DISCARD macro, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 03/36] qemu-io-cmds: Fix two format strings, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 01/36] block/vvfat: Fix crash when reporting error about too many files in directory, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 07/36] crypto: initialize sector size even when opening with no IO flag, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 04/36] block/qcow2: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 05/36] block/qcow: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 06/36] block/qcow2-bitmap: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 08/36] qcow2: Get the request alignment for encrypted images from QCryptoBlock,
Kevin Wolf <=
- [Qemu-devel] [PULL 09/36] block: change some function return type to bool, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 10/36] iotests: make 083 specific to raw, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 12/36] block/vhdx: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 22/36] block: Require auto-read-only for existing fallbacks, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 15/36] quorum: Return an error if the blkverify mode has invalid settings, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 30/36] option: Make option help nicer to read, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 19/36] block: Update flags in bdrv_set_read_only(), Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 31/36] chardev: Indent list of chardevs, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 18/36] iotest: Test x-blockdev-change on a Quorum, Kevin Wolf, 2018/11/05
- [Qemu-devel] [PULL 23/36] nbd: Support auto-read-only option, Kevin Wolf, 2018/11/05