Commit b5be8805 authored by Aaron Jacobs's avatar Aaron Jacobs

Defined SetKeepCache and read behavior.

parent 9e84136e
......@@ -43,6 +43,10 @@ const (
// inode entries and attributes to be cached, used when responding to fuse
// requests. It also exposes methods for renumbering inodes and updating mtimes
// that are useful in testing that these durations are honored.
//
// Each file responds to reads with random contents. SetKeepCache can be used
// to control whether the response to OpenFileOp tells the kernel to keep the
// file's data in the page cache or not.
type CachingFS interface {
fuseutil.FileSystem
......@@ -236,6 +240,14 @@ func (fs *cachingFS) SetMtime(mtime time.Time) {
fs.mtime = mtime
}
// Instruct the file system whether or not to reply to OpenFileOp with
// FOPEN_KEEP_CACHE set.
//
// LOCKS_EXCLUDED(fs.mu)
func (fs *cachingFS) SetKeepCache(keep bool) {
// TODO
}
////////////////////////////////////////////////////////////////////////
// FileSystem methods
////////////////////////////////////////////////////////////////////////
......
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