aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse_common.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_common.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_common.h')
-rw-r--r--include/fuse_common.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/fuse_common.h b/include/fuse_common.h
index 06ee365..d2e7fbe 100644
--- a/include/fuse_common.h
+++ b/include/fuse_common.h
@@ -59,7 +59,7 @@ struct fuse_file_info {
requests if write caching had been disabled. */
unsigned int writepage : 1;
- /** Can be filled in by open, to use direct I/O on this file. */
+ /** Can be filled in by open/create, to use direct I/O on this file. */
unsigned int direct_io : 1;
/** Can be filled in by open and opendir. It signals the kernel that any
@@ -68,6 +68,10 @@ struct fuse_file_info {
the file/directory is closed. */
unsigned int keep_cache : 1;
+ /** Can be filled by open/create, to allow parallel direct writes on this
+ * file */
+ unsigned int parallel_direct_writes : 1;
+
/** Indicates a flush operation. Set in flush operation, also
maybe set in highlevel lock operation and lowlevel release
operation. */
@@ -93,7 +97,7 @@ struct fuse_file_info {
unsigned int noflush : 1;
/** Padding. Reserved for future use*/
- unsigned int padding : 24;
+ unsigned int padding : 23;
unsigned int padding2 : 32;
/** File handle id. May be filled in by filesystem in create,