]> Git Repo - qemu.git/commitdiff
crypto: initialize sector size even when opening with no IO flag
authorDaniel P. BerrangĂ© <[email protected]>
Tue, 16 Oct 2018 10:31:05 +0000 (11:31 +0100)
committerKevin Wolf <[email protected]>
Mon, 5 Nov 2018 14:09:54 +0000 (15:09 +0100)
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Ă© <[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
crypto/block-qcow.c

index 4284e05167eb557a40124a9921129925e98e9d7a..7606231e79c39ab4fbf6af8a27124f3c8a03580b 100644 (file)
@@ -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) {
This page took 0.030238 seconds and 4 git commands to generate.