]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: indicate whether SnapRealm is a subvolume in dump
authorPatrick Donnelly <pdonnell@ibm.com>
Thu, 29 Jan 2026 15:45:27 +0000 (10:45 -0500)
committerPatrick Donnelly <pdonnell@ibm.com>
Thu, 29 Jan 2026 17:09:48 +0000 (12:09 -0500)
And clean up this code some.

Now looks like:

    2026-01-29T12:05:52.607-0500 7defd1a64640 10 mds.0.server set_trace_dist snaprealm snaprealm(0x10000000002 seq 1 lc 0 cr 1 cps 2 snaps={} subvol last_modified 0.000000 change_attr 0 is_snapdir_visible 1 0x5c1a558a66c0) len=148

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Fixes: https://tracker.ceph.com/issues/74652
src/mds/SnapRealm.cc

index 5e18fe6c8e740de7b1c552bca47ded38383ee59e..6eed30da6d93318de563fbd53d8d9e43798accb0 100644 (file)
@@ -56,12 +56,16 @@ ostream& operator<<(ostream& out, const SnapRealm& realm)
     out << " past_parent_snaps=" << realm.srnode.past_parent_snaps;
   }
 
-  if (realm.srnode.is_parent_global())
-    out << " global ";
+  if (realm.srnode.is_parent_global()) {
+    out << " global";
+  }
+  if (realm.srnode.is_subvolume()) {
+    out << " subvol";
+  }
   out << " last_modified " << realm.srnode.last_modified
       << " change_attr " << realm.srnode.change_attr
-      << " is_snapdir_visible " << realm.srnode.is_snapdir_visible();
-  out << " " << &realm << ")";
+      << " is_snapdir_visible " << realm.srnode.is_snapdir_visible()
+      << " " << &realm << ")";
   return out;
 }