fs: add FMODE_DIO_PARALLEL_WRITE flag
authorJens Axboe <axboe@kernel.dk>
Tue, 7 Mar 2023 16:40:28 +0000 (09:40 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 3 Apr 2023 13:14:20 +0000 (07:14 -0600)
commitd8aeb44a9ae324c4b823689fabb30b6621d93c88
tree8ff9a7ae757b4621914fb656cd77379d8f061e32
parent7e364e56293bb98cae1b55fd835f5991c4e96e7d
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>
fs/ext4/file.c
fs/xfs/xfs_file.c
include/linux/fs.h