]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix bug which cause can't erase OSDShardPGSlot. 21771/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Wed, 2 May 2018 08:41:51 +0000 (16:41 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Wed, 2 May 2018 08:52:55 +0000 (16:52 +0800)
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/osd/OSD.cc

index 1285c22dce15b48e09fd323d48129ef595330f37..e1087d60270389f5c1325f9d37d26785a13f6981 100644 (file)
@@ -9474,14 +9474,15 @@ void OSDShard::consume_map(
         *pushes_to_free += qi.get_reserved_pushes();
        slot->waiting.pop_front();
       }
-      if (slot->waiting.empty() &&
-         slot->num_running == 0 &&
-         !slot->pg) {
-       dout(20) << __func__ << "  " << pgid << " empty, pruning" << dendl;
-       p = pg_slots.erase(p);
-       continue;
-      }
     }
+    if (slot->waiting.empty() &&
+       slot->num_running == 0 &&
+       !slot->pg) {
+      dout(20) << __func__ << "  " << pgid << " empty, pruning" << dendl;
+      p = pg_slots.erase(p);
+      continue;
+    }
+
     ++p;
   }
   if (queued) {