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

src/osd/PG.cc

index 31c108a4c3cf25b983c7a6e244b38e50c2359943..00c227c2ae84e9d6f0b73643c14b1f4ffbcb5acf 100644 (file)
@@ -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_*