]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: finish clientreplay requests before requesting active state 13112/head
authorYan, Zheng <zyan@redhat.com>
Tue, 10 Jan 2017 03:16:47 +0000 (11:16 +0800)
committerJohn Spray <john.spray@redhat.com>
Wed, 25 Jan 2017 23:18:55 +0000 (23:18 +0000)
All clientreplay requests' finish contexts should be executed
before MDCache::export_remaining_imported_caps(). Otherwise
MDCache::try_reconnect_cap() may fail to reconnect client caps.

Fixes: http://tracker.ceph.com/issues/18461
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit 80dae314ee90e79d60e2cfee301e43a435c10801)

src/mds/MDSRank.cc

index 7a51ed02ad0a4cf2afa1e53535446a34988775a4..8155b235b83e33a7f2b66d4b7490a03392014d57 100644 (file)
@@ -1253,7 +1253,7 @@ void MDSRank::clientreplay_start()
 bool MDSRank::queue_one_replay()
 {
   if (replay_queue.empty()) {
-    clientreplay_done();
+    mdlog->wait_for_safe(new C_MDS_VoidFn(this, &MDSRank::clientreplay_done));
     return false;
   }
   queue_waiter(replay_queue.front());