From 60ef742a84d5201b2a6e6c1780741da0b31c49a8 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Tue, 4 Sep 2018 15:34:24 +0800 Subject: [PATCH] osd/PG: fix misused FORCE_RECOVERY[BACKFILL] flags __set_force_backfill__ should set PG_STATE_FORCED_BACKFILL instead of PG_STATE_FORCED_RECOVERY. Fixes: http://tracker.ceph.com/issues/27985 Signed-off-by: xie xingguo --- src/osd/PG.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index c912bf09b3757..06ed2a21d850d 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2368,18 +2368,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; }