From: Sage Weil Date: Mon, 11 Jun 2018 22:26:01 +0000 (-0500) Subject: osd: debug pending_creates_from_osd cleanup, don't use cbegin X-Git-Tag: v14.0.1~371^2~28 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=925163c7eb142b5d2ca9d796f415fefe282bfd73;p=ceph.git osd: debug pending_creates_from_osd cleanup, don't use cbegin Got a segv on the erase line :/ Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index a7076cc535f1..b2ac08a573fe 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -8051,9 +8051,11 @@ void OSD::consume_map() { // FIXME (as part of seastar rewrite): move to OSDShard [[gnu::unused]] auto&& pending_create_locker = guardedly_lock(pending_creates_lock); - for (auto pg = pending_creates_from_osd.cbegin(); - pg != pending_creates_from_osd.cend();) { + for (auto pg = pending_creates_from_osd.begin(); + pg != pending_creates_from_osd.end();) { if (osdmap->get_pg_acting_rank(pg->first, whoami) < 0) { + dout(10) << __func__ << " pg " << pg->first << " doesn't map here, " + << "discarding pending_create_from_osd" << dendl; pg = pending_creates_from_osd.erase(pg); } else { ++pg;