diff --git a/samples/cachingfs/caching_fs.go b/samples/cachingfs/caching_fs.go index 2565719..fa537d2 100644 --- a/samples/cachingfs/caching_fs.go +++ b/samples/cachingfs/caching_fs.go @@ -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 ////////////////////////////////////////////////////////////////////////