From 21f81b85de652aede51e88b87bdff71f2e411da3 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 19 Nov 2014 08:20:16 -0800 Subject: [PATCH] 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) --- src/osd/PG.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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_* -- 2.47.3