]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: remove created argument from get_or_create_pg()
authorSamuel Just <sam.just@inktank.com>
Wed, 29 May 2013 22:18:04 +0000 (15:18 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 4 Jun 2013 19:36:00 +0000 (12:36 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/OSD.cc
src/osd/OSD.h

index ef2b58a5de2204751438d7e61bcf2ea6e579afaa..3a83749c464241d420d40d44b6e5855ff7a8e929 100644 (file)
@@ -1969,7 +1969,7 @@ void OSD::build_past_intervals_parallel()
  */
 PG *OSD::get_or_create_pg(
   const pg_info_t& info, pg_interval_map_t& pi,
-  epoch_t epoch, int from, int& created, bool primary)
+  epoch_t epoch, int from, bool primary)
 {
   PG *pg;
 
@@ -2029,7 +2029,6 @@ PG *OSD::get_or_create_pg(
     pg->write_if_dirty(*rctx.transaction);
     dispatch_context(rctx, pg, osdmap);
       
-    created++;
     dout(10) << *pg << " is new" << dendl;
 
     // kick any waiters
@@ -5628,7 +5627,6 @@ void OSD::handle_pg_notify(OpRequestRef op)
       continue;
     }
 
-    int created = 0;
     if (service.splitting(it->first.info.pgid)) {
       peering_wait_for_split[it->first.info.pgid].push_back(
        PG::CephPeeringEvtRef(
@@ -5639,7 +5637,7 @@ void OSD::handle_pg_notify(OpRequestRef op)
     }
 
     pg = get_or_create_pg(it->first.info, it->second,
-                          it->first.query_epoch, from, created, true);
+                          it->first.query_epoch, from, true);
     if (!pg)
       continue;
     pg->queue_notify(it->first.epoch_sent, it->first.query_epoch, from, it->first);
@@ -5673,9 +5671,8 @@ void OSD::handle_pg_log(OpRequestRef op)
     return;
   }
 
-  int created = 0;
   PG *pg = get_or_create_pg(m->info, m->past_intervals, m->get_epoch(), 
-                            from, created, false);
+                            from, false);
   if (!pg)
     return;
   op->mark_started();
@@ -5697,8 +5694,6 @@ void OSD::handle_pg_info(OpRequestRef op)
 
   op->mark_started();
 
-  int created = 0;
-
   for (vector<pair<pg_notify_t,pg_interval_map_t> >::iterator p = m->pg_list.begin();
        p != m->pg_list.end();
        ++p) {
@@ -5716,7 +5711,7 @@ void OSD::handle_pg_info(OpRequestRef op)
       continue;
     }
     PG *pg = get_or_create_pg(p->first.info, p->second, p->first.epoch_sent,
-                              from, created, false);
+                              from, false);
     if (!pg)
       continue;
     pg->queue_info(p->first.epoch_sent, p->first.query_epoch, from,
index effbb5e353340441149d7f6c55a406ea3740ff16..4341f1da37f3a3368bf7179071b5f76ea09f513f 100644 (file)
@@ -1061,7 +1061,7 @@ protected:
 
   PG *get_or_create_pg(const pg_info_t& info,
                        pg_interval_map_t& pi,
-                       epoch_t epoch, int from, int& pcreated,
+                       epoch_t epoch, int from,
                        bool primary);
   
   void load_pgs();