]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix up argument to PG::init()
authorSage Weil <sage.weil@dreamhost.com>
Sun, 19 Feb 2012 06:17:35 +0000 (22:17 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Sun, 19 Feb 2012 06:17:35 +0000 (22:17 -0800)
Commit cefa55b288b40e17ade9875493dd94de52ac22bf moved PG initialization
into init(), but passed acting for both up and acting args.  This lead to
confusion between primary and replica.

Also fix debug print so that the output is useful.

Fixes: #2075, #2070
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/OSD.cc
src/osd/PG.cc

index 5a75f133721f0d9f2848f28c7a3101a548446771..402e11724a3038efe2225635da57985c381be18c 100644 (file)
@@ -1120,7 +1120,7 @@ PG *OSD::_create_lock_pg(pg_t pgid, bool newly_created,
     history.last_epoch_started = history.epoch_created - 1;
   }
 
-  pg->init(role, acting, acting, history, &t);
+  pg->init(role, up, acting, history, &t);
 
   dout(7) << "_create_lock_pg " << *pg << dendl;
   return pg;
index 6b9bd67d954db3bb8dd4e2e47519fa95ae945273..295f0266810659db8af0b0ebee361ecbc0942810 100644 (file)
@@ -1790,7 +1790,7 @@ void PG::clear_stats()
 void PG::init(int role, vector<int>& newup, vector<int>& newacting, pg_history_t& history,
              ObjectStore::Transaction *t)
 {
-  dout(10) << "init role " << role << " up " << up << " acting " << acting
+  dout(10) << "init role " << role << " up " << newup << " acting " << newacting
           << " history " << history << dendl;
 
   set_role(role);