From: Sage Weil Date: Sun, 19 Feb 2012 06:17:35 +0000 (-0800) Subject: osd: fix up argument to PG::init() X-Git-Tag: v0.43~62 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=344c20220345197c03fbaf46e2c1289d81a0a14f;p=ceph.git osd: fix up argument to PG::init() 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 --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 5a75f133721f..402e11724a30 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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; diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 6b9bd67d954d..295f02668106 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1790,7 +1790,7 @@ void PG::clear_stats() void PG::init(int role, vector& newup, vector& 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);