Re: [PATCH 2/8] nowait aio: Introduce RWF_NOWAIT
From: Jan Kara <hidden>
Date: 2017-04-19 11:03:17
Also in:
linux-block, linux-btrfs, linux-ext4, linux-fsdevel, linux-xfs
From: Jan Kara <hidden>
Date: 2017-04-19 11:03:17
Also in:
linux-block, linux-btrfs, linux-ext4, linux-fsdevel, linux-xfs
On Wed 19-04-17 05:30:24, Goldwyn Rodrigues wrote:
On 04/19/2017 01:39 AM, Christoph Hellwig wrote:quoted
quoted
@@ -1593,6 +1593,11 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, } req->common.ki_flags |= iocb_rw_flags(iocb->aio_rw_flags); + if ((req->common.ki_flags & IOCB_NOWAIT) && + !(req->common.ki_flags & IOCB_DIRECT)) { + ret = -EINVAL; + goto out_put_req; + }Wrong indentation. Also I think this should be EOPNOTSUPP here.Do we plan to add support for nowait in buffered I/O in the future? It is just too complicated. EINVAL suits best in this case.
Well, it may be complicated in the current implementation but IMO it makes sense to ask for such functionality (see e.g. patches for non-blocking buffered reads that were flying around year or two ago). So I agree with Christoph that EOPNOTSUPP is more logical. Honza -- Jan Kara [off-list ref] SUSE Labs, CR