From: haoyixing Date: Wed, 22 Oct 2025 11:24:18 +0000 (+0000) Subject: client: fix dump_mds_requests to valid json format X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=326fb6107bede3b123e2c8b1a08db123becc161e;p=ceph.git client: fix dump_mds_requests to valid json format Usually asok command output will be valid json, but mds_requests outputs duplicate key "request", which is not convenient for subsequent parsing. Fixes: http://tracker.ceph.com/issues/73639 Signed-off-by: haoyixing --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 11429b7eb35..a255a2fed64 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -2018,6 +2018,7 @@ void Client::dump_mds_sessions(Formatter *f, bool cap_dump) void Client::dump_mds_requests(Formatter *f) { + f->open_array_section("requests"); for (map::iterator p = mds_requests.begin(); p != mds_requests.end(); ++p) { @@ -2025,6 +2026,7 @@ void Client::dump_mds_requests(Formatter *f) p->second->dump(f); f->close_section(); } + f->close_section(); } int Client::verify_reply_trace(int r, MetaSession *session,