From: joserz@linux.vnet.ibm.com
To: Eric Blake <eblake@redhat.com>
Cc: "Yasmin Beatriz" <yasmins@linux.vnet.ibm.com>,
qemu-devel@nongnu.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
qemu-trivial@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH v2] dump: Show custom message for ENOSPC
Date: Fri, 9 Feb 2018 19:36:31 -0200 [thread overview]
Message-ID: <20180209213631.GA23661@pacoca> (raw)
In-Reply-To: <baf09d46-934f-1f82-1f68-21ae22ffd2f9@redhat.com>
On Fri, Feb 09, 2018 at 02:57:33PM -0600, Eric Blake wrote:
> On 02/09/2018 02:26 PM, Yasmin Beatriz wrote:
> > This patch intends to make a more specific message for when
> > the system has not enough space to save guest memory.
> >
> > Reported-by: yilzhang@redhat.com
> > Cc: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
> > Signed-off-by: Yasmin Beatriz <yasmins@linux.vnet.ibm.com>
> > ---
>
> > @@ -364,7 +364,11 @@ static void write_data(DumpState *s, void *buf, int length, Error **errp)
> > ret = fd_write_vmcore(buf, length, s);
> > if (ret < 0) {
> > - error_setg(errp, "dump: failed to save memory");
> > + if (ret == -ENOSPC) {
> > + error_setg(errp, "dump: not enough space to save memory");
> > + } else {
> > + error_setg(errp, "dump: failed to save memory");
> > + }
>
> Why is this caller the only one in the file that gets distinguished error
> messages? And why not use error_setg_errno() instead of open-coding just
> one special errno value? If you're changing the return value of
> fd_write_vmcore() anyways, I'd suggest that ALL callers in the file be
> updated to use error_setg_errno().
Hello Eric, thanks for reviewing it! :)
Yes, only this part has this distiguished error handling because
the whole big amount of data is managed in here, as far as we can tell
it.
It's triggered when you have one of those huge memory guests that
crashes and want to dump its memory into a host that can't offer all
these requirements. AFAIK, other callers doesn't handle so much data,
so we decided to handle only in this part to be the less intrusive
possible.
Your suggestions will be applied then!
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
>
WARNING: multiple messages have this Message-ID (diff)
From: joserz@linux.vnet.ibm.com
To: Eric Blake <eblake@redhat.com>
Cc: "Yasmin Beatriz" <yasmins@linux.vnet.ibm.com>,
qemu-devel@nongnu.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] dump: Show custom message for ENOSPC
Date: Fri, 9 Feb 2018 19:36:31 -0200 [thread overview]
Message-ID: <20180209213631.GA23661@pacoca> (raw)
In-Reply-To: <baf09d46-934f-1f82-1f68-21ae22ffd2f9@redhat.com>
On Fri, Feb 09, 2018 at 02:57:33PM -0600, Eric Blake wrote:
> On 02/09/2018 02:26 PM, Yasmin Beatriz wrote:
> > This patch intends to make a more specific message for when
> > the system has not enough space to save guest memory.
> >
> > Reported-by: yilzhang@redhat.com
> > Cc: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
> > Signed-off-by: Yasmin Beatriz <yasmins@linux.vnet.ibm.com>
> > ---
>
> > @@ -364,7 +364,11 @@ static void write_data(DumpState *s, void *buf, int length, Error **errp)
> > ret = fd_write_vmcore(buf, length, s);
> > if (ret < 0) {
> > - error_setg(errp, "dump: failed to save memory");
> > + if (ret == -ENOSPC) {
> > + error_setg(errp, "dump: not enough space to save memory");
> > + } else {
> > + error_setg(errp, "dump: failed to save memory");
> > + }
>
> Why is this caller the only one in the file that gets distinguished error
> messages? And why not use error_setg_errno() instead of open-coding just
> one special errno value? If you're changing the return value of
> fd_write_vmcore() anyways, I'd suggest that ALL callers in the file be
> updated to use error_setg_errno().
Hello Eric, thanks for reviewing it! :)
Yes, only this part has this distiguished error handling because
the whole big amount of data is managed in here, as far as we can tell
it.
It's triggered when you have one of those huge memory guests that
crashes and want to dump its memory into a host that can't offer all
these requirements. AFAIK, other callers doesn't handle so much data,
so we decided to handle only in this part to be the less intrusive
possible.
Your suggestions will be applied then!
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
>
next prev parent reply other threads:[~2018-02-09 21:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-09 20:26 [Qemu-trivial] [PATCH v2] dump: Show custom message for ENOSPC Yasmin Beatriz
2018-02-09 20:26 ` [Qemu-devel] " Yasmin Beatriz
2018-02-09 20:32 ` [Qemu-trivial] " Daniel Henrique Barboza
2018-02-09 20:32 ` Daniel Henrique Barboza
2018-02-09 20:57 ` [Qemu-trivial] " Eric Blake
2018-02-09 20:57 ` Eric Blake
2018-02-09 21:36 ` joserz [this message]
2018-02-09 21:36 ` joserz
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=20180209213631.GA23661@pacoca \
--to=joserz@linux.vnet.ibm.com \
--cc=eblake@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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.