From: Simon Gao Date: Sun, 9 Aug 2020 07:38:30 +0000 (+0800) Subject: mds : move start_files_to_recover() to recovery_done X-Git-Tag: v16.1.0~1442^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fafb5b4f84e12ba00a68550ffb73fc9bcde867a0;p=ceph.git 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 --- diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index 5847dc10a331..6b3f8f30a0f9 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -1991,7 +1991,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(); } @@ -2057,7 +2056,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(); @@ -2074,7 +2072,7 @@ void MDSRank::recovery_done(int oldstate) mdcache->start_recovered_truncates(); mdcache->start_purge_inodes(); - mdcache->do_file_recover(); + mdcache->start_files_to_recover(); // tell connected clients //bcast_mds_map(); // not anymore, they get this from the monitor