aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse_kernel.h
diff options
context:
space:
mode:
authorDharmendra singh <dsingh@ddn.com>2022-04-08 10:18:27 +0000
committerNikolaus Rath <Nikolaus@rath.org>2023-03-03 12:41:49 +0000
commita5eb7f2a0117ab43119ef5724cf5f4f2f181804a (patch)
tree778bba47c24bc4f95b0353910d7af48b5c09722d /include/fuse_kernel.h
parent4f8aae77e6d5f27ce22a3b62f9d69f36f5a5774c (diff)
downloadlibfuse-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.h3
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
*