Skip to content

Commit

Permalink
msg/async: print error log if add_event fail
Browse files Browse the repository at this point in the history
Signed-off-by: mychoxin <mychoxin@gmail.com>
  • Loading branch information
mychoxin committed Aug 26, 2017
1 parent 8d8e2f2 commit 549d598
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/msg/async/Event.cc
Expand Up @@ -230,6 +230,8 @@ int EventCenter::create_file_event(int fd, int mask, EventCallbackRef ctxt)
// Actually we don't allow any failed error code, caller doesn't prepare to
// handle error status. So now we need to assert failure here. In practice,
// add_event shouldn't report error, otherwise it must be a innermost bug!
lderr(cct) << __func__ << " add event failed, ret=" << r << " fd=" << fd
<< " mask=" << mask << " original mask is " << event->mask << dendl;
assert(0 == "BUG!");
return r;
}
Expand Down
10 changes: 5 additions & 5 deletions src/os/bluestore/KernelDevice.cc
Expand Up @@ -362,17 +362,17 @@ void KernelDevice::_aio_thread()
io_since_flush.store(true);

int r = aio[i]->get_return_value();
dout(10) << __func__ << " finished aio " << aio[i] << " r " << r
<< " ioc " << ioc
<< " with " << (ioc->num_running.load() - 1)
<< " aios left" << dendl;
if (r < 0) {
derr << __func__ << " finished aio " << aio[i] << " r " << r
<< " ioc " << ioc
<< " with " << (ioc->num_running.load() - 1)
<< " aios left" << dendl;
assert(r >= 0);
}
}
dout(10) << __func__ << " finished aio " << aio[i] << " r " << r
<< " ioc " << ioc
<< " with " << (ioc->num_running.load() - 1)
<< " aios left" << dendl;

// NOTE: once num_running and we either call the callback or
// call aio_wake we cannot touch ioc or aio[] as the caller
Expand Down

0 comments on commit 549d598

Please sign in to comment.