From: Stefan Hajnoczi <stefanha@gmail.com>
To: Gregory Farnum <gregory.farnum@dreamhost.com>
Cc: ceph-devel@vger.kernel.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH]: set up rbd snapshot handling
Date: Wed, 11 Jan 2012 09:58:20 +0000 [thread overview]
Message-ID: <CAJSP0QXt5ZxOfh_xXPgx+Cg0xdL=DZTxcdS72F770DFRgF=t2w@mail.gmail.com> (raw)
In-Reply-To: <CAF3hT9Cu0BZQfrgCpBRRaPHyfSy3V-A=jJLe3qGr4UoFMcniOQ@mail.gmail.com>
On Tue, Jan 10, 2012 at 8:01 PM, Gregory Farnum
<gregory.farnum@dreamhost.com> wrote:
> +static int qemu_rbd_snap_remove(BlockDriverState *bs,
> + const char *snapshot_name)
> +{
> + BDRVRBDState *s = bs->opaque;
> + int r;
> +
> + r = rbd_snap_remove(s->image, snapshot_name);
> + if (r < 0) {
> + error_report("failed to remove snap: %s", strerror(-r));
> + return r;
There's no need to report an error message here. This function should
return -errno and let the caller decide how to show the error to the
user. If you look at callers in the codebase they already print an
equivalent error message.
Stefan
next prev parent reply other threads:[~2012-01-11 9:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-10 20:01 [Qemu-devel] [PATCH]: set up rbd snapshot handling Gregory Farnum
2012-01-11 9:58 ` Stefan Hajnoczi [this message]
2012-01-11 10:00 ` Christoph Hellwig
2012-01-11 19:48 ` Gregory Farnum
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='CAJSP0QXt5ZxOfh_xXPgx+Cg0xdL=DZTxcdS72F770DFRgF=t2w@mail.gmail.com' \
--to=stefanha@gmail.com \
--cc=ceph-devel@vger.kernel.org \
--cc=gregory.farnum@dreamhost.com \
--cc=qemu-devel@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).