]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix output of 'ceph osd tree --format=json' 96/head
authorConcubidated <tyler.brekke@inktank.com>
Fri, 8 Mar 2013 21:44:39 +0000 (13:44 -0800)
committerConcubidated <tyler.brekke@inktank.com>
Fri, 8 Mar 2013 21:44:39 +0000 (13:44 -0800)
Signed-off-by: Tyler Brekke <tyler.brekke@inktank.com>
src/osd/OSDMap.cc

index 2b197d9f2abeccafb7624e687dd73533d997e61b..e3188bad696c5f271aa8794e3d154386c8e2e0fe 100644 (file)
@@ -1598,14 +1598,12 @@ void OSDMap::print_tree(ostream *out, Formatter *f) const
        if (out)
          *out << "\n";
        if (f) {
+         f->dump_float("crush_weight", weight);
+         f->dump_unsigned("depth", depth);
          f->close_section();
        }
        touched.insert(cur);
       }
-      if (f) {
-       f->dump_float("crush_weight", weight);
-       f->dump_unsigned("depth", depth);
-      }
       if (cur >= 0) {
        continue;
       }