Content-Length: 271259 | pFad | http://github.com/hanwen/go-fuse/commit/98027c76d4e3e15cae3cdac982fc730e013f0790

4E fuse: add MountOptions.MaxStackDepth · hanwen/go-fuse@98027c7 · GitHub
Skip to content

Commit

Permalink
fuse: add MountOptions.MaxStackDepth
Browse files Browse the repository at this point in the history
Addresses #548

Change-Id: I61f348278d0f1de2ae49808f30d7b2f0ae11a40e
  • Loading branch information
hanwen committed Dec 2, 2024
1 parent 7e2f19f commit 98027c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions fuse/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ type MountOptions struct {

// Disable splicing from files to the FUSE device.
DisableSplice bool

// Maximum stacking depth for passthrough files. Defaults to 1.
MaxStackDepth int
}

// RawFileSystem is an interface close to the FUSE wire protocol.
Expand Down
2 changes: 1 addition & 1 deletion fuse/opcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func doInit(server *protocolServer, req *request) {
CongestionThreshold: uint16(server.opts.MaxBackground * 3 / 4),
MaxBackground: uint16(server.opts.MaxBackground),
MaxPages: uint16(maxPages),
MaxStackDepth: 1,
MaxStackDepth: server.opts.MaxStackDepth,
}
out.setFlags(kernelFlags)
if server.opts.MaxReadAhead != 0 && uint32(server.opts.MaxReadAhead) < out.MaxReadAhead {
Expand Down
4 changes: 3 additions & 1 deletion fuse/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ func NewServer(fs RawFileSystem, mountPoint string, opts *MountOptions) (*Server
if o.MaxWrite > MAX_KERNEL_WRITE {
o.MaxWrite = MAX_KERNEL_WRITE
}

if o.MaxStackDepth == 0 {
o.MaxStackDepth = 1
}
if o.Name == "" {
name := fs.String()
l := len(name)
Expand Down

0 comments on commit 98027c7

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/hanwen/go-fuse/commit/98027c76d4e3e15cae3cdac982fc730e013f0790

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy