]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: print all SimpleLock flags in debug output
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 27 Feb 2024 20:18:21 +0000 (15:18 -0500)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 20 Mar 2024 14:56:54 +0000 (10:56 -0400)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/SimpleLock.cc

index 70d277bd10c0f9750151fea059be911622e36fb2..da266e30dab74c642b71695415cc95d4b55422e9 100644 (file)
@@ -115,8 +115,18 @@ void SimpleLock::_print(std::ostream& out) const
   out << get_state_name(get_state());
   if (!get_gather_set().empty())
     out << " g=" << get_gather_set();
-  if (is_leased())
-    out << " l";
+  {
+    std::string flags;
+    if (is_leased())
+      flags += "l";
+    if (is_cached())
+      flags += "c";
+    if (needs_recover())
+      flags += "r";
+    if (!flags.empty()) {
+      out << " " << flags;
+    }
+  }
   if (is_rdlocked())
     out << " r=" << get_num_rdlocks();
   if (is_wrlocked())