From: Jason Dillaman Date: Fri, 21 Aug 2020 14:36:55 +0000 (-0400) Subject: librbd: reset collection state after move operation X-Git-Tag: v16.1.0~1350^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1f28e5ffed9ca21fe520beb8ac19552ee3bd8885;p=ceph.git librbd: reset collection state after move operation A technical requirement of move operations requires that the collection be reset to a known state before being used again. Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/Journal.cc b/src/librbd/Journal.cc index 11158366be50..c38a5d82288e 100644 --- a/src/librbd/Journal.cc +++ b/src/librbd/Journal.cc @@ -1600,7 +1600,9 @@ void Journal::transition_state(State state, int r) { } if (is_steady_state()) { - Contexts wait_for_state_contexts(std::move(m_wait_for_state_contexts)); + auto wait_for_state_contexts(std::move(m_wait_for_state_contexts)); + m_wait_for_state_contexts.clear(); + for (auto ctx : wait_for_state_contexts) { ctx->complete(m_error_result); }