qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Maxim Levitsky <mlevitsk@redhat.com>
Cc: qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
	qemu-block@nongnu.org, qemu-trivial@nongnu.org,
	Michael Tokarev <mjt@tls.msk.ru>,
	Laurent Vivier <laurent@vivier.eu>, Max Reitz <mreitz@redhat.com>
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	[thread overview]
Message-ID: <20190722090556.GC23775@redhat.com> (raw)
In-Reply-To: <20190721181508.28608-2-mlevitsk@redhat.com>

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 <mlevitsk@redhat.com>
> ---
>  block/crypto.c | 25 +++++++++++++++++++++----
>  1 file changed, 21 insertions(+), 4 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

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


  reply	other threads:[~2019-07-22  9:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-21 18:15 [Qemu-trivial] [PATCH 0/2] RFC: Trivial error message fixes for luks format Maxim Levitsky
2019-07-21 18:15 ` [Qemu-trivial] [PATCH 1/2] LUKS: better error message when creating too large files Maxim Levitsky
2019-07-22  9:05   ` Daniel P. Berrangé [this message]
2019-09-12 22:44     ` [Qemu-trivial] [Qemu-devel] " Maxim Levitsky
2020-04-30 12:18     ` Maxim Levitsky
2020-04-30 13:03       ` Maxim Levitsky
2019-07-21 18:15 ` [Qemu-trivial] [PATCH 2/2] qemu-img: better error message when opening a backing file fails Maxim Levitsky
2019-07-22  9:15   ` [Qemu-trivial] [Qemu-devel] " Daniel P. Berrangé
2019-07-22 10:01     ` Maxim Levitsky
2019-07-22  9:41   ` [Qemu-trivial] " Kevin Wolf
2019-07-22  9:46     ` Maxim Levitsky

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=20190722090556.GC23775@redhat.com \
    --to=berrange@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=mjt@tls.msk.ru \
    --cc=mlevitsk@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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 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).