From: Patrick Donnelly Date: Wed, 24 Jan 2024 02:27:18 +0000 (-0500) Subject: mds: add request result to mutation for analysis by tests X-Git-Tag: v20.0.0~2328^2~55 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d1765e621611fef5517c2f2227d7786ae41e2001;p=ceph.git mds: add request result to mutation for analysis by tests Signed-off-by: Patrick Donnelly --- diff --git a/src/mds/Mutation.cc b/src/mds/Mutation.cc index b52e04a63936e..9b71e244e08a4 100644 --- a/src/mds/Mutation.cc +++ b/src/mds/Mutation.cc @@ -472,6 +472,7 @@ void MDRequestImpl::print(ostream &out) const void MDRequestImpl::_dump(Formatter *f, bool has_mds_lock) const { std::lock_guard l(lock); + f->dump_int("result", result); f->dump_string("flag_point", _get_state_string()); f->dump_object("reqid", reqid); if (client_request) { diff --git a/src/mds/Mutation.h b/src/mds/Mutation.h index 18266c447c313..1a308c423f51b 100644 --- a/src/mds/Mutation.h +++ b/src/mds/Mutation.h @@ -15,6 +15,8 @@ #ifndef CEPH_MDS_MUTATION_H #define CEPH_MDS_MUTATION_H +#include + #include "include/interval_set.h" #include "include/elist.h" #include "include/filepath.h" @@ -227,6 +229,7 @@ public: void _dump_op_descriptor(std::ostream& stream) const override; metareqid_t reqid; + int result = std::numeric_limits::min(); __u32 attempt = 0; // which attempt for this request LogSegment *ls = nullptr; // the log segment i'm committing to diff --git a/src/mds/Server.cc b/src/mds/Server.cc index ed42ac439d82a..598452c32fd42 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -2073,6 +2073,7 @@ void Server::submit_mdlog_entry(LogEvent *le, MDSLogContextBase *fin, const MDRe */ void Server::respond_to_request(const MDRequestRef& mdr, int r) { + mdr->result = r; if (mdr->client_request) { if (mdr->is_batch_head()) { dout(20) << __func__ << " batch head " << *mdr << dendl;