From 7394b96d1a195536458b574239735741c8e05ef6 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 19 May 2017 16:38:38 -0400 Subject: [PATCH] mon/PGMap: use int32_t, not int These are encoded! Be explicit. Signed-off-by: Sage Weil --- src/mon/PGMap.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mon/PGMap.h b/src/mon/PGMap.h index 9009362c0d621..aa920347ef3c8 100644 --- a/src/mon/PGMap.h +++ b/src/mon/PGMap.h @@ -44,15 +44,15 @@ public: // aggregate state, populated by PGMap child int64_t num_pg = 0, num_osd = 0; int64_t num_pg_active = 0; - mempool::pgmap::unordered_map pg_pool_sum; + mempool::pgmap::unordered_map pg_pool_sum; mempool::pgmap::map num_pg_by_pool; pool_stat_t pg_sum; osd_stat_t osd_sum; - mempool::pgmap::unordered_map num_pg_by_state; + mempool::pgmap::unordered_map num_pg_by_state; struct pg_count { - int acting = 0; - int up = 0; - int primary = 0; + int32_t acting = 0; + int32_t up = 0; + int32_t primary = 0; void encode(bufferlist& bl) const { ::encode(acting, bl); ::encode(up, bl); @@ -64,10 +64,7 @@ public: ::decode(primary, p); } }; - mempool::pgmap::unordered_map num_pg_by_osd; - - void print_summary(Formatter *f, ostream *out) const; - void print_oneline_summary(Formatter *f, ostream *out) const; + mempool::pgmap::unordered_map num_pg_by_osd; // recent deltas, and summation /** @@ -93,6 +90,9 @@ public: utime_t stamp_delta; + void print_summary(Formatter *f, ostream *out) const; + void print_oneline_summary(Formatter *f, ostream *out) const; + void recovery_summary(Formatter *f, list *psl, const pool_stat_t& delta_sum) const; void overall_recovery_summary(Formatter *f, list *psl) const; -- 2.39.5