]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: always clear_primary_state on new interval, but only clear pg temp if not primary 4090/head
authorSamuel Just <sjust@redhat.com>
Wed, 19 Nov 2014 16:20:16 +0000 (08:20 -0800)
committerLoic Dachary <ldachary@redhat.com>
Thu, 19 Mar 2015 09:08:13 +0000 (10:08 +0100)
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit f692bfe076b8ddb679c6d1a6ea78cc47f0876326)

src/osd/PG.cc

index 39d4ad9ad241451aabd2951d1b40c7a81c24c6f4..7b454b3020d1ef4b1bf947ed5d7f5faaad07e27c 100644 (file)
@@ -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_*