From 31d3ae8a878f7ede6357f602852d586e0621c73f Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 22 Feb 2017 16:21:45 -0800 Subject: [PATCH] PG: only mark_clean if we are active and not just peered Fixes: http://tracker.ceph.com/issues/19023 Signed-off-by: Samuel Just --- src/osd/PG.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 994cb9095ff26..1c9787a69b96e 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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();