[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH]: set up rbd snapshot handling
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH]: set up rbd snapshot handling |
Date: |
Wed, 11 Jan 2012 09:58:20 +0000 |
On Tue, Jan 10, 2012 at 8:01 PM, Gregory Farnum
<address@hidden> 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