The patch titled Subject: ext4: nowait aio support has been removed from the -mm tree. Its filename was ext4-nowait-aio-support.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx> Subject: ext4: nowait aio support Return EAGAIN if any of the following checks fail for direct I/O: + i_rwsem is lockable + Writing beyond end of file (will trigger allocation) + Blocks are not allocated at the write location Link: http://lkml.kernel.org/r/20170615160002.17233-9-rgoldwyn@xxxxxxx Signed-off-by: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx> Reviewed-by: Jan Kara <jack@xxxxxxx> Cc: "Theodore Ts'o" <tytso@xxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Andreas Dilger <adilger.kernel@xxxxxxxxx> Cc: Chris Mason <clm@xxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Cc: Darrick J. Wong <darrick.wong@xxxxxxxxxx> Cc: David Sterba <dsterba@xxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Cc: Josef Bacik <jbacik@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ext4/file.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff -puN fs/ext4/file.c~ext4-nowait-aio-support fs/ext4/file.c --- a/fs/ext4/file.c~ext4-nowait-aio-support +++ a/fs/ext4/file.c @@ -216,7 +216,13 @@ ext4_file_write_iter(struct kiocb *iocb, return ext4_dax_write_iter(iocb, from); #endif - inode_lock(inode); + if (iocb->ki_flags & IOCB_NOWAIT) { + if (!inode_trylock(inode)) + return -EAGAIN; + } else { + inode_lock(inode); + } + ret = ext4_write_checks(iocb, from); if (ret <= 0) goto out; @@ -235,9 +241,15 @@ ext4_file_write_iter(struct kiocb *iocb, iocb->private = &overwrite; /* Check whether we do a DIO overwrite or not */ - if (o_direct && ext4_should_dioread_nolock(inode) && !unaligned_aio && - ext4_overwrite_io(inode, iocb->ki_pos, iov_iter_count(from))) - overwrite = 1; + if (o_direct && !unaligned_aio) { + if (ext4_overwrite_io(inode, iocb->ki_pos, iov_iter_count(from))) { + if (ext4_should_dioread_nolock(inode)) + overwrite = 1; + } else if (iocb->ki_flags & IOCB_NOWAIT) { + ret = -EAGAIN; + goto out; + } + } ret = __generic_file_write_iter(iocb, from); inode_unlock(inode); @@ -435,6 +447,10 @@ static int ext4_file_open(struct inode * if (ret < 0) return ret; } + + /* Set the flags to support nowait AIO */ + filp->f_mode |= FMODE_NOWAIT_AIO; + return dquot_file_open(inode, filp); } _ Patches currently in -mm which might be from rgoldwyn@xxxxxxxx are xfs-nowait-aio-support.patch btrfs-nowait-aio-support.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html