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

os/bluestore: fix error handling of posix_fallocate() #10277

Merged
merged 2 commits into from Jul 19, 2016

Conversation

xiexingguo
Copy link
Member

According to Linux man page:

posix_fallocate() returns zero on success, or an error number on failure.
Note that errno is not set.

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

According to Linux man page:

posix_fallocate() returns zero on success, or an error number on failure.
Note that errno is not set.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
The strlen() will automatically exclude the NUL terminator of a literal
constant. Also by calling strlen(), we know that we are definitely
operate on a string instead of something odd.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@markhpc markhpc merged commit 81c1021 into ceph:master Jul 19, 2016
@xiexingguo xiexingguo deleted the xxg-wip-fix-posix-fallocate branch July 19, 2016 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants