mds: the assert should be before the journal entry submit otherwise it's racy

Signed-off-by: Zhansong Gao <zhsgao@hotmail.com>
This commit is contained in:
Zhansong Gao 2023-06-16 12:30:40 +08:00
parent 79a33025d5
commit 11a4303d66
1 changed files with 1 additions and 1 deletions

View File

@ -1957,10 +1957,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)