qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qcow2: Get the request alignment for encrypted


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH] qcow2: Get the request alignment for encrypted images from QCryptoBlock
Date: Mon, 15 Oct 2018 18:38:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

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 <address@hidden>
> ---
>  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.)

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]