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.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.h')
-rw-r--r-- | include/fuse.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/fuse.h b/include/fuse.h index 6f162dd..3cf0423 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -274,6 +274,20 @@ struct fuse_config { * fuse_file_info argument is NULL. */ int nullpath_ok; + /** + * Allow parallel direct-io writes to operate on the same file. + * + * FUSE implementations which do not handle parallel writes on + * same file/region should NOT enable this option at all as it + * might lead to data inconsistencies. + * + * For the FUSE implementations which have their own mechanism + * of cache/data integrity are beneficiaries of this setting as + * it now open doors to parallel writes on the same file (without + * enabling this setting, all direct writes on the same file are + * serialized, resulting in huge data bandwidth loss). + */ + int parallel_direct_writes; /** * The remaining options are used by libfuse internally and |