]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds : move start_files_to_recover() to recovery_done 36532/head
authorSimon Gao <simon29rock@gmail.com>
Sun, 9 Aug 2020 07:38:30 +0000 (15:38 +0800)
committerSimon Gao <simon29rock@gmail.com>
Thu, 13 Aug 2020 01:51:45 +0000 (09:51 +0800)
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>
src/mds/MDSRank.cc

index 5847dc10a3312894fe9708fa3f7684d391c37f10..6b3f8f30a0f97cd00171fbfa090392dc829706b2 100644 (file)
@@ -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