]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librbd: properly handle group snap add failure case
authorJason Dillaman <dillaman@redhat.com>
Wed, 17 Jan 2018 18:43:58 +0000 (13:43 -0500)
committerJason Dillaman <dillaman@redhat.com>
Fri, 26 Jan 2018 15:32:40 +0000 (10:32 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/api/Group.cc

index 71a9cd348d7661550f53b1bde2ffb3b00d0658ee..4c8699ac12c2d780f26f0f91429f0c34a4faa19d 100644 (file)
@@ -862,8 +862,11 @@ remove_image_snaps:
     ictx->snap_lock.put_read();
     if (r >= 0) {
       ictx->operations->snap_remove(ne, snap_name.c_str(), on_finishes[i]);
+    } else {
+      // Ignore missing image snapshots. The whole snapshot could have been
+      // inconsistent.
+      on_finishes[i]->complete(0);
     }
-    // Ignore missing image snapshots. The whole snapshot could have been inconsistent.
   }
 
   for (int i = 0, n = on_finishes.size(); i < n; ++i) {