]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: the assert should be before the journal entry submit otherwise it's racy
authorZhansong Gao <zhsgao@hotmail.com>
Fri, 16 Jun 2023 04:30:40 +0000 (12:30 +0800)
committerMilind Changire <mchangir@redhat.com>
Sat, 25 Jan 2025 01:46:43 +0000 (07:16 +0530)
Signed-off-by: Zhansong Gao <zhsgao@hotmail.com>
(cherry picked from commit 11a4303d66fa0355c890a478b33ccc90ee68f6d3)

src/mds/Migrator.cc

index 8bd875c3450ef89c4ad7d948bf3c27a2efc570fc..bf726d169d27d68ea449902ccef73e876ebcd4f8 100644 (file)
@@ -1922,10 +1922,10 @@ void Migrator::handle_export_ack(const cref_t<MExportDirAck> &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<CDir*>& bounds)