aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-04-19 21:57:53 +0200
committerJakob Unterwurzacher2020-04-19 22:00:56 +0200
commit9f9d59ded94f648202505e278f67667879e60be8 (patch)
tree17e9190c4aa752feab71545a56f0686b2ea64237 /internal/fusefrontend
parentfcdeb52390b15b0d59015dbd238835b9a6f6b3ff (diff)
inomap: rework logic to efficiently support flags
Adding flags allows to use inomap in reverse mode, replacing the clunky inoBaseDirIV/inoBaseNameFile logic that causes problems with high underlying inode numbers ( https://github.com/rfjakob/gocryptfs/issues/457 ) Microbenchmarks (values below) show that the "SingleDev" case is now much slower due to an extra map lookup, but this has no visible effects in ./test.bash results, so there was no time spent optimizing the case further. $ go test -bench=. goos: linux goarch: amd64 pkg: github.com/rfjakob/gocryptfs/internal/inomap BenchmarkTranslateSingleDev-4 18757510 61.5 ns/op BenchmarkTranslateManyDevs-4 18061515 64.5 ns/op PASS ok github.com/rfjakob/gocryptfs/internal/inomap 2.467s
Diffstat (limited to 'internal/fusefrontend')
-rw-r--r--internal/fusefrontend/fs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go
index cfd17e3..dbd8236 100644
--- a/internal/fusefrontend/fs.go
+++ b/internal/fusefrontend/fs.go
@@ -85,7 +85,7 @@ func NewFS(args Args, c *contentenc.ContentEnc, n nametransform.NameTransformer)
args: args,
nameTransform: n,
contentEnc: c,
- inoMap: inomap.New(uint64(st.Dev)), // cast is needed for Darwin
+ inoMap: inomap.New(),
}
}