libgocryptfs/internal/nametransform
Jakob Unterwurzacher 245b84c887 nametransform: diriv cache: fall back to the grandparent
When a user calls into a deep directory hierarchy, we often
get a sequence like this from the kernel:

LOOKUP a
LOOKUP a/b
LOOKUP a/b/c
LOOKUP a/b/c/d

The diriv cache was not effective for this pattern, because it
was designed for this:

LOOKUP a/a
LOOKUP a/b
LOOKUP a/c
LOOKUP a/d

By also using the cached entry of the grandparent we can avoid lots
of diriv reads.

This benchmark is against a large encrypted directory hosted on NFS:

Before:

  $ time ls -R nfs-backed-mount > /dev/null
  real	1m35.976s
  user	0m0.248s
  sys	0m0.281s

After:

  $ time ls -R nfs-backed-mount > /dev/null
  real	1m3.670s
  user	0m0.217s
  sys 	0m0.403s
2017-05-22 22:36:54 +02:00
..
diriv.go nametransform: diriv cache: fall back to the grandparent 2017-05-22 22:36:54 +02:00
diriv_cache.go fusefronted: expire dir IV cache after one second 2016-11-01 10:57:39 +01:00
longnames.go nametransform: fix Raw64 not affecting symlink targets 2017-03-05 22:59:25 +01:00
longnames_test.go longnames: fix fsstress failure, use dirfd 2016-04-10 21:31:08 +02:00
names.go nametranform, fusefrontend: better errors on invalid names 2017-05-07 20:58:27 +02:00
names_test.go nametransform: drop unused noiv functions 2016-06-23 21:39:04 +02:00
pad16.go Replace all calls to naked panic() with log.Panic() 2016-12-10 11:54:36 +01:00