Commit cfd3e6e6 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Add RememberInodes option to MountOptions.

parent fcdd7df0
......@@ -251,6 +251,10 @@ type MountOptions struct {
// If given, use this buffer pool instead of the global one.
Buffers BufferPool
// If RememberInodes is set, we will never forget inodes.
// This may be useful for NFS.
RememberInodes bool
}
// DefaultFileSystem implements a FileSystem that returns ENOSYS for every operation.
......
......@@ -211,7 +211,9 @@ func doGetAttr(state *MountState, req *request) {
}
func doForget(state *MountState, req *request) {
state.fileSystem.Forget(req.inHeader.NodeId, (*raw.ForgetIn)(req.inData).Nlookup)
if !state.opts.RememberInodes {
state.fileSystem.Forget(req.inHeader.NodeId, (*raw.ForgetIn)(req.inData).Nlookup)
}
}
func doBatchForget(state *MountState, req *request) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment