Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd/OSDMap: more pg upmap fixes #21670

Merged
merged 4 commits into from Apr 28, 2018
Merged

osd/OSDMap: more pg upmap fixes #21670

merged 4 commits into from Apr 28, 2018

Conversation

xiexingguo
Copy link
Member

@xiexingguo xiexingguo commented Apr 26, 2018

@xiexingguo
Copy link
Member Author

retest this please

map<int, float> weight_map;
auto it = rule_weight_map.find(crush_rule);
if (it == rule_weight_map.end()) {
auto r = tmpmap.crush->get_rule_weight_osd_map(crush_rule, &weight_map);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this way is simple to find whether osd is in bucket

<< "pg_upmap_items entry "
<< "[" << osdmap.pg_upmap.find(pg)->first << ":"
<< osdmap.pg_upmap.find(pg)->second << "]"
<< dendl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be osdmap.pg_upmap_items.find(pg)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hjwsm1989 Thank you very much. Fixed!

xiexingguo added 4 commits April 27, 2018 09:16
There is too much code redundancy..

Signed-off-by: xiexingguo <xie.xingguo@gmail.com>
pg_upmap/pg_upmap_items should not bring osds which
no longer belong to a specific crush-tree in.

Signed-off-by: xiexingguo <xie.xingguo@gmail.com>
Signed-off-by: xiexingguo <xie.xingguo@gmail.com>
@liewegas liewegas merged commit 7ebbb7d into ceph:master Apr 28, 2018
@xiexingguo xiexingguo deleted the wip-23878 branch April 29, 2018 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants