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: print error log if add_event fail #17102
msg/async: print error log if add_event fail #17102
Conversation
@xiexingguo @joscollin I think this is necessary, how do you think of it ? |
src/os/bluestore/KernelDevice.cc
Outdated
<< " with " << (ioc->num_running.load() - 1) | ||
<< " aios left" << dendl; | ||
assert(r >= 0); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prints 2 times when r < 0
right ? Please see https://github.com/mychoxin/ceph/blob/deb79f35fde7c6c49083685673562e4fe18bb506/src/os/bluestore/KernelDevice.cc#L365
549d598
to
4ef24b9
Compare
src/os/bluestore/KernelDevice.cc
Outdated
<< " with " << (ioc->num_running.load() - 1) | ||
<< " aios left" << dendl; | ||
assert(r >= 0); | ||
} | ||
dout(10) << __func__ << " finished aio " << aio[i] << " r " << r |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joscollin at first, for dout(10) when the error happens this log with 10 level not always prints, because opening low level log impacts the performance, for the second, in order to avoid printing log twice when we exactly opened log of this level, i just handle the error before dout(10), how do you think of it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just change the dout(10) to dout(r < 0 ? -1 : 10). (dout(-1) is equivalent to derr)
4ef24b9
to
31cc06c
Compare
src/os/bluestore/KernelDevice.cc
Outdated
<< " with " << (ioc->num_running.load() - 1) | ||
<< " aios left" << dendl; | ||
assert(r >= 0); | ||
} | ||
dout(10) << __func__ << " finished aio " << aio[i] << " r " << r |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just change the dout(10) to dout(r < 0 ? -1 : 10). (dout(-1) is equivalent to derr)
31cc06c
to
16ad044
Compare
@liewegas I modified it, please have a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@liewegas Thank you.
Signed-off-by: mychoxin <mychoxin@gmail.com>
16ad044
to
52c4c13
Compare
@joscollin @liewegas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Jenkins retest this please |
@liewegas please let me know if there is exists any problems. |
I ran into some osd assert fail, I thought it resulted of /proc/sys/fs/aio-max-nr being exhausted, but I can not
reproduce it and verify it (not so easy), so I think here we should add some error log, which makes us know what the error code is.