diff options
author | Chong Cai <chongc@google.com> | 2021-08-19 17:20:21 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-08-19 17:22:25 -0700 |
commit | 3ba8df92a86aa1044ab59110c640ba413341b9f3 (patch) | |
tree | afd642a1c554d319058a45f7ba6a2cb8952bc360 /pkg/sentry/fsimpl/verity/BUILD | |
parent | d43a3ca8191f4346bed3d6dedac4581e47ce9826 (diff) |
Cache verity dentries
Add an LRU cache to cache verity dentries when ref count drop to 0. This
way we don't need to hash and verify the previous opened files or
directories each time.
PiperOrigin-RevId: 391880157
Diffstat (limited to 'pkg/sentry/fsimpl/verity/BUILD')
-rw-r--r-- | pkg/sentry/fsimpl/verity/BUILD | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/verity/BUILD b/pkg/sentry/fsimpl/verity/BUILD index 5955948f0..c12abdf33 100644 --- a/pkg/sentry/fsimpl/verity/BUILD +++ b/pkg/sentry/fsimpl/verity/BUILD @@ -1,10 +1,24 @@ load("//tools:defs.bzl", "go_library", "go_test") +load("//tools/go_generics:defs.bzl", "go_template_instance") licenses(["notice"]) +go_template_instance( + name = "dentry_list", + out = "dentry_list.go", + package = "verity", + prefix = "dentry", + template = "//pkg/ilist:generic_list", + types = { + "Element": "*dentry", + "Linker": "*dentry", + }, +) + go_library( name = "verity", srcs = [ + "dentry_list.go", "filesystem.go", "save_restore.go", "verity.go", |