diff options
author | Jens Axboe <axboe@kernel.dk> | 2023-03-07 19:40:28 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-04-03 16:14:20 +0300 |
commit | d8aeb44a9ae324c4b823689fabb30b6621d93c88 (patch) | |
tree | 8ff9a7ae757b4621914fb656cd77379d8f061e32 /include | |
parent | 7e364e56293bb98cae1b55fd835f5991c4e96e7d (diff) | |
download | linux-d8aeb44a9ae324c4b823689fabb30b6621d93c88.tar.xz |
fs: add FMODE_DIO_PARALLEL_WRITE flag
Some filesystems support multiple threads writing to the same file with
O_DIRECT without requiring exclusive access to it. io_uring can use this
hint to avoid serializing dio writes to this inode, instead allowing them
to run in parallel.
XFS and ext4 both fall into this category, so set the flag for both of
them.
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index c85916e9f7db..475d88640d3d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -168,6 +168,9 @@ typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset, #define FMODE_NOREUSE ((__force fmode_t)0x800000) +/* File supports non-exclusive O_DIRECT writes from multiple threads */ +#define FMODE_DIO_PARALLEL_WRITE ((__force fmode_t)0x1000000) + /* File was opened by fanotify and shouldn't generate fanotify events */ #define FMODE_NONOTIFY ((__force fmode_t)0x4000000) |