]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: only mark_clean if we are active and not just peered
authorSamuel Just <sjust@redhat.com>
Thu, 23 Feb 2017 00:21:45 +0000 (16:21 -0800)
committerSage Weil <sage@redhat.com>
Wed, 7 Jun 2017 15:27:51 +0000 (11:27 -0400)
Fixes: http://tracker.ceph.com/issues/19023
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/PG.cc

index 994cb9095ff267020b1fadc8c395b44fcaa99f54..1c9787a69b96e1c76b3161bfd6d44fe24cbb478a 100644 (file)
@@ -2017,13 +2017,9 @@ void PG::mark_clean()
   past_intervals.clear();
   dirty_big_info = true;
 
-  if (is_active()) {
-    /* The check is needed because if we are below min_size we're not
-     * actually active */
-    kick_snap_trim();
-  }
-
   dirty_info = true;
+
+  kick_snap_trim();
 }
 
 unsigned PG::get_recovery_priority()
@@ -6830,7 +6826,10 @@ PG::RecoveryState::Clean::Clean(my_context ctx)
     ceph_abort();
   }
   pg->finish_recovery(*context< RecoveryMachine >().get_on_safe_context_list());
-  pg->mark_clean();
+
+  if (pg->is_active()) {
+    pg->mark_clean();
+  }
 
   pg->share_pg_info();
   pg->publish_stats_to_osd();