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
......
......@@ -23,7 +23,7 @@ const (
FATTR_ATIME_NOW = (1 << 7)
FATTR_MTIME_NOW = (1 << 8)
FATTR_LOCKOWNER = (1 << 9)
// OpenIn.Flags
FOPEN_DIRECT_IO = (1 << 0)
......@@ -41,7 +41,7 @@ const (
CAP_SPLICE_WRITE = (1 << 7)
CAP_SPLICE_MOVE = (1 << 8)
CAP_SPLICE_READ = (1 << 9)
FUSE_UNKNOWN_INO = 0xffffffff
CUSE_UNRESTRICTED_IOCTL = (1 << 0)
......@@ -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