]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: return -ENOENT from diff_iterate when the snap doesn't exist
authorJosh Durgin <josh.durgin@inktank.com>
Sun, 31 Mar 2013 00:28:35 +0000 (17:28 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 1 Apr 2013 15:56:07 +0000 (08:56 -0700)
This is a bit more helpful than -EINVAL.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/librbd/internal.cc

index 49573966f8ba341f2ea4a18d25cb45272367da96..939a485587bb1a5274f65ddcb6146224de25b3ed 100644 (file)
@@ -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.