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 /include/fuse_kernel.h | |
parent | 4f8aae77e6d5f27ce22a3b62f9d69f36f5a5774c (diff) | |
download | libfuse-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 'include/fuse_kernel.h')
-rw-r--r-- | include/fuse_kernel.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h index 39cfb34..814a86f 100644 --- a/include/fuse_kernel.h +++ b/include/fuse_kernel.h @@ -307,6 +307,7 @@ struct fuse_file_lock { * FOPEN_CACHE_DIR: allow caching this directory * FOPEN_STREAM: the file is stream-like (no file position at all) * FOPEN_NOFLUSH: don't flush data cache on close (unless FUSE_WRITEBACK_CACHE) + * FOPEN_PARALLEL_DIRECT_WRITES: allow parallel direct writes on the same file */ #define FOPEN_DIRECT_IO (1 << 0) #define FOPEN_KEEP_CACHE (1 << 1) @@ -314,7 +315,7 @@ struct fuse_file_lock { #define FOPEN_CACHE_DIR (1 << 3) #define FOPEN_STREAM (1 << 4) #define FOPEN_NOFLUSH (1 << 5) - +#define FOPEN_PARALLEL_DIRECT_WRITES (1 << 6) /** * INIT request/reply flags * |