From a138a435192c9d4be9c059aad892f39cc9c445cd Mon Sep 17 00:00:00 2001 From: Zhansong Gao Date: Fri, 16 Jun 2023 12:30:40 +0800 Subject: [PATCH] mds: the assert should be before the journal entry submit otherwise it's racy Signed-off-by: Zhansong Gao (cherry picked from commit 11a4303d66fa0355c890a478b33ccc90ee68f6d3) --- src/mds/Migrator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 8bd875c3450e..bf726d169d27 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -1922,10 +1922,10 @@ void Migrator::handle_export_ack(const cref_t &m) // this keeps authority().first in sync with subtree auth state in the journal. mdcache->adjust_subtree_auth(dir, it->second.peer, mds->get_nodeid()); + ceph_assert(g_conf()->mds_kill_export_at != 10); // log export completion, then finish (unfreeze, trigger finish context, etc.) mds->mdlog->submit_entry(le, new C_MDS_ExportFinishLogged(this, dir)); mds->mdlog->flush(); - ceph_assert(g_conf()->mds_kill_export_at != 10); } void Migrator::export_notify_abort(CDir *dir, export_state_t& stat, set& bounds) -- 2.47.3