diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2018-06-19 11:09:20 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-06-19 11:10:11 -0700 |
commit | 9db7cfad93abff181c59d61892d32b9b05f4234f (patch) | |
tree | 51e3f4b6fa836a52f317dca62e01bf13143c8c05 /pkg/sentry/fs/gofer/BUILD | |
parent | 5581256f879f4249de5ebffddaf0626fcb39eebd (diff) |
Add a new cache policy FSCACHE_WRITETHROUGH.
The new policy is identical to FSCACHE (which caches everything in memory), but
it also flushes writes to the backing fs agent immediately.
All gofer cache policy decisions have been moved into the cachePolicy type.
Previously they were sprinkled around the codebase.
There are many different things that we cache (page cache, negative dirents,
dirent LRU, unstable attrs, readdir results....), and I don't think we should
have individual flags to control each of these. Instead, we should have a few
high-level cache policies that are consistent and useful to users. This
refactoring makes it easy to add more such policies.
PiperOrigin-RevId: 201206937
Change-Id: I6e225c382b2e5e1b0ad4ccf8ca229873f4cd389d
Diffstat (limited to 'pkg/sentry/fs/gofer/BUILD')
-rw-r--r-- | pkg/sentry/fs/gofer/BUILD | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/sentry/fs/gofer/BUILD b/pkg/sentry/fs/gofer/BUILD index ca42b0a54..e6f659c53 100644 --- a/pkg/sentry/fs/gofer/BUILD +++ b/pkg/sentry/fs/gofer/BUILD @@ -22,6 +22,7 @@ go_library( name = "gofer", srcs = [ "attr.go", + "cache_policy.go", "context_file.go", "device.go", "file.go", |