]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds : move start_files_to_recover() to recovery_done 37985/head
authorSimon Gao <simon29rock@gmail.com>
Sun, 9 Aug 2020 07:38:30 +0000 (15:38 +0800)
committerVicente Cheng <freeze.bilsted@gmail.com>
Mon, 7 Dec 2020 05:41:30 +0000 (05:41 +0000)
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 <simon29rock@gmail.com>
(cherry picked from commit fafb5b4f84e12ba00a68550ffb73fc9bcde867a0)

src/mds/MDSRank.cc

index 5f7741de3aac937b53d38b4e0ace4979f308e10c..f309a6ed3fde2c8f883f641bab5f039b93edc558 100644 (file)
@@ -1953,7 +1953,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();
 }
 
@@ -2006,7 +2005,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();
 
@@ -2023,7 +2021,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