On Wed, Jan 11, 2012 at 1:58 AM, Stefan Hajnoczi <stefanha@xxxxxxxxx> wrote: > On Tue, Jan 10, 2012 at 8:01 PM, Gregory Farnum > <gregory.farnum@xxxxxxxxxxxxx> 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 Oh yep, guess I was a little too formulaic. Resend in a moment... On Wed, Jan 11, 2012 at 2:00 AM, Christoph Hellwig <hch@xxxxxxxxxxxxx> 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); > >> + r = rbd_snap_rollback(s->image, snapshot_name); > > Have these functions been available since day 1 in librbd or should they > get a version checks like the cache flush call? Day 1. :) -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html