-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Enable parallel direct writes on the same file #659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks! Could you please ping this request once the necessary patches have been merged into the kernel? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Support for parallel writes is released in linux/6.2 (commit 153524053bbb0d27bb2e0be36d1b46862e9ce74c).
lib/fuse.c
Outdated
| @@ -4669,6 +4675,7 @@ static const struct fuse_opt fuse_lib_opts[] = { | |||
| FUSE_LIB_OPT("noforget", remember, -1), | |||
| FUSE_LIB_OPT("remember=%u", remember, 0), | |||
| FUSE_LIB_OPT("modules=%s", modules, 0), | |||
| FUSE_LIB_OPT("parallel_direct_write=%d",parallel_direct_writes, 0), | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: There should be a space after the comma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can enable this for passthrough_ll, passthrough_hp, etc, but can be done in a separate commit.
|
@d-hans there is a merge conflict, can you please rebase? |
include/fuse_common.h
Outdated
| @@ -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; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: 1 is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
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
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 behavior 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