From 9df7e39ddf2fc8fa373155d3ed7d03115e202365 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Fri, 14 Aug 2015 16:23:13 -0400 Subject: [PATCH] librbd: drain op work queue after shutting down journal Signed-off-by: Jason Dillaman --- src/librbd/internal.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index e296068d0011e..59dce0a6e99eb 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -2846,8 +2846,6 @@ int invoke_async_request(ImageCtx *ictx, const std::string& request_type, } } - ictx->op_work_queue->drain(); - if (ictx->copyup_finisher != NULL) { ictx->copyup_finisher->wait_for_empty(); ictx->copyup_finisher->stop(); @@ -2860,6 +2858,8 @@ int invoke_async_request(ImageCtx *ictx, const std::string& request_type, } } + ictx->op_work_queue->drain(); + if (ictx->parent) { RWLock::WLocker parent_locker(ictx->parent_lock); int close_r = close_parent(ictx); -- 2.39.5