fs: Introduce RWF_NOWAIT and FMODE_AIO_NOWAIT
RWF_NOWAIT informs kernel to bail out if an AIO request will block for reasons such as file allocations, or a writeback triggered, or would block while allocating requests while performing direct I/O. RWF_NOWAIT is translated to IOCB_NOWAIT for iocb->ki_flags. FMODE_AIO_NOWAIT is a flag which identifies the file opened is capable of returning -EAGAIN if the AIO call will block. This must be set by supporting filesystems in the ->open() call. Filesystems xfs, btrfs and ext4 would be supported in the following patches. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:

committed by
Jens Axboe

parent
9830f4be15
commit
b745fafaf7
@@ -360,7 +360,9 @@ struct fscrypt_key {
|
||||
#define RWF_HIPRI 0x00000001 /* high priority request, poll if possible */
|
||||
#define RWF_DSYNC 0x00000002 /* per-IO O_DSYNC */
|
||||
#define RWF_SYNC 0x00000004 /* per-IO O_SYNC */
|
||||
#define RWF_NOWAIT 0x00000008 /* per-IO, return -EAGAIN if operation would block */
|
||||
|
||||
#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC)
|
||||
#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC |\
|
||||
RWF_NOWAIT)
|
||||
|
||||
#endif /* _UAPI_LINUX_FS_H */
|
||||
|
Reference in New Issue
Block a user