-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Comments
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. |
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- ENOSYS io_submit() is not implemented on this architecture. 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 . |
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. |
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. |
I'm going to close this as a duplicate of #223. |
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.
The text was updated successfully, but these errors were encountered: