]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: output lock state in format dump 27717/head
authorZhi Zhang <willzzhang@tencent.com>
Thu, 9 May 2019 09:07:24 +0000 (17:07 +0800)
committerZhi Zhang <willzzhang@tencent.com>
Thu, 9 May 2019 09:07:24 +0000 (17:07 +0800)
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>
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());