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

Error Message for Asynchronous IO #663

Closed
pyavdr opened this issue Apr 14, 2012 · 5 comments
Closed

Error Message for Asynchronous IO #663

pyavdr opened this issue Apr 14, 2012 · 5 comments

Comments

@pyavdr
Copy link
Contributor

pyavdr commented Apr 14, 2012

Hi Brian,

while testing with the "aiostress" procedure stressing a zfs filestystem on a zpool, aiostress returned an error in io_submit (..), saying "invalid arguments". This function is part of libaio witch runs with no problems against an ext4 filesystem. As written in issue #223 asynchronous IO is not yet implemented in ZOL, which most likely caused that error.

It maybe that some of the newer issues like #626 is caused by #223. Rsync and Samba (there is an aio read/write size parameter) may try to use asynchronous IO, and other programms may try that too. It is depending on the programms if there is a check proving asynchronous I/O availiblity.

Just to be sure, is it possible to implement an error message from the kernel ( saying ... asynchronous IO not implemented...), to clearly identify such a case? Without that, there is a chance to fail over that issue, without knowing it.

There should be a warning on the ZOL FAQ ( Asychnronous IO not implemented) and a hint like "don´t use asynchronous IO with rsync and others .... "

Besides that warning, it may be fine to implement asynchronous IO in ZOL.

@ryao
Copy link
Contributor

ryao commented Apr 14, 2012

The error that you received from aiostress should be the error that you expected. In Linux, if a VFS operation is not defined, it is treated as being unimplemented.

For reference, the vfs implementations appear to be in ./module/zfs/zpl_file.c. You can find documentation on how this works in /usr/src/linux/Documentation/filesystems/vfs.txt.

@pyavdr
Copy link
Contributor Author

pyavdr commented Apr 14, 2012

io_submit has some defined return values:

EINVAL The aio_context specified by ctx_id is invalid. nr is less than 0. The iocb at *iocbpp[0] is not properly initial-
ized, or the operation specified is invalid for the file descriptor in the iocb.

ENOSYS io_submit() is not implemented on this architecture.
.. and more ...

Return value from io_submit is EINVAL (called by/from aiostress), which is at least misleading. I would expect ENOSYS for this situation, where there is no asynchronous interface to zfs.

This issue could be closed, when this return value EINVAL is ok .

@rlaager
Copy link
Member

rlaager commented Apr 15, 2012

I would conclude: the operation is invalid for the file descriptor in the iocb, as it's on ZFS, which doesn't support aio. ENOSYS means your kernel doesn't have io_submit() at all.

@ryao
Copy link
Contributor

ryao commented Apr 15, 2012

The unintuitiveness of the error message is probably something that should be discussed with people the Linux Kernel Mailing list. The only thing we can do about it is to implement this functionality, but as you pointed out, issue #223 already exists for that.

@behlendorf
Copy link
Contributor

I'm going to close this as a duplicate of #223.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants