[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img |
Date: |
Wed, 10 Jul 2019 23:24:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 10.07.19 19:03, Maxim Levitsky wrote:
> preallocation=off and preallocation=metadata
> both allocate luks header only, and preallocation=falloc/full
> is passed to underlying file, with the given image size.
>
> Note that the actual preallocated size is a bit smaller due
> to luks header.
Couldn’t you just preallocate it after creating the crypto header so
qcrypto_block_get_payload_offset(crypto->block) + size is the actual
file size?
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1534951
>
> Signed-off-by: Maxim Levitsky <address@hidden>
> ---
> block/crypto.c | 28 ++++++++++++++++++++++++++--
> 1 file changed, 26 insertions(+), 2 deletions(-)
Hm. I would expect a preallocated image to read 0. But if you just
pass this through to the protocol layer, it won’t read 0.
(In fact, I don’t even quite see the point of having LUKS as an own
format still. It was useful when qcow2 didn’t have LUKS support, but
now it does, so... I suppose everyone using the LUKS format should
actually be using qcow2 with LUKS?)
Max
signature.asc
Description: OpenPGP digital signature
Re: [Qemu-devel] [PATCH] LUKS: support preallocation in qemu-img, Daniel P . Berrangé, 2019/07/11