From 850f49de9b57511dcaf2cd7e45059f8f38fadf3b Mon Sep 17 00:00:00 2001 From: Daniel P. Berrange Date: Wed, 27 Sep 2017 13:53:36 +0100 Subject: crypto: expose encryption sector size in APIs While current encryption schemes all have a fixed sector size of 512 bytes, this is not guaranteed to be the case in future. Expose the sector size in the APIs so the block layer can remove assumptions about fixed 512 byte sectors. Reviewed-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange Message-id: 20170927125340.12360-3-berrange@redhat.com Signed-off-by: Max Reitz --- crypto/block-qcow.c | 1 + 1 file changed, 1 insertion(+) (limited to 'crypto/block-qcow.c') diff --git a/crypto/block-qcow.c b/crypto/block-qcow.c index a456fe338b..4dd594a9ba 100644 --- a/crypto/block-qcow.c +++ b/crypto/block-qcow.c @@ -80,6 +80,7 @@ qcrypto_block_qcow_init(QCryptoBlock *block, goto fail; } + block->sector_size = QCRYPTO_BLOCK_QCOW_SECTOR_SIZE; block->payload_offset = 0; return 0; -- cgit v1.2.3-55-g7522