[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 07/36] crypto: initialize sector size even when openi
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 07/36] crypto: initialize sector size even when opening with no IO flag |
Date: |
Mon, 5 Nov 2018 17:37:15 +0100 |
From: Daniel P. Berrangé <address@hidden>
The qcow2 block driver expects to see a valid sector size even when it
has opened the crypto layer with QCRYPTO_BLOCK_OPEN_NO_IO.
Signed-off-by: Daniel P. Berrangé <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
crypto/block-qcow.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/crypto/block-qcow.c b/crypto/block-qcow.c
index 4284e05167..7606231e79 100644
--- a/crypto/block-qcow.c
+++ b/crypto/block-qcow.c
@@ -102,6 +102,8 @@ qcrypto_block_qcow_open(QCryptoBlock *block,
Error **errp)
{
if (flags & QCRYPTO_BLOCK_OPEN_NO_IO) {
+ block->sector_size = QCRYPTO_BLOCK_QCOW_SECTOR_SIZE;
+ block->payload_offset = 0;
return 0;
} else {
if (!options->u.qcow.key_secret) {
--
2.19.1
- [Qemu-block] [PULL 00/36] Block layer patches, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 02/36] block: replace "discard" literal with BDRV_OPT_DISCARD macro, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 03/36] qemu-io-cmds: Fix two format strings, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 01/36] block/vvfat: Fix crash when reporting error about too many files in directory, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 05/36] block/qcow: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 07/36] crypto: initialize sector size even when opening with no IO flag,
Kevin Wolf <=
- [Qemu-block] [PULL 06/36] block/qcow2-bitmap: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 04/36] block/qcow2: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 08/36] qcow2: Get the request alignment for encrypted images from QCryptoBlock, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 09/36] block: change some function return type to bool, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 12/36] block/vhdx: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 10/36] iotests: make 083 specific to raw, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 22/36] block: Require auto-read-only for existing fallbacks, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 30/36] option: Make option help nicer to read, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 15/36] quorum: Return an error if the blkverify mode has invalid settings, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 16/36] iotest: Test the blkverify mode of the Quorum driver, Kevin Wolf, 2018/11/05