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 <xie.xingguo@zte.com.cn>
(cherry picked from commit
d9ed406a61c46858dd8350af5c72d7b8824dcdd3)
Conflicts:
s/nextmap/tmpmap/
to_cancel.insert(pg);
continue;
}
- vector<int> raw_up;
- int primary;
- tmpmap.pg_to_raw_up(pg, &raw_up, &primary);
vector<int> 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);
- }
+ tmpmap.pg_to_raw_upmap(pg, &up);
auto crush_rule = tmpmap.get_pg_pool_crush_rule(pg);
auto r = tmpmap.crush->verify_upmap(cct,
crush_rule,