From 072b629115876ffb2abd8312afb68cf198831ebd Mon Sep 17 00:00:00 2001 From: Simon Gao Date: Sun, 9 Aug 2020 15:38:30 +0800 Subject: [PATCH] mds : move start_files_to_recover() to recovery_done the requests in the queue, named waiting_for_replay, may modify the state of the filelock, resulting in the wrong lock state when repairing file (start_files_to_recover) Fixes : https://tracker.ceph.com/issues/46906 Signed-off-by: Simon Gao (cherry picked from commit fafb5b4f84e12ba00a68550ffb73fc9bcde867a0) Conflicts: src/mds/MDSRank.cc - skip start_purge_inodes() because nautilus does not introduce it. --- src/mds/MDSRank.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index 728dd636b2371..8feaff740c7ca 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -1979,7 +1979,6 @@ void MDSRank::clientreplay_start() { dout(1) << "clientreplay_start" << dendl; finish_contexts(g_ceph_context, waiting_for_replay); // kick waiters - mdcache->start_files_to_recover(); queue_one_replay(); } @@ -2032,7 +2031,6 @@ void MDSRank::active_start() mdcache->clean_open_file_lists(); mdcache->export_remaining_imported_caps(); finish_contexts(g_ceph_context, waiting_for_replay); // kick waiters - mdcache->start_files_to_recover(); mdcache->reissue_all_caps(); @@ -2048,7 +2046,7 @@ void MDSRank::recovery_done(int oldstate) return; mdcache->start_recovered_truncates(); - mdcache->do_file_recover(); + mdcache->start_files_to_recover(); // tell connected clients //bcast_mds_map(); // not anymore, they get this from the monitor -- 2.39.5