summaryrefslogtreecommitdiffstats
path: root/src/mds/Capability.cc
diff options
context:
space:
mode:
authorPatrick Donnelly <pdonnell@redhat.com>2020-09-06 17:54:38 +0200
committerPatrick Donnelly <pdonnell@redhat.com>2020-09-06 17:54:38 +0200
commitc0d5d348e549f780f27813dc20b6be2cd82c3e77 (patch)
tree7368eb9d17e5c596d05635727807da57b20c6068 /src/mds/Capability.cc
parentMerge pull request #36924 from ddiss/sigabbrev_np (diff)
parentmds: make caps dump more readable (diff)
downloadceph-c0d5d348e549f780f27813dc20b6be2cd82c3e77.tar.xz
ceph-c0d5d348e549f780f27813dc20b6be2cd82c3e77.zip
Merge PR #36600 into master
* refs/pull/36600/head: mds: make caps dump more readable Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Zheng Yan <zyan@redhat.com>
Diffstat (limited to 'src/mds/Capability.cc')
-rw-r--r--src/mds/Capability.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mds/Capability.cc b/src/mds/Capability.cc
index 8a6afe3cbdd..b6258e466df 100644
--- a/src/mds/Capability.cc
+++ b/src/mds/Capability.cc
@@ -57,9 +57,9 @@ void Capability::Export::decode(ceph::buffer::list::const_iterator &p)
void Capability::Export::dump(ceph::Formatter *f) const
{
f->dump_unsigned("cap_id", cap_id);
- f->dump_unsigned("wanted", wanted);
- f->dump_unsigned("issued", issued);
- f->dump_unsigned("pending", pending);
+ f->dump_stream("wanted") << ccap_string(wanted);
+ f->dump_stream("issued") << ccap_string(issued);
+ f->dump_stream("pending") << ccap_string(pending);
f->dump_unsigned("client_follows", client_follows);
f->dump_unsigned("seq", seq);
f->dump_unsigned("migrate_seq", mseq);
@@ -254,10 +254,12 @@ void Capability::decode(ceph::buffer::list::const_iterator &bl)
void Capability::dump(ceph::Formatter *f) const
{
+ if (inode)
+ f->dump_stream("ino") << inode->ino();
f->dump_unsigned("last_sent", last_sent);
- f->dump_unsigned("last_issue_stamp", last_issue_stamp);
- f->dump_unsigned("wanted", _wanted);
- f->dump_unsigned("pending", _pending);
+ f->dump_stream("last_issue_stamp") << last_issue_stamp;
+ f->dump_stream("wanted") << ccap_string(_wanted);
+ f->dump_stream("pending") << ccap_string(_pending);
f->open_array_section("revokes");
for (const auto &r : _revokes) {