Skip to content

Commit 326fb61

Browse files
author
haoyixing
committed
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 <[email protected]>
1 parent 7cc2a30 commit 326fb61

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/client/Client.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,13 +2018,15 @@ void Client::dump_mds_sessions(Formatter *f, bool cap_dump)
20182018

20192019
void Client::dump_mds_requests(Formatter *f)
20202020
{
2021+
f->open_array_section("requests");
20212022
for (map<ceph_tid_t, MetaRequest*>::iterator p = mds_requests.begin();
20222023
p != mds_requests.end();
20232024
++p) {
20242025
f->open_object_section("request");
20252026
p->second->dump(f);
20262027
f->close_section();
20272028
}
2029+
f->close_section();
20282030
}
20292031

20302032
int Client::verify_reply_trace(int r, MetaSession *session,

0 commit comments

Comments
 (0)