Skip to contentSkip to conversation

crypto: initialize sector size even when opening with no IO flag

PATCH Applied Daniel P. Berrangé 3 participants 3 messages Oct 16, 2018 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 crypto/block-qcow.c | 2 ++
 1 file changed, 2 insertions(+)
crypto/block-qcow.c +2 -0
index 4284e05167..7606231e79 100644
@@ -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) {
Signature · 1 line
2.17.2