]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: skip reopening the opened or is under opening sessions
authorXiubo Li <xiubli@redhat.com>
Wed, 9 Mar 2022 08:07:50 +0000 (16:07 +0800)
committerXiubo Li <xiubli@redhat.com>
Mon, 18 Apr 2022 02:17:10 +0000 (10:17 +0800)
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/client/Client.cc

index 9651509686d031464e829e9b35d8681aeadcaf4f..24fad1256d3f7dbe9e02abbb0515498de71533ea 100644 (file)
@@ -1729,6 +1729,12 @@ void Client::connect_mds_targets(mds_rank_t mds)
        mdsmap->is_clientreplay_or_active_or_stopping(rank)) {
       ldout(cct, 10) << "check_mds_sessions opening mds." << mds
                     << " export target mds." << rank << dendl;
+
+      auto session = _get_or_open_mds_session(rank);
+      if (session->state == MetaSession::STATE_OPENING ||
+          session->state == MetaSession::STATE_OPEN)
+        continue;
+
       _open_mds_session(rank);
     }
   }