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

os/bluestore: clear up redundant size assignment in KerenelDevice #16121

Merged
merged 1 commit into from Jul 8, 2017

Conversation

Projects
None yet
4 participants
@shashalu
Copy link
Contributor

shashalu commented Jul 5, 2017

Signed-off-by: Shasha Lu lu.shasha@eisoo.com

os/bluestore: clean up redundant size assignment in KerenelDevice
Signed-off-by: Shasha Lu <lu.shasha@eisoo.com>

@shashalu shashalu force-pushed the shashalu:fix-kerneldevice-size branch from 6ca6fa7 to f6f1ae3 Jul 5, 2017

@shashalu shashalu changed the title os/bluestore: fix KerenelDevice rounded size os/bluestore: clear up redundant size assignment in KerenelDevice Jul 5, 2017

@smithfarm

This comment has been minimized.

Copy link
Contributor

smithfarm commented Jul 5, 2017

Jenkins re-test this please

@@ -130,7 +130,6 @@ int KernelDevice::open(const string& p)
} else {
size = st.st_size;
}
size &= ~(block_size);

This comment has been minimized.

@xiexingguo

xiexingguo Jul 5, 2017

Member

The block_size can be reconfigured and hence can be any value other than st.st_blksize(see L116).
So we still need to align to block_size here. right?

This comment has been minimized.

@shashalu

shashalu Jul 6, 2017

Author Contributor

yes, it should align to block_size. It should be size &= ~(block_size - 1) .
L157 do this correctly, so this line is redundant.

This comment has been minimized.

@xiexingguo

xiexingguo Jul 6, 2017

Member

It should be size &= ~(block_size - 1)

Quite right. Looks good to me!

@liewegas liewegas merged commit d6c649b into ceph:master Jul 8, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@shashalu shashalu deleted the shashalu:fix-kerneldevice-size branch Jul 10, 2017

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