]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: PGMonitor: prettify access to pg_stats_t in register_pg
authorJoao Eduardo Luis <joao@redhat.com>
Tue, 7 Oct 2014 23:12:29 +0000 (00:12 +0100)
committerJoao Eduardo Luis <joao@redhat.com>
Tue, 7 Oct 2014 23:12:29 +0000 (00:12 +0100)
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
src/mon/PGMonitor.cc

index d4fc5781c04d762d6c125ef5b8be31274bcf3c2d..adbd98360abb382f1b4e1c549dcd3b8f8506053a 100644 (file)
@@ -976,11 +976,12 @@ void PGMonitor::register_pg(pg_pool_t& pool, pg_t pgid, epoch_t epoch, bool new_
       }
     }
   }
-  
-  pending_inc.pg_stat_updates[pgid].state = PG_STATE_CREATING;
-  pending_inc.pg_stat_updates[pgid].created = epoch;
-  pending_inc.pg_stat_updates[pgid].parent = parent;
-  pending_inc.pg_stat_updates[pgid].parent_split_bits = split_bits;
+  pg_stat_t &stats = pending_inc.pg_stat_updates[pgid];
+  stats.state = PG_STATE_CREATING;
+  stats.created = epoch;
+  stats.parent = parent;
+  stats.parent_split_bits = split_bits;
 
   if (split_bits == 0) {
     dout(10) << "register_new_pgs  will create " << pgid << dendl;