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

crush: do is_out test only if we do not collide #13326

Merged
merged 1 commit into from Feb 14, 2017

Conversation

Projects
None yet
3 participants
@xiexingguo
Member

xiexingguo commented Feb 9, 2017

The is_out() test could requires additional hash, so we shall
skip it whenever it is possible.

Signed-off-by: xie xingguo xie.xingguo@zte.com.cn

@liewegas

This comment has been minimized.

Member

liewegas commented Feb 9, 2017

that useless else reject = 0; after is_out could also be dropped

@liewegas liewegas added the cleanup label Feb 9, 2017

@liewegas liewegas requested a review from Feb 9, 2017

crush: do is_out test only if we do not collide
The is_out() test could requires additional hash, so we shall
skip it whenever it is possible.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@xiexingguo

This comment has been minimized.

Member

xiexingguo commented Feb 10, 2017

that useless else reject = 0; after is_out could also be dropped

dropped

@liewegas liewegas added the needs-qa label Feb 10, 2017

@ghost

ghost approved these changes Feb 10, 2017

@xiexingguo nice catch ! There is indeed no need to find if an item is_out if we already know that it collides. The only difference it will make is in the print statement for debugging. For an item that collides and would be rejected if it did not, the print statement will show that reject is 0. I don't think it is likely to confuse anyone though ;-)

@yuriw yuriw merged commit 079616a into ceph:master Feb 14, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@xiexingguo xiexingguo deleted the xiexingguo:wip-firstn branch Feb 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment