From d9ed406a61c46858dd8350af5c72d7b8824dcdd3 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Sat, 1 Jun 2019 12:13:19 +0800 Subject: [PATCH] osd/OSDMap: maybe_remove_pg_upmaps - s/pg_to_raw_up/pg_to_raw_upmap/ The upmap results are directly applied after calling _pg_to_raw_osds, which means it basically has nothing to do with the up/down status. In other words, if a pg_upmap/pg_upmap_items remapped a pg into some down osds and is now causing collided result, we should still be able to detect and cancel that. Signed-off-by: xie xingguo --- src/osd/OSDMap.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index cc709b1d99c..80f8ae0ed12 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -1811,17 +1811,8 @@ void OSDMap::maybe_remove_pg_upmaps(CephContext *cct, to_cancel.insert(pg); continue; } - vector raw_up; - int primary; - nextmap.pg_to_raw_up(pg, &raw_up, &primary); vector up; - up.reserve(raw_up.size()); - for (auto osd : raw_up) { - // skip non-existent/down osd for erasure-coded PGs - if (osd == CRUSH_ITEM_NONE) - continue; - up.push_back(osd); - } + nextmap.pg_to_raw_upmap(pg, &up); auto crush_rule = nextmap.get_pg_pool_crush_rule(pg); auto r = nextmap.crush->verify_upmap(cct, crush_rule, -- 2.39.5