Content-Length: 1369 | pFad | http://github.com/hanwen/go-fuse/commit/98027c76d4e3e15cae3cdac982fc730e013f0790.diff
1A diff --git a/fuse/api.go b/fuse/api.go index 61923665..d335435e 100644 --- a/fuse/api.go +++ b/fuse/api.go @@ -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. diff --git a/fuse/opcode.go b/fuse/opcode.go index cbbe0839..2afaefe3 100644 --- a/fuse/opcode.go +++ b/fuse/opcode.go @@ -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 { diff --git a/fuse/server.go b/fuse/server.go index b11d9980..08987f22 100644 --- a/fuse/server.go +++ b/fuse/server.go @@ -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)Fetched URL: http://github.com/hanwen/go-fuse/commit/98027c76d4e3e15cae3cdac982fc730e013f0790.diff
Alternative Proxies: