From: Jason Dillaman Date: Fri, 29 May 2020 13:22:26 +0000 (-0400) Subject: librbd: clear pending flush contexts on shut down X-Git-Tag: v16.1.0~2152^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F35310%2Fhead;p=ceph.git librbd: clear pending flush contexts on shut down The IOs are already dispatched but are not cleared from the container. This can result in an assertion failure in the destructor. Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/io/FlushTracker.cc b/src/librbd/io/FlushTracker.cc index 0a0e1027e796..b6e2ed658f85 100644 --- a/src/librbd/io/FlushTracker.cc +++ b/src/librbd/io/FlushTracker.cc @@ -37,6 +37,7 @@ void FlushTracker::shut_down() { for (auto& [flush_tid, ctxs] : m_flush_contexts) { flush_ctxs.insert(flush_ctxs.end(), ctxs.begin(), ctxs.end()); } + m_flush_contexts.clear(); locker.unlock(); for (auto ctx : flush_ctxs) {