Re: [PATCH] fs: Return EOPNOTSUPP if block layer does not support REQ_NOWAIT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 13, 2018 at 05:53:06AM -0600, Goldwyn Rodrigues wrote:
> For AIO+DIO with RWF_NOWAIT, if the block layer does not support REQ_NOWAIT,
> it returns EIO. Return EOPNOTSUPP to represent the correct error code.

Say what?

Does this mean that if a filesystem supports RWF_NOWAIT, but the
underlying block device/storage stack doesn't support it, then we'll
getting EIO/EOPNOTSUPP errors returned to userspace?

Isn't that highly unfriendly to userspace applications? i.e. instead
of just ignoring RWF_NOWAIT in this case and having the AIO succeed,
we return a /fatal/ error from deep in the guts of the IO subsystem
that the user has no obvious way of tracking down?

I'm also concerned that this is highly hardware dependent - two
identical filesystems on different storage hardware on the same
machine could behave differently. i.e. it works on one filesystem
but not on the other, and there's no way to tell when it will work
or fail apart from trying to use RWF_NOWAIT?

I'd also like to point out that this errori (whether EIO or
EOPNOTSUPP) is completely undocumented in the preadv2/pwritev2 man
page, so application developers that get bug reports about
EOPNOTSUPP errors are going to be rather confused....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux