crypto: initialize sector size even when opening with no IO flag
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.
Signed-off-by Daniel P. Berrangé <[email protected]>
--- crypto/block-qcow.c | 2 ++ 1 file changed, 2 insertions(+)
crypto/block-qcow.c +2 -0
@@ -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
Quoted 4 lines · Daniel P. Berrangé
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]>
I was actually preparing a patch along these lines :-)
Reviewed-by Alberto Garcia <[email protected]>
Berto
Kevin Wolf
AppliedAm 16.10.2018 um 12:31 hat Daniel P. Berrangé geschrieben:
Quoted 4 lines
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]>
Thanks, applied to the block branch (and staged before the other patch that exposed the bug).
Kevin