Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AutoInvalData Mount Option #137

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ func (h *Header) RespondError(err error) {
}

// Maximum file write size we are prepared to receive from the kernel.
const maxWrite = 16 * 1024 * 1024
const maxWrite = 128 * 1024

// All requests read from the kernel, without data, are shorter than
// this.
Expand Down
10 changes: 10 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ func WritebackCache() MountOption {
}
}

// AutoInvalData enables the kernel to automatically invalidate
// cached pages on file open. The kernel uses mtime and size to
// determine when to invalidate cached pages.
func AutoInvalData() MountOption {
return func(conf *mountConfig) error {
conf.initFlags |= InitAutoInvalData
return nil
}
}

// OSXFUSEPaths describes the paths used by an installed OSXFUSE
// version. See OSXFUSELocationV3 for typical values.
type OSXFUSEPaths struct {
Expand Down