]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds : move start_files_to_recover() to recovery_done 37986/head
authorSimon Gao <simon29rock@gmail.com>
Sun, 9 Aug 2020 07:38:30 +0000 (15:38 +0800)
committerVicente Cheng <freeze.bilsted@gmail.com>
Mon, 9 Nov 2020 08:09:51 +0000 (08:09 +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)

Conflicts:
src/mds/MDSRank.cc
  - skip start_purge_inodes() because nautilus does not
    introduce it.

src/mds/MDSRank.cc

index 728dd636b23713f71a371f29c0b4d2db027218d7..8feaff740c7ca30a0203043cf01f60056ce18300 100644 (file)
@@ -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