]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: assertion failure race condition if watch disconnected 5243/head
authorJason Dillaman <dillaman@redhat.com>
Fri, 26 Jun 2015 13:59:36 +0000 (09:59 -0400)
committerAbhishek Lekshmanan <abhishek.lekshmanan@ril.com>
Tue, 14 Jul 2015 14:16:42 +0000 (19:46 +0530)
It's possible for librbd's watch of the header object to be reset by
connection issues just prior to the image being removed.  This will
causes an assertion failure which assumes at least one watcher on the
image.

Fixes: #12176
Backport: hammer, firefly
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit af276de4f299960e43761904c043924cec5fef11)

src/librbd/internal.cc

index fbec53de27b40dddc98cef75ceebd744e85a7088..15ea41662d4b9a4a8fd179c600b90de881691974 100644 (file)
@@ -1620,7 +1620,6 @@ reprotect_and_return_err:
         close_image(ictx);
         return -EBUSY;
       }
-      assert(watchers.size() == 1);
 
       ictx->md_lock.get_read();
       trim_image(ictx, 0, prog_ctx);