mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
a0885d5d69
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. |
||
---|---|---|
.. | ||
archiver | ||
backend | ||
bloblru | ||
cache | ||
checker | ||
crypto | ||
debug | ||
dump | ||
errors | ||
filter | ||
fs | ||
fuse | ||
hashing | ||
index | ||
migrations | ||
options | ||
pack | ||
repository | ||
restic | ||
restorer | ||
selfupdate | ||
test | ||
textfile | ||
ui | ||
walker |