From 4991d37fbaa300eaaa2bc792dad8a0c0e5269f73 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Thu, 29 Jan 2026 10:45:27 -0500 Subject: [PATCH] mds: indicate whether SnapRealm is a subvolume in dump 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 Fixes: https://tracker.ceph.com/issues/74652 --- src/mds/SnapRealm.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mds/SnapRealm.cc b/src/mds/SnapRealm.cc index 5e18fe6c8e74..6eed30da6d93 100644 --- a/src/mds/SnapRealm.cc +++ b/src/mds/SnapRealm.cc @@ -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; } -- 2.47.3