From: Josh Durgin Date: Sun, 31 Mar 2013 00:28:35 +0000 (-0700) Subject: librbd: return -ENOENT from diff_iterate when the snap doesn't exist X-Git-Tag: v0.62~118^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=33d1a2fc8809cc8aec42cd4c5330c9a27f0f32f8;p=ceph.git librbd: return -ENOENT from diff_iterate when the snap doesn't exist This is a bit more helpful than -EINVAL. Signed-off-by: Josh Durgin --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 49573966f8b..939a485587b 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -2315,7 +2315,7 @@ reprotect_and_return_err: ictx->snap_lock.put_read(); ictx->md_lock.put_read(); if (from_snap_id == CEPH_NOSNAP) { - return -EINVAL; + return -ENOENT; } if (from_snap_id == end_snap_id) { // no diff.