From: Sage Weil Date: Fri, 19 May 2017 20:38:38 +0000 (-0400) Subject: mon/PGMap: use int32_t, not int X-Git-Tag: ses5-milestone6~8^2~19^2~47 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7394b96d1a195536458b574239735741c8e05ef6;p=ceph.git mon/PGMap: use int32_t, not int These are encoded! Be explicit. Signed-off-by: Sage Weil --- diff --git a/src/mon/PGMap.h b/src/mon/PGMap.h index 9009362c0d6..aa920347ef3 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;