From: haoyixing Date: Wed, 22 Oct 2025 11:24:18 +0000 (+0000) Subject: client: fix dump_mds_requests to valid json format X-Git-Tag: testing/wip-jcollin-testing-20260217.024944-squid~3^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ffdb24d0015f07a7aa9c6e727a536e706d2d1e5d;p=ceph-ci.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 (cherry picked from commit 326fb6107bede3b123e2c8b1a08db123becc161e) --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 56a07af9577..827f869db72 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -1977,6 +1977,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) { @@ -1984,6 +1985,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,