From 3223bd604117b0b302b1e3e235ff9bced8e986bc Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Fri, 26 Jun 2015 09:59:36 -0400 Subject: [PATCH] librbd: assertion failure race condition if watch disconnected 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 (cherry picked from commit af276de4f299960e43761904c043924cec5fef11) --- src/librbd/internal.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 1456012460aee..c174e5bc43457 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -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); -- 2.39.5