All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com,
	Yasmin Beatriz <yasmins@linux.vnet.ibm.com>,
	Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v3 1/1] dump.c: allow fd_write_vmcore to return errno on failure
Date: Mon, 12 Feb 2018 11:47:29 -0600	[thread overview]
Message-ID: <0fc757fc-427d-65cf-910b-a2e611177f46@redhat.com> (raw)
In-Reply-To: <20180212142506.28445-2-danielhb@linux.vnet.ibm.com>

On 02/12/2018 08:25 AM, Daniel Henrique Barboza wrote:
> From: Yasmin Beatriz <yasmins@linux.vnet.ibm.com>
> 
> fd_write_vmcore can fail to execute for a lot of reasons that can be
> retrieved by errno, but it only returns -1. This makes difficult for
> the caller to know what happened and only a generic error message is
> propagated back to the user. This is an example using dump-guest-memory:
> 
> (qemu) dump-guest-memory /home/yasmin/mnt/test.dump
> dump: failed to save memory
> 
...
> This is the same dump-guest-memory example with this patch applied:
> 
> (qemu) dump-guest-memory /home/yasmin/mnt/test.dump
> dump: failed to save memory: No space left on device
> (qemu)
> 
> This example illustrates an error of fd_write_vmcore when called
> from write_data. All other callers will benefit from better
> error messages as well.
> 
> Reported-by: yilzhang@redhat.com
> Cc: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
> Signed-off-by: Yasmin Beatriz <yasmins@linux.vnet.ibm.com>
> Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
> ---
>   dump.c | 23 ++++++++++++++---------
>   1 file changed, 14 insertions(+), 9 deletions(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

  parent reply	other threads:[~2018-02-12 17:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12 14:25 [Qemu-devel] [PATCH v3 0/1] dump.c: allow fd_write_vmcore to return errno on failure Daniel Henrique Barboza
2018-02-12 14:25 ` [Qemu-devel] [PATCH v3 1/1] " Daniel Henrique Barboza
2018-02-12 14:31   ` Marc-Andre Lureau
2018-02-12 14:46   ` Murilo Opsfelder Araujo
2018-02-12 15:49     ` Daniel Henrique Barboza
2018-02-12 17:31     ` Eric Blake
2018-02-12 19:19       ` Murilo Opsfelder Araujo
2018-02-12 17:47   ` Eric Blake [this message]
2018-03-21 13:29 ` [Qemu-devel] [PATCH v3 0/1] " Daniel Henrique Barboza
2018-03-21 13:56   ` [Qemu-devel] [PATCH v3 for-2.12? " Eric Blake
2018-03-21 14:20     ` Marc-André Lureau

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=0fc757fc-427d-65cf-910b-a2e611177f46@redhat.com \
    --to=eblake@redhat.com \
    --cc=danielhb@linux.vnet.ibm.com \
    --cc=joserz@linux.vnet.ibm.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yasmins@linux.vnet.ibm.com \
    /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.