Skip to content

Commit

Permalink
Merge pull request #23904 from xiexingguo/wip-27985
Browse files Browse the repository at this point in the history
osd/PG: fix misused FORCE_RECOVERY[BACKFILL] flags

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: David Zafman <dzafman@redhat.com>
  • Loading branch information
dzafman committed Jan 26, 2019
2 parents fef88d9 + 60ef742 commit 7423960
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/osd/PG.cc
Expand Up @@ -2408,18 +2408,18 @@ bool PG::set_force_backfill(bool b)
{
bool did = false;
if (b) {
if (!(state & PG_STATE_FORCED_RECOVERY) &&
if (!(state & PG_STATE_FORCED_BACKFILL) &&
(state & (PG_STATE_DEGRADED |
PG_STATE_BACKFILL_WAIT |
PG_STATE_BACKFILLING))) {
dout(10) << __func__ << " set" << dendl;
state_set(PG_STATE_FORCED_RECOVERY);
state_set(PG_STATE_FORCED_BACKFILL);
publish_stats_to_osd();
did = true;
}
} else if (state & PG_STATE_FORCED_RECOVERY) {
} else if (state & PG_STATE_FORCED_BACKFILL) {
dout(10) << __func__ << " clear" << dendl;
state_clear(PG_STATE_FORCED_RECOVERY);
state_clear(PG_STATE_FORCED_BACKFILL);
publish_stats_to_osd();
did = true;
}
Expand Down

0 comments on commit 7423960

Please sign in to comment.