]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: assertion failure race condition if watch disconnected 5171/head
authorJason Dillaman <dillaman@redhat.com>
Fri, 26 Jun 2015 13:59:36 +0000 (09:59 -0400)
committerNathan Cutler <ncutler@suse.com>
Wed, 8 Jul 2015 14:32:13 +0000 (16:32 +0200)
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 1456012460aee2c50ac4b1a53169bc3b23a9c42f..c174e5bc43457cb858af4a1e1b26f725627e1a89 100644 (file)
@@ -1420,7 +1420,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);