Added MountConfig.EnableVnodeCaching.
parent
40519818d5
commit
2f64ad7f08
|
@ -117,10 +117,25 @@ func (mfs *MountedFileSystem) mountAndServe(
|
||||||
|
|
||||||
// Optional configuration accepted by Mount.
|
// Optional configuration accepted by Mount.
|
||||||
type MountConfig struct {
|
type MountConfig struct {
|
||||||
|
// OS X only.
|
||||||
|
//
|
||||||
|
// Normally on OS X we mount with the novncache option
|
||||||
|
// (cf. http://goo.gl/1pTjuk), which disables entry caching in the kernel.
|
||||||
|
// This is because osxfuse does not support the entry expiration values we
|
||||||
|
// return to it (cf. http://goo.gl/8yR0Ie) and it is probably better to fail
|
||||||
|
// to cache than to cache for too long, since the latter is more likely to
|
||||||
|
// hide consistency bugs that are difficult to detect and diagnose.
|
||||||
|
//
|
||||||
|
// This field disables the use of novncache, restoring entry caching. Beware:
|
||||||
|
// the value of ChildInodeEntry.EntryExpiration is ignored by the kernel, and
|
||||||
|
// entries will be cached for an arbitrarily long time.
|
||||||
|
EnableVnodeCaching bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert to mount options to be passed to package bazilfuse.
|
// Convert to mount options to be passed to package bazilfuse.
|
||||||
func (c *MountConfig) bazilfuseOptions() (opts []bazilfuse.MountOption) {
|
func (c *MountConfig) bazilfuseOptions() (opts []bazilfuse.MountOption) {
|
||||||
|
panic("TODO: Test and support MountConfig.EnableVnodeCaching")
|
||||||
|
|
||||||
opts = []bazilfuse.MountOption{
|
opts = []bazilfuse.MountOption{
|
||||||
// Enable permissions checking in the kernel. See the comments on
|
// Enable permissions checking in the kernel. See the comments on
|
||||||
// InodeAttributes.Mode.
|
// InodeAttributes.Mode.
|
||||||
|
|
Loading…
Reference in New Issue