]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: simplify fragtree_t printer
authorSage Weil <sage@newdream.net>
Wed, 27 Oct 2010 02:20:38 +0000 (19:20 -0700)
committerSage Weil <sage@newdream.net>
Wed, 27 Oct 2010 02:20:38 +0000 (19:20 -0700)
val/bits^split

Signed-off-by: Sage Weil <sage@newdream.net>
src/include/frag.h

index 045464f2bb37dff4c2f2b87f628b3b2f9777c03e..aeb824fa657267058582fa82f9b0ae2de0603b54 100644 (file)
@@ -513,11 +513,20 @@ inline std::ostream& operator<<(std::ostream& out, fragtree_t& ft)
       }
     }
   }
-  if (1) {
+  if (0) {
     std::list<frag_t> leaves;
     ft.get_leaves(leaves);
     out << leaves;
   }
+  if (1) {
+    for (std::map<frag_t,int32_t>::const_iterator p = ft._splits.begin();
+        p != ft._splits.end();
+        p++) {
+      if (p != ft._splits.begin())
+       out << " ";
+      out << p->first << "^" << p->second;
+    }
+  }
   return out << ")";
 }