fuse: allow parallel dio writes with FUSE_DIRECT_IO_ALLOW_MMAP
authorAmir Goldstein <amir73il@gmail.com>
Fri, 9 Feb 2024 14:54:37 +0000 (16:54 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 23 Feb 2024 16:36:32 +0000 (17:36 +0100)
commit205c1d8026835746d8597e1aa70c370e014e83fa
treea0751f7ae00b09b36089e101f4c075739c032ec4
parentcb098dd24bab8a315aa00bab1ccddb6be872156d
fuse: allow parallel dio writes with FUSE_DIRECT_IO_ALLOW_MMAP

Instead of denying caching mode on parallel dio open, deny caching
open only while parallel dio are in-progress and wait for in-progress
parallel dio writes before entering inode caching io mode.

This allows executing parallel dio when inode is not in caching mode
even if shared mmap is allowed, but no mmaps have been performed on
the inode in question.

An mmap on direct_io file now waits for all in-progress parallel dio
writes to complete, so parallel dio writes together with
FUSE_DIRECT_IO_ALLOW_MMAP is enabled by this commit.

Signed-off-by: Bernd Schubert <bschubert@ddn.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c
fs/fuse/fuse_i.h
fs/fuse/iomode.c