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

msg/async: return right away in NetHandler::set_priority() if not sup… #14795

Merged
merged 1 commit into from Apr 27, 2017

Conversation

Projects
None yet
4 participants
@tchaikov
Contributor

tchaikov commented Apr 26, 2017

…ported

  • SO_PRIORITY is linux specific, so no need to check linux
  • early return if priority is less than 0 (maybe we should also return if
    it's higher than 6?), the less indent.
  • store errno if fails to set SO_PRIORITY before printing log messages.
  • guard the whole function with '#ifdef SO_PRIORITY' so on platforms
    where this option is not supported, this function will be a no-op.

Signed-off-by: Kefu Chai kchai@redhat.com

if (r < 0) {
r = -errno;
ldout(cct, 0) << __func__ << " couldn't set SO_PRIORITY to " << prio
<< ": " << cpp_strerror(errno) << dendl;

This comment has been minimized.

@yuyuyu101

yuyuyu101 Apr 26, 2017

Member

errno -> r

msg/async: return right away in NetHandler::set_priority() if not sup…
…ported

* SO_PRIORITY is linux specific, so no need to check __linux__
* early return if priority is less than 0 (maybe we should also return if
  it's higher than 6?), the less indent.
* store errno if fails to set SO_PRIORITY before printing log messages.
* guard the whole function with '#ifdef SO_PRIORITY' so on platforms
  where this option is not supported, this function will be a no-op.

Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov

This comment has been minimized.

Contributor

tchaikov commented Apr 26, 2017

@yuyuyu101 fixed and repushed.

@tchaikov

This comment has been minimized.

Contributor

tchaikov commented Apr 26, 2017

retest this please.

@liewegas

This comment has been minimized.

Member

liewegas commented Apr 27, 2017

needs rebase

@tchaikov tchaikov merged commit 8fb1af0 into ceph:master Apr 27, 2017

1 of 4 checks passed

Signed-off-by Build triggered. sha1 is merged.
Details
Unmodifed Submodules checking if PR has modified submodules
Details
default Build started sha1 is merged.
Details
arm build successfully built on arm
Details

@tchaikov tchaikov deleted the tchaikov:wip-so-priority-cleanup branch Apr 27, 2017

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