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

client/filer: cleanup the redundant judgments of _write&&_fallocate #10062

Merged
merged 1 commit into from
Jul 6, 2016

Conversation

renhwztetecs
Copy link
Contributor

The running time of redundant judgments influence function,especially _write(),
at the same time,Filer::read/read_trunc/write/write_trunc/truncate/zero type should be void, fix it

Signed-off-by: huanwen ren ren.huanwen@zte.com.cn

The running time of redundant judgments influence function,especially _write(),
at the same time,Filer::read/read_trunc/write/write_trunc/truncate/zero type should be void, fix it

Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
@renhwztetecs renhwztetecs changed the title client/filer: _write&&_fallocate in the redundant judgments fix client/filer: fix the redundant judgments of _write&&_fallocate Jun 30, 2016
@xiexingguo xiexingguo added cleanup cephfs Ceph File System labels Jun 30, 2016
@gregsfortytwo
Copy link
Member

Was there something that led you to make these changes? I mean, they might be fine, but there's nothing inherent about the functions that prevents them from returning error codes, just the current implementation. And I have a hard time believing anything you've removed makes a material difference to throughput.

@renhwztetecs
Copy link
Contributor Author

@gregsfortytwo
yeah!
For throughput do not necessarily see the effect(), but write() this kind of interface, removing unnecessary judgment is significant

@renhwztetecs renhwztetecs changed the title client/filer: fix the redundant judgments of _write&&_fallocate client/filer: cleanup the redundant judgments of _write&&_fallocate Jul 1, 2016
@jcsp
Copy link
Contributor

jcsp commented Jul 1, 2016

Reviewed-by

Performance aside, I'm in favour of always-succeed functions being void. For external interfaces I see the value of returning int in case we want to change the implementation, but internally I prefer void.

@renhwztetecs
Copy link
Contributor Author

@jcsp
👍

@jcsp jcsp merged commit b7ba134 into ceph:master Jul 6, 2016
@renhwztetecs renhwztetecs deleted the renhw-wip-filer branch July 20, 2016 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cephfs Ceph File System cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants