From: Sage Weil Date: Sat, 13 May 2017 01:45:29 +0000 (-0500) Subject: mon/PGMap: use num_pg where available X-Git-Tag: ses5-milestone6~8^2~19^2~103 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=08bd81fa10724e60c0c80b1815369842224c46b9;p=ceph.git mon/PGMap: use num_pg where available Signed-off-by: Sage Weil --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index cdc91838805..08107e6c567 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -1640,7 +1640,7 @@ void PGMap::print_summary(Formatter *f, ostream *out) const f->close_section(); if (f) { - f->dump_unsigned("num_pgs", pg_stat.size()); + f->dump_unsigned("num_pgs", num_pg); f->dump_unsigned("num_pools", pg_pool_sum.size()); f->dump_unsigned("num_objects", pg_sum.stats.sum.num_objects); f->dump_unsigned("data_bytes", pg_sum.stats.sum.num_bytes); @@ -1649,7 +1649,7 @@ void PGMap::print_summary(Formatter *f, ostream *out) const f->dump_unsigned("bytes_total", osd_sum.kb * 1024ull); } else { *out << " pools: " << pg_pool_sum.size() << " pools, " - << pg_stat.size() << " pgs\n"; + << num_pg << " pgs\n"; *out << " objects: " << si_t(pg_sum.stats.sum.num_objects) << " objects, " << prettybyte_t(pg_sum.stats.sum.num_bytes) << "\n"; *out << " usage: " @@ -1659,7 +1659,6 @@ void PGMap::print_summary(Formatter *f, ostream *out) const *out << " pgs: "; } - bool pad = false; if (num_pg_active < num_pg) { float p = (float)num_pg_active / (float)num_pg;