From: xie xingguo Date: Tue, 4 Sep 2018 07:34:24 +0000 (+0800) Subject: osd/PG: fix misused FORCE_RECOVERY[BACKFILL] flags X-Git-Tag: v13.2.5~42^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c5eb6e0441db62d1a7a79cf9c91349f3a69d2402;p=ceph.git 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 (cherry picked from commit 60ef742a84d5201b2a6e6c1780741da0b31c49a8) --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 4bd7672fb59..cd4f455eb21 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2333,18 +2333,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; }