]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMap: inline init for a few fields
authorSage Weil <sage@redhat.com>
Wed, 26 Apr 2017 16:38:51 +0000 (12:38 -0400)
committerSage Weil <sage@redhat.com>
Wed, 26 Apr 2017 16:38:51 +0000 (12:38 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/PGMap.h

index 506f86d9300c301c265dd0ea13ca9816be0dc96c..c09a5f72dedbaef3ff3f47b22b7029f3088f94b9 100644 (file)
@@ -117,11 +117,11 @@ public:
 
   // aggregate stats (soft state), generated by calc_stats()
   ceph::unordered_map<int,int> num_pg_by_state;
-  int64_t num_pg, num_osd;
+  int64_t num_pg = 0, num_osd = 0;
   ceph::unordered_map<int,pool_stat_t> pg_pool_sum;
   pool_stat_t pg_sum;
   osd_stat_t osd_sum;
-  mutable epoch_t min_last_epoch_clean;
+  mutable epoch_t min_last_epoch_clean = 0;
   ceph::unordered_map<int,int> blocked_by_sum;
   ceph::unordered_map<int,set<pg_t> > pg_by_osd;
 
@@ -198,10 +198,7 @@ public:
   PGMap()
     : version(0),
       last_osdmap_epoch(0), last_pg_scan(0),
-      full_ratio(0), nearfull_ratio(0),
-      num_pg(0),
-      num_osd(0),
-      min_last_epoch_clean(0)
+      full_ratio(0), nearfull_ratio(0)
   {}
 
   void set_full_ratios(float full, float nearfull) {