]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: only dump past_parent_snap if non-empty
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 24 Aug 2022 17:09:55 +0000 (13:09 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 29 Sep 2022 01:37:39 +0000 (21:37 -0400)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/SnapRealm.cc

index 3eb8976adf561256b887f192213306ff4e9d634b..ee7d2d67078a2d1ddaf39d783b759de3d6cea34b 100644 (file)
@@ -47,7 +47,9 @@ ostream& operator<<(ostream& out, const SnapRealm& realm)
   if (realm.srnode.created != realm.srnode.current_parent_since)
     out << " cps " << realm.srnode.current_parent_since;
   out << " snaps=" << realm.srnode.snaps;
-  out << " past_parent_snaps=" << realm.srnode.past_parent_snaps;
+  if (realm.srnode.past_parent_snaps.size() > 0) {
+    out << " past_parent_snaps=" << realm.srnode.past_parent_snaps;
+  }
 
   if (realm.srnode.is_parent_global())
     out << " global ";