1
0
mirror of https://github.com/ceph/ceph synced 2025-04-01 00:26:47 +00:00

mon/PGMap: use num_pg where available

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-05-12 20:45:29 -05:00
parent 39d524a433
commit 08bd81fa10

View File

@ -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;