* [Qemu-devel] [PATCH] crypto: initialize sector size even when opening with no IO flag
@ 2018-10-16 10:31 Daniel P. Berrangé
2018-10-16 10:59 ` Alberto Garcia
2018-10-16 11:35 ` [Qemu-devel] [Qemu-block] " Kevin Wolf
0 siblings, 2 replies; 3+ messages in thread
From: Daniel P. Berrangé @ 2018-10-16 10:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Alberto Garcia, qemu-block, Max Reitz, 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é <berrange@redhat.com>
---
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.17.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] crypto: initialize sector size even when opening with no IO flag
2018-10-16 10:31 [Qemu-devel] [PATCH] crypto: initialize sector size even when opening with no IO flag Daniel P. Berrangé
@ 2018-10-16 10:59 ` Alberto Garcia
2018-10-16 11:35 ` [Qemu-devel] [Qemu-block] " Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Alberto Garcia @ 2018-10-16 10:59 UTC (permalink / raw)
To: Daniel P. Berrangé, qemu-devel; +Cc: qemu-block, Max Reitz
On Tue 16 Oct 2018 12:31:05 PM CEST, Daniel P. Berrangé wrote:
> 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>
I was actually preparing a patch along these lines :-)
Reviewed-by: Alberto Garcia <berto@igalia.com>
Berto
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Qemu-block] [PATCH] crypto: initialize sector size even when opening with no IO flag
2018-10-16 10:31 [Qemu-devel] [PATCH] crypto: initialize sector size even when opening with no IO flag Daniel P. Berrangé
2018-10-16 10:59 ` Alberto Garcia
@ 2018-10-16 11:35 ` Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2018-10-16 11:35 UTC (permalink / raw)
To: Daniel P. Berrangé; +Cc: qemu-devel, qemu-block, Max Reitz
Am 16.10.2018 um 12:31 hat Daniel P. Berrangé geschrieben:
> 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>
Thanks, applied to the block branch (and staged before the other patch
that exposed the bug).
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-16 11:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-16 10:31 [Qemu-devel] [PATCH] crypto: initialize sector size even when opening with no IO flag Daniel P. Berrangé
2018-10-16 10:59 ` Alberto Garcia
2018-10-16 11:35 ` [Qemu-devel] [Qemu-block] " Kevin Wolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).