From: Patrick Donnelly Date: Tue, 18 Feb 2025 19:35:16 +0000 (-0500) Subject: client: skip unexpected command replies X-Git-Tag: v20.0.0^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=616fdd1ae394195a2628fef6f6808e035b71069d;p=ceph.git client: skip unexpected command replies Instead of marking the message as handled, give another component (or Client) a chance to process. Signed-off-by: Patrick Donnelly --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 51298d90a59a2..374918a5c2904 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -3131,8 +3131,11 @@ Dispatcher::dispatch_result_t Client::ms_dispatch2(const MessageRef &m) break; case MSG_COMMAND_REPLY: if (m->get_source().type() == CEPH_ENTITY_TYPE_MDS) { - handle_command_reply(ref_cast(m)); - return Dispatcher::HANDLED(); + if (handle_command_reply(ref_cast(m))) { + return Dispatcher::HANDLED(); + } else { + return Dispatcher::UNHANDLED(); + } } else { return Dispatcher::UNHANDLED(); } @@ -6686,7 +6689,7 @@ int Client::mds_command( return 0; } -void Client::handle_command_reply(const MConstRef& m) +bool Client::handle_command_reply(const MConstRef& m) { ceph_tid_t const tid = m->get_tid(); @@ -6695,7 +6698,7 @@ void Client::handle_command_reply(const MConstRef& m) std::scoped_lock cmd_lock(command_lock); if (!command_table.exists(tid)) { ldout(cct, 1) << __func__ << ": unknown tid " << tid << ", dropping" << dendl; - return; + return false; } auto &op = command_table.get_command(tid); @@ -6736,6 +6739,7 @@ void Client::handle_command_reply(const MConstRef& m) } command_table.erase(tid); + return true; } // ------------------- diff --git a/src/client/Client.h b/src/client/Client.h index ac600f434b28b..3fd3e9201e4b5 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -983,7 +983,7 @@ protected: void set_cap_epoch_barrier(epoch_t e); - void handle_command_reply(const MConstRef& m); + bool handle_command_reply(const MConstRef& m); int fetch_fsmap(bool user); int resolve_mds( const std::string &mds_spec,