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.91~52^2~3^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f692bfe076b8ddb679c6d1a6ea78cc47f0876326;p=ceph.git PG: always clear_primary_state on new interval, but only clear pg temp if not primary Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 39d4ad9ad241..7b454b3020d1 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -860,8 +860,6 @@ void PG::clear_primary_state() osd->snap_trim_wq.dequeue(this); agent_clear(); - - osd->remove_want_pg_temp(info.pgid.pgid); } /** @@ -4733,8 +4731,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_*