From: Patrick Donnelly Date: Mon, 22 Apr 2024 17:46:43 +0000 (-0400) Subject: client: clear resend_mds only after sending request X-Git-Tag: v19.1.1~278^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d15f3a73bb8a6b506d5c42b567600d8dd7e2362b;p=ceph.git client: clear resend_mds only after sending request The client may not be able to immediately send the request after learning the target; e.g. the target rank has no session yet or is otherwise temporarily unavailable. Fixes: https://tracker.ceph.com/issues/65614 Signed-off-by: Patrick Donnelly (cherry picked from commit 3a3227adb52624ae3a39e78921d3a17114e1b404) --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 0e7b0a34f947..e0da98bf979e 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -1692,7 +1692,6 @@ mds_rank_t Client::choose_target_mds(MetaRequest *req, Inode** phash_diri) if (req->resend_mds >= 0) { mds = req->resend_mds; - req->resend_mds = -1; ldout(cct, 10) << __func__ << " resend_mds specified as mds." << mds << dendl; goto out; } @@ -2048,6 +2047,7 @@ int Client::make_request(MetaRequest *request, // wait for signal ldout(cct, 20) << "awaiting reply|forward|kick on " << &caller_cond << dendl; + request->resend_mds = -1; /* reset for retries */ request->kick = false; std::unique_lock l{client_lock, std::adopt_lock}; caller_cond.wait(l, [request] {