From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Alberto Garcia <berto@igalia.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qcow2: Get the request alignment for encrypted images from QCryptoBlock
Date: Tue, 16 Oct 2018 11:32:05 +0100 [thread overview]
Message-ID: <20181016103205.GC7995@redhat.com> (raw)
In-Reply-To: <cfedbf5d-1399-6d21-b686-1dedfaf5f7d9@redhat.com>
On Mon, Oct 15, 2018 at 06:38:14PM +0200, Max Reitz wrote:
> On 11.10.18 12:58, Alberto Garcia wrote:
> > This doesn't have any practical effect at the moment because the
> > values of BDRV_SECTOR_SIZE, QCRYPTO_BLOCK_LUKS_SECTOR_SIZE and
> > QCRYPTO_BLOCK_QCOW_SECTOR_SIZE are all the same (512 bytes), but
> > future encryption methods could have different requirements.
> >
> > Signed-off-by: Alberto Garcia <berto@igalia.com>
> > ---
> > block/qcow2.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> This breaks non-LUKS encryption:
>
> $ ./qemu-img create -f qcow2 -o encryption=on,encrypt.key-secret=secret
> --object secret,id=secret,data=foo foo.qcow2 64M
> Formatting 'foo.qcow2', fmt=qcow2 size=67108864 encryption=on
> encrypt.key-secret=secret cluster_size=65536 lazy_refcounts=off
> refcount_bits=16
> qemu-img: block.c:1248: bdrv_open_driver: Assertion
> `is_power_of_2(bs->bl.request_alignment)' failed.
> [1] 13589 abort (core dumped) ./qemu-img create -f qcow2 -o
> encryption=on,encrypt.key-secret=secret --objec
>
> (As seen in iotests 049, 087, 134, and 158.)
We failed to set sector size in the crypto backend when opening with
the NO_IO flag set. I just sent a fix for that. Feel free to queue it
as part of the block layer rather than waiting for my next crypto layer
pull request.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
prev parent reply other threads:[~2018-10-16 10:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 10:58 [Qemu-devel] [PATCH] qcow2: Get the request alignment for encrypted images from QCryptoBlock Alberto Garcia
2018-10-11 11:01 ` Daniel P. Berrangé
2018-10-11 16:02 ` Kevin Wolf
2018-10-15 16:38 ` Max Reitz
2018-10-16 10:32 ` Daniel P. Berrangé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181016103205.GC7995@redhat.com \
--to=berrange@redhat.com \
--cc=berto@igalia.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.