mirror of
https://github.com/ceph/ceph
synced 2024-12-19 18:02:46 +00:00
Merge pull request #23904 from xiexingguo/wip-27985
osd/PG: fix misused FORCE_RECOVERY[BACKFILL] flags Reviewed-by: Sage Weil <sage@redhat.com> Reviewed-by: David Zafman <dzafman@redhat.com>
This commit is contained in:
commit
74239605a1
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user