Skip to content

Commit

Permalink
PG: only mark_clean if we are active and not just peered
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/19023
Signed-off-by: Samuel Just <sjust@redhat.com>
  • Loading branch information
athanatos authored and liewegas committed Jun 7, 2017
1 parent b34507f commit 31d3ae8
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/osd/PG.cc
Expand Up @@ -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()
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 31d3ae8

Please sign in to comment.