From 925163c7eb142b5d2ca9d796f415fefe282bfd73 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 11 Jun 2018 17:26:01 -0500 Subject: [PATCH] osd: debug pending_creates_from_osd cleanup, don't use cbegin Got a segv on the erase line :/ Signed-off-by: Sage Weil --- src/osd/OSD.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index a7076cc535f11..b2ac08a573fe8 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; -- 2.39.5