git: hammer2(8): hash inode numbers and media offsets together
Aaron LI
aly at crater.dragonflybsd.org
Sat Oct 31 19:48:14 PDT 2026
commit 62d1f0c2a44dfc952d36348e512629f68bb14ab9
Author: David Bidner <david at crap.solutions>
Date: Mon Oct 5 08:48:45 2026 +0200
hammer2(8): hash inode numbers and media offsets together
The recovery secondary hash XORs inode numbers with shifted media
offsets. The two values are correlated, so the XOR often cancels and
puts many entries in one bucket. This is a real concern because the
recovery is basically a block scan on a copy-on-write filesystem, so
there can be *many* copies of the same inode in the scan.
Hash the two complete values with the existing HAMMER2 XXH64 and share
the helper between both inode insertion paths.
Reported-by: tkusumi
Reviewed-by: dillon
Bug: https://bugs.dragonflybsd.org/issues/3378
Summary of changes:
sbin/hammer2/cmd_recover.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/62d1f0c2a44dfc952d36348e512629f68bb14ab9
--
DragonFly BSD source repository
More information about the Commits
mailing list