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

Put MountOptions in the public types.go header.

parent 95ecd2db
......@@ -141,14 +141,7 @@ func (me *inode) setParent(newParent *inode) {
}
}
type MountOptions struct {
EntryTimeout float64
AttrTimeout float64
NegativeTimeout float64
}
func MakeMountOptions() *MountOptions {
func NewMountOptions() *MountOptions {
return &MountOptions{
NegativeTimeout: 0.0,
AttrTimeout: 1.0,
......@@ -429,7 +422,7 @@ func (me *FileSystemConnector) Mount(mountPoint string, fs FileSystem, opts *Mou
node.mount = newMount(fs)
if opts == nil {
opts = MakeMountOptions()
opts = NewMountOptions()
}
node.mount.options = opts
return OK
......
......@@ -598,7 +598,16 @@ type FileSystem interface {
// unimplemented: poll, ioctl, bmap.
}
// Include this struct in your implementation to inherit default nop
// MountOptions contains time out options for a FileSystem. The
// default copied from libfuse and set in NewMountOptions() is
// (1s,1s,0s).
type MountOptions struct {
EntryTimeout float64
AttrTimeout float64
NegativeTimeout float64
}
// Include these structs in your implementation to inherit default nop
// implementations.
type DefaultFileSystem struct{}
......
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