]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: fix misused FORCE_RECOVERY[BACKFILL] flags 26324/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 4 Sep 2018 07:34:24 +0000 (15:34 +0800)
committerNathan Cutler <ncutler@suse.com>
Thu, 7 Feb 2019 16:31:10 +0000 (17:31 +0100)
__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 <xie.xingguo@zte.com.cn>
(cherry picked from commit 60ef742a84d5201b2a6e6c1780741da0b31c49a8)

src/osd/PG.cc

index 4bd7672fb5944a91f64449b89b8f27f1c1cca0eb..cd4f455eb215155e2c6df89ec615de4c2774a4ab 100644 (file)
@@ -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;
   }