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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ func (c *Connection) Init() error {
initOp.Flags |= fusekernel.InitNoOpendirSupport
}

// Tell the Kernel to allow sending parallel lookup and readdir operations.
if c.cfg.EnableParallelDirOps {
initOp.Flags |= fusekernel.InitParallelDirOps
}

return c.Reply(ctx, nil)
}

Expand Down
1 change: 1 addition & 0 deletions internal/fusekernel/fuse_kernel.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ const (
InitAsyncDIO InitFlags = 1 << 15
InitWritebackCache InitFlags = 1 << 16
InitNoOpenSupport InitFlags = 1 << 17
InitParallelDirOps InitFlags = 1 << 18
InitMaxPages InitFlags = 1 << 22
InitCacheSymlinks InitFlags = 1 << 23
InitNoOpendirSupport InitFlags = 1 << 24
Expand Down
5 changes: 5 additions & 0 deletions mount_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ type MountConfig struct {
// Flag to enable async reads that are received from
// the kernel
EnableAsyncReads bool

// Flag to enable parallel lookup and readdir operations from the
// kernel
// Ref: https://github.com/torvalds/linux/commit/5c672ab3f0ee0f78f7acad183f34db0f8781a200
EnableParallelDirOps bool
}

// Create a map containing all of the key=value mount options to be given to
Expand Down
Loading