]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: output lock state in format dump 28233/head
authorZhi Zhang <willzzhang@tencent.com>
Thu, 9 May 2019 09:07:24 +0000 (17:07 +0800)
committerPrashant D <pdhange@redhat.com>
Thu, 23 May 2019 23:11:10 +0000 (19:11 -0400)
dump cache in plain text will print lock state. But in json format dump,
it won't. It is not convenient to debug some MDS lock issues without
such information.

Fixes: http://tracker.ceph.com/issues/39645
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
(cherry picked from commit 751289118eaffb4906826ead68f19c5e55c1e4fe)

src/mds/SimpleLock.cc

index c314c3068f57b8df53e682ae79740d6f152bd4da..c4c0ae0db24737b62b7c7f8b8ae3057f7a0b2a98 100644 (file)
@@ -30,6 +30,7 @@ void SimpleLock::dump(Formatter *f) const {
   }
   f->close_section();
 
+  f->dump_string("state", get_state_name(get_state()));
   f->dump_bool("is_leased", is_leased());
   f->dump_int("num_rdlocks", get_num_rdlocks());
   f->dump_int("num_wrlocks", get_num_wrlocks());