From: Kevin Wolf <kwolf@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: qemu-block@nongnu.org, qemu-trivial@nongnu.org,
Jeff Cody <jcody@redhat.com>,
qemu-devel@nongnu.org, mitake.hitoshi@lab.ntt.co.jp,
namei.unix@gmail.com
Subject: Re: [Qemu-devel] [PATCH] sheepdog: Fix error message if failed to load vmstate
Date: Tue, 2 Jun 2015 11:45:31 +0200 [thread overview]
Message-ID: <20150602094531.GH3765@noname.str.redhat.com> (raw)
In-Reply-To: <1433237561-10846-1-git-send-email-famz@redhat.com>
[ CC to Sheepdog maintainers ]
Am 02.06.2015 um 11:32 hat Fam Zheng geschrieben:
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> block/sheepdog.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/block/sheepdog.c b/block/sheepdog.c
> index bd7cbed..a22f838 100644
> --- a/block/sheepdog.c
> +++ b/block/sheepdog.c
> @@ -2556,7 +2556,11 @@ static int do_load_save_vmstate(BDRVSheepdogState *s, uint8_t *data,
> }
>
> if (ret < 0) {
> - error_report("failed to save vmstate %s", strerror(errno));
> + if (load) {
> + error_report("failed to load vmstate %s", strerror(errno));
> + } else {
> + error_report("failed to save vmstate %s", strerror(errno));
> + }
> goto cleanup;
> }
Why do we even print this message? We usually don't do this for a failed
request, and much less so if we don't actually add any information that
isn't covered by the return code. qemu_savevm_state() will already set
an error that is even visible in QMP.
In fact, errno doesn't even contain anything relevant here, or in most
(all?) other places that it's used in the sheepdog block driver.
I think we might be better off just removing the message.
Kevin
next prev parent reply other threads:[~2015-06-02 9:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 9:32 [Qemu-devel] [PATCH] sheepdog: Fix error message if failed to load vmstate Fam Zheng
2015-06-02 9:45 ` Kevin Wolf [this message]
2015-06-02 10:22 ` Fam Zheng
2015-06-02 10:16 ` Michael Tokarev
2015-06-02 10:26 ` Fam Zheng
2015-06-02 19:16 ` [Qemu-devel] [Qemu-block] " John Snow
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=20150602094531.GH3765@noname.str.redhat.com \
--to=kwolf@redhat.com \
--cc=famz@redhat.com \
--cc=jcody@redhat.com \
--cc=mitake.hitoshi@lab.ntt.co.jp \
--cc=namei.unix@gmail.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).