Skip to content
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

Add PARALLEL_DIROPS FUSE option to jacobsa/fuse #158

Merged
merged 1 commit into from Apr 8, 2024

Conversation

sethiay
Copy link
Contributor

@sethiay sethiay commented Apr 4, 2024

Add PARALLEL_DIROPS FUSE option to jacobsa/fuse. When enabled, this allows parallel lookups and readdir calls to filesystem server in user space from FUSE driver.

Consider the directory and file structure is flat i.e.
mnt/

  • child1.txt
  • child2.txt
  • ...
  • childN.txt

When PARALLEL_DIROPS is not enabled:
if an application tries to stat the child files parallely, for the first time, the calls are serialized from FUSE driver to filesystem server in user space. When the same files are accessed second time, the calls are parallel.

When PARALLEL_DIROPS is enabled:
if an application tries to stat the child files parallely, the calls are parallel from FUSE driver to filesystem server in user space.

@stapelberg
Copy link
Collaborator

Add PARALLEL_DIROPS FUSE option to jacobsa/fuse. When enabled, this allows parallel lookups and readdir calls to filesystem server in user space from FUSE driver.

Have you verified that it is safe to enable parallel dirops?

When following your reference link to the Linux kernel change, the change says parallel dirops are disabled by default to prevent breakage. I’m not sure if jacobsa/fuse is ready for parallel dirops or what needs changing.

@sethiay
Copy link
Contributor Author

sethiay commented Apr 4, 2024

Add PARALLEL_DIROPS FUSE option to jacobsa/fuse. When enabled, this allows parallel lookups and readdir calls to filesystem server in user space from FUSE driver.

Have you verified that it is safe to enable parallel dirops?

When following your reference link to the Linux kernel change, the change says parallel dirops are disabled by default to prevent breakage. I’m not sure if jacobsa/fuse is ready for parallel dirops or what needs changing.

  1. There is no logic on jacobsa/fuse side specifically for LookUpInode or Readdir FUSE driver calls that needs any modifications for this flag.
  2. The PR changes doesn't make parallel lookups by default. So, if a wrapper over jacobsa/fuse changes it they will be aware of it and handle parallel lookups accordingly.
  3. Also in my experiment without the PR changes, (a) if files are nested in directories and if parallel lookups are done on different directories then FUSE driver sends parallel calls. (b) on repeated parallel lookups of files under same directory, FUSE driver sends parallel calls.

the change says parallel dirops are disabled by default to prevent breakage. I’m not sure if jacobsa/fuse is ready for parallel dirops or what needs changing.

Given above that we are not making this true by default and the parallel look ups should be handled by wrapper over jacobsa/fuse implementing filesystem methods, so we should be good here ?
go-fuse also supports this option: https://github.com/hanwen/go-fuse/blob/2901efa04e040ebe54a951bcea93d67ab1af1ad5/fuse/types.go#L297
libfuse also support this option: https://github.com/libfuse/libfuse/blob/e2df577a7ca0c4b06d9eb36eb79138e34cc03088/ChangeLog.rst#libfuse-300-2016-12-08

@stapelberg
Copy link
Collaborator

Thanks for the background!

@stapelberg stapelberg merged commit 84480b2 into jacobsa:master Apr 8, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants