]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix possible inifinite loop when getting an ESTALE from MDS 44234/head
authorXiubo Li <xiubli@redhat.com>
Tue, 7 Dec 2021 03:36:23 +0000 (11:36 +0800)
committerXiubo Li <xiubli@redhat.com>
Sat, 2 Apr 2022 00:50:28 +0000 (08:50 +0800)
In the MDS side, when one inode is under purging or couldn't find
in all the peer MDSes, it will return ESTALE error. So retrying it
makes no sense in any other MDS. Or the client will be inifinite
loop retrying.

Fixes: https://tracker.ceph.com/issues/53504
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/client/Client.cc

index 988a62e66d633b12e1c41df7a6ddce68bf6babc3..617778a44f3a56648484604c4f9634be1c6c72c8 100644 (file)
@@ -2598,25 +2598,6 @@ void Client::handle_client_reply(const MConstRef<MClientReply>& reply)
     return;
   }
 
-  if (-CEPHFS_ESTALE == reply->get_result()) { // see if we can get to proper MDS
-    ldout(cct, 20) << "got ESTALE on tid " << request->tid
-                  << " from mds." << request->mds << dendl;
-    request->send_to_auth = true;
-    request->resend_mds = choose_target_mds(request);
-    Inode *in = request->inode();
-    std::map<mds_rank_t, Cap>::const_iterator it;
-    if (request->resend_mds >= 0 &&
-       request->resend_mds == request->mds &&
-       (in == NULL ||
-         (it = in->caps.find(request->resend_mds)) != in->caps.end() ||
-         request->sent_on_mseq == it->second.mseq)) {
-      ldout(cct, 20) << "have to return ESTALE" << dendl;
-    } else {
-      request->caller_cond->notify_all();
-      return;
-    }
-  }
-  
   ceph_assert(!request->reply);
   request->reply = reply;
   insert_trace(request, session.get());