From 9db7cfad93abff181c59d61892d32b9b05f4234f Mon Sep 17 00:00:00 2001 From: Nicolas Lacasse Date: Tue, 19 Jun 2018 11:09:20 -0700 Subject: 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 --- pkg/sentry/fs/gofer/BUILD | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/sentry/fs/gofer/BUILD') 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", -- cgit v1.2.3