[Top][All Lists]

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] LUKS: better error message w

From: Daniel P . Berrangé
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] LUKS: better error message when creating too large files
Date: Mon, 22 Jul 2019 10:05:56 +0100
User-agent: Mutt/1.12.0 (2019-05-25)

On Sun, Jul 21, 2019 at 09:15:07PM +0300, Maxim Levitsky wrote:
> Currently if you attampt to create too large file with luks you
> get the following error message:
> Formatting 'test.luks', fmt=luks size=17592186044416 key-secret=sec0
> qemu-img: test.luks: Could not resize file: File too large
> While for raw format the error message is
> qemu-img: test.img: The image size is too large for file format 'raw'
> The reason for this is that qemu-img checks for errono of the failure,
> and presents the later error when it is -EFBIG
> However crypto generic code 'swallows' the errno and replaces it
> with -EIO.
> As an attempt to make it better, we can make luks driver,
> detect -EFBIG and in this case present a better error message,
> which is what this patch does
> The new error message is:
> qemu-img: error creating test.luks: The requested file size is too large
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1534898
> Signed-off-by: Maxim Levitsky <address@hidden>
> ---
>  block/crypto.c | 25 +++++++++++++++++++++----
>  1 file changed, 21 insertions(+), 4 deletions(-)

Reviewed-by: Daniel P. Berrangé <address@hidden>

|: 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 :|

reply via email to

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