From 08bd81fa10724e60c0c80b1815369842224c46b9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 12 May 2017 20:45:29 -0500 Subject: [PATCH] mon/PGMap: use num_pg where available Signed-off-by: Sage Weil --- src/mon/PGMap.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index cdc91838805fe..08107e6c567f1 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; -- 2.39.5