aboutsummaryrefslogtreecommitdiff
path: root/internal/inomap/inomap_test.go
AgeCommit message (Collapse)Author
2024-05-05inomap: export NextSpillIno()Jakob Unterwurzacher
This will be used in reverse mode. Switch to atomic increment to avoid a "nextSpillInoUnlocked" helper.
2024-05-05inomap: incorporate spillBit into the spillNext start valueJakob Unterwurzacher
This avoids the manual "| spillBit" logic.
2021-09-10inomap: deterministically set root deviceJakob Unterwurzacher
We used to have "first Translate() wins". This is not deterministic, as the LOOKUP for the root directory does not seem to reach us, so the first user LOOKUP would win, which may be on a mountpoint.
2020-05-03inomap: fix TestSpill bit checkJakob Unterwurzacher
Wrong bit operator was used.
2020-05-03inomap: fix spillBit not set on 2nd hitJakob Unterwurzacher
Also add a test for this. Thanks @slackner for the comment.
2020-05-03fusefrontend_reverse: use inomap for inode number translationJakob Unterwurzacher
Gets rid of static inode number value limitations. Fixes https://github.com/rfjakob/gocryptfs/issues/457
2020-04-19inomap: rework logic to efficiently support flagsJakob Unterwurzacher
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
2020-04-19inomap: add benchmarkJakob Unterwurzacher
$ go test -bench=. goos: linux goarch: amd64 pkg: github.com/rfjakob/gocryptfs/internal/inomap BenchmarkTranslateSingleDev-4 202479382 5.88 ns/op BenchmarkTranslateManyDevs-4 16095795 71.9 ns/op PASS ok github.com/rfjakob/gocryptfs/internal/inomap 3.039s
2020-04-13inomap: split into separate packageJakob Unterwurzacher
inomap will also be used by fusefrontend_reverse in the future. Split if off openfiletable to make it independent.