diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2018-10-16 11:31:05 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-11-05 15:09:54 +0100 |
commit | 07809a7fa8bad7f6255a4955e1520ad09ad738a4 (patch) | |
tree | 598c39cc74658ae7e8803194bfd46baabdf2f735 | |
parent | caacea4b2ed7ccf3f32ad03b810146f56125626b (diff) |
crypto: initialize sector size even when opening with no IO flag
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é <berrange@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | crypto/block-qcow.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |