Merge pull request #21771 from majianpeng/osd-remove-pgslot

osd: fix bug which cause can't erase OSDShardPGSlot.

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Yuri Weinstein 2018-05-03 13:28:40 -07:00 committed by GitHub
commit 64448b6f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9485,14 +9485,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) {