From: Samuel Just Date: Wed, 19 Nov 2014 16:20:16 +0000 (-0800) Subject: PG: always clear_primary_state on new interval, but only clear pg temp if not primary X-Git-Tag: v0.80.10~62^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3955%2Fhead;p=ceph.git PG: always clear_primary_state on new interval, but only clear pg temp if not primary Signed-off-by: Samuel Just (cherry picked from commit f692bfe076b8ddb679c6d1a6ea78cc47f0876326) --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 31c108a4c3c..00c227c2ae8 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -849,8 +849,6 @@ void PG::clear_primary_state() osd->snap_trim_wq.dequeue(this); agent_clear(); - - osd->remove_want_pg_temp(info.pgid.pgid); } /** @@ -4860,8 +4858,10 @@ void PG::start_peering_interval( actingbackfill.clear(); // reset primary state? - if (was_old_primary || is_primary()) - clear_primary_state(); + if (was_old_primary || is_primary()) { + osd->remove_want_pg_temp(info.pgid.pgid); + } + clear_primary_state(); // pg->on_*