xfs: nowait aio support
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Tue, 20 Jun 2017 12:05:48 +0000 (07:05 -0500)
committerJens Axboe <axboe@kernel.dk>
Tue, 20 Jun 2017 13:12:03 +0000 (07:12 -0600)
commit29a5d29ec181ebdc98a26cedbd76ce9870248892
treef844c49eb8f2d04675e387dcef0e03fb9ca508c7
parent728fbc0e10b7f3ce2ee043b32e3453fd5201c055
xfs: nowait aio support

If IOCB_NOWAIT is set, bail if the i_rwsem is not lockable
immediately.

IF IOMAP_NOWAIT is set, return EAGAIN in xfs_file_iomap_begin
if it needs allocation either due to file extension, writing to a hole,
or COW or waiting for other DIOs to finish.

Return -EAGAIN if we don't have extent list in memory.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/xfs/xfs_file.c
fs/xfs/xfs_iomap.c