]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: fix misused FORCE_RECOVERY[BACKFILL] flags
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 4 Sep 2018 07:34:24 +0000 (15:34 +0800)
committerDavid Zafman <dzafman@redhat.com>
Wed, 6 Mar 2019 10:21:11 +0000 (10:21 +0000)
__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)

Conflicts:
src/osd/PG.cc (trivial)

src/osd/PG.cc

index 3833952611cbf424aa2344432e86a7de647401da..f39e4da44e270245f9ee4eef132039e7682bd515 100644 (file)
@@ -2164,18 +2164,18 @@ bool PG::set_force_backfill(bool b)
   lock();
   if (!deleting) {
     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;
     }