f2fs: add nowait aio support
authorHyunchul Lee <cheol.lee@lge.com>
Thu, 8 Mar 2018 10:34:38 +0000 (19:34 +0900)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sun, 8 Apr 2018 11:14:11 +0000 (04:14 -0700)
commit7e93bf8ebc348ea5455bb0d3dc73e8803f87c0bd
tree97b6d4adcd3eab84a15470c6cc520868a0d64e7d
parent1e64d3ed27534ec81fd0cdafbab2d381e0af5a0d
f2fs: add nowait aio support

This patch adds nowait aio support[1].

Return EAGAIN if any of the following checks fail for direct I/O:
  - i_rwsem is not lockable
  - Blocks are not allocated at the write location

And xfstests generic/471 is passed.

 [1]: 6be96d "Introduce RWF_NOWAIT and FMODE_AIO_NOWAIT"

Signed-off-by: Hyunchul Lee <cheol.lee@lge.com>
Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/file.c