From: xie xingguo Date: Sat, 1 Jun 2019 04:13:19 +0000 (+0800) Subject: osd/OSDMap: maybe_remove_pg_upmaps - s/pg_to_raw_up/pg_to_raw_upmap/ X-Git-Tag: v14.2.3~119^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f9ab0ed6bac1992370a08dadeacabc1bf52afcad;p=ceph.git 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 (cherry picked from commit d9ed406a61c46858dd8350af5c72d7b8824dcdd3) --- diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index 0fdf0bc464a9..2a8995948eb0 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -1812,17 +1812,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,