From: Patrick Donnelly Date: Mon, 1 Dec 2025 20:12:37 +0000 (-0500) Subject: mds: dump frag_t as an object X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c49ea953288413d21b4b32419cf6d521551becc5;p=ceph.git mds: dump frag_t as an object Signed-off-by: Patrick Donnelly (cherry picked from commit 1d526c50de0712a180db1b6fa39ae6f51e346c3c) Conflicts: src/mds/mdstypes.h: add dump method --- diff --git a/src/mds/mdstypes.cc b/src/mds/mdstypes.cc index e59aa5fc95b9..e66b5fe1cda3 100644 --- a/src/mds/mdstypes.cc +++ b/src/mds/mdstypes.cc @@ -753,7 +753,7 @@ void MDSCacheObjectInfo::decode(bufferlist::const_iterator& p) void MDSCacheObjectInfo::dump(Formatter *f) const { f->dump_unsigned("ino", ino); - f->dump_stream("dirfrag") << dirfrag; + f->dump_object("dirfrag", dirfrag); f->dump_string("name", dname); f->dump_unsigned("snapid", snapid); } diff --git a/src/mds/mdstypes.h b/src/mds/mdstypes.h index 649f13b7df0b..ead42242cb63 100644 --- a/src/mds/mdstypes.h +++ b/src/mds/mdstypes.h @@ -776,6 +776,11 @@ struct dirfrag_t { } } + void dump(ceph::Formatter *f) const { + f->dump_unsigned("ino", ino); + f->dump_unsigned("frag", frag); + } + void encode(ceph::buffer::list& bl) const { using ceph::encode; encode(ino, bl);