]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librbd: clear pending flush contexts on shut down
authorJason Dillaman <dillaman@redhat.com>
Fri, 29 May 2020 13:22:26 +0000 (09:22 -0400)
committerJason Dillaman <dillaman@redhat.com>
Wed, 3 Jun 2020 13:45:24 +0000 (09:45 -0400)
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 <dillaman@redhat.com>
src/librbd/io/FlushTracker.cc

index 0a0e1027e796e64fc395397b2e84f7f2e54cf3ba..b6e2ed658f85439a2414e9f1d6c863831e2b7371 100644 (file)
@@ -37,6 +37,7 @@ void FlushTracker<I>::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) {