mirror of
https://github.com/ceph/ceph
synced 2024-12-20 02:13:04 +00:00
Merge pull request #7638 from asheplyakov/filejournal-open-ret
FileJournal::_open: return the correct error code Reviewed-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
commit
32f90e4880
@ -106,9 +106,16 @@ int FileJournal::_open(bool forwrite, bool create)
|
||||
aio_ctx = 0;
|
||||
ret = io_setup(128, &aio_ctx);
|
||||
if (ret < 0) {
|
||||
ret = errno;
|
||||
derr << "FileJournal::_open: unable to setup io_context " << cpp_strerror(ret) << dendl;
|
||||
ret = -ret;
|
||||
switch (ret) {
|
||||
// Contrary to naive expectations -EAGIAN means ...
|
||||
case -EAGAIN:
|
||||
derr << "FileJournal::_open: user's limit of aio events exceeded. "
|
||||
<< "Try increasing /proc/sys/fs/aio-max-nr" << dendl;
|
||||
break;
|
||||
default:
|
||||
derr << "FileJournal::_open: unable to setup io_context " << cpp_strerror(-ret) << dendl;
|
||||
break;
|
||||
}
|
||||
goto out_fd;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user