diff options
author | Dharmendra singh <dsingh@ddn.com> | 2022-04-08 10:18:27 +0000 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2023-03-03 12:41:49 +0000 |
commit | a5eb7f2a0117ab43119ef5724cf5f4f2f181804a (patch) | |
tree | 778bba47c24bc4f95b0353910d7af48b5c09722d /lib/fuse_lowlevel.c | |
parent | 4f8aae77e6d5f27ce22a3b62f9d69f36f5a5774c (diff) | |
download | fuse-a5eb7f2a0117ab43119ef5724cf5f4f2f181804a.tar.gz |
Enable parallel direct writes on the same file.
Right now fuse kernel serializes direct writes on the
same file. This serialization is good for such FUSE
implementations which rely on the inode lock to
avoid any data inconsistency issues but it hurts badly
such FUSE implementations which have their own mechanism
of dealing with cache/data integrity and can handle
parallel direct writes on the same file.
This patch allows parallel direct writes on the same file to be
enabled with the help of a flag FOPEN_PARALLEL_DIRECT_WRITES.
FUSE implementations which want to use this feature can
set this flag during fuse init. Default behaviour remains
same i.e no parallel direct writes on the same file.
Corresponding fuse kernel patch(Merged).
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.2&id=153524053bbb0d27bb2e0be36d1b46862e9ce74c
Diffstat (limited to 'lib/fuse_lowlevel.c')
-rw-r--r-- | lib/fuse_lowlevel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index a0f8f00..baed664 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -405,6 +405,8 @@ static void fill_open(struct fuse_open_out *arg, arg->open_flags |= FOPEN_NONSEEKABLE; if (f->noflush) arg->open_flags |= FOPEN_NOFLUSH; + if (f->parallel_direct_writes) + arg->open_flags |= FOPEN_PARALLEL_DIRECT_WRITES; } int fuse_reply_entry(fuse_req_t req, const struct fuse_entry_param *e) |