From: Xiubo Li Date: Thu, 13 Jan 2022 04:03:39 +0000 (+0800) Subject: client: do nothing when get a stale reply X-Git-Tag: v18.0.0~704^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F44567%2Fhead;p=ceph.git client: do nothing when get a stale reply In theory when we get a stale reply from incorrect session, that means it's buggy in MDS. Anyway we should discard it without doing anything. Signed-off-by: Xiubo Li --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 471ce3f8e3d3..571b9fcb913f 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -2665,6 +2665,13 @@ void Client::handle_client_reply(const MConstRef& reply) ldout(cct, 20) << __func__ << " got a reply. Safe:" << is_safe << " tid " << tid << dendl; + // correct sessions ? + if (request->mds != mds_num) { + ldout(cct, 0) << "got a stale reply from mds." << mds_num + << " instead of mds." << request->mds << dendl; + return; + } + if (request->got_unsafe && !is_safe) { //duplicate response ldout(cct, 0) << "got a duplicate reply on tid " << tid << " from mds "