Skip to content

Commit

Permalink
librbd: assertion failure race condition if watch disconnected
Browse files Browse the repository at this point in the history
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 af276de)
  • Loading branch information
Jason Dillaman authored and theanalyst committed Jul 14, 2015
1 parent 9a79e8e commit 03c07d7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/librbd/internal.cc
Expand Up @@ -1620,7 +1620,6 @@ int invoke_async_request(ImageCtx *ictx, const std::string& request_type,
close_image(ictx);
return -EBUSY;
}
assert(watchers.size() == 1);

ictx->md_lock.get_read();
trim_image(ictx, 0, prog_ctx);
Expand Down

0 comments on commit 03c07d7

Please sign in to comment.