1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-26 01:37:12 +00:00
restic/changelog/unreleased
greatroar 3b24c15c3d fuse: Mix inode hashes in a non-symmetric way
Since 0.15 (#4020), inodes are generated as hashes of names, xor'd with
the parent inode. That means that the inode of a/b/b is

	h(a/b/b) = h(a) ^ h(b) ^ h(b) = h(a).

I.e., the grandchild has the same inode as the grandparent. GNU find
trips over this because it thinks it has encountered a loop in the
filesystem, and fails to search a/b/b. This happens more generally when
the same name occurs an even number of times.

Fix this by multiplying the parent by a large prime, so the combining
operation is not longer symmetric in its arguments. This is what the FNV
hash does, which we used prior to 0.15. The hash is now

	h(a/b/b) = h(b) ^ p*(h(b) ^ p*h(a))

Note that we already ensure that h(x) is never zero.

Collisions can still occur, but they should be much less likely to occur
within a single path.

Fixes #4253.
2023-04-14 20:50:39 +02:00
..
.gitignore Add gitignore to changelog/unreleased 2020-11-05 09:01:32 +01:00
issue-4211 cmd, restic: Refactor and fix snapshot filtering 2023-04-13 22:51:45 +02:00
issue-4239 fuse: Report fuse.Attr.Blocks correctly 2023-04-14 20:50:08 +02:00
issue-4253 fuse: Mix inode hashes in a non-symmetric way 2023-04-14 20:50:39 +02:00
pull-4180 add linux/riscv64 builds 2023-04-13 22:45:35 +02:00
pull-4219 added changelog 2023-04-13 22:54:36 +02:00