]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: fix incorrect dabtree hashval comparison
authorDarrick J. Wong <djwong@kernel.org>
Wed, 15 Mar 2023 01:01:55 +0000 (18:01 -0700)
committerCarlos Maiolino <cem@kernel.org>
Fri, 17 Mar 2023 10:35:43 +0000 (11:35 +0100)
If an xattr structure contains enough names with the same hash value to
fill multiple xattr leaf blocks with names all hashing to the same
value, then the dabtree nodes will contain consecutive entries with the
same hash value.

This causes false corruption reports in xfs_repair because it's not
expecting such a huge same-hashing structure.  Fix that.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
repair/da_util.c

index 7239c2e2c64fed086c853993e6f6e8579a3195a4..b229422c81e8c2cbb450517aad412692e2cb8e71 100644 (file)
@@ -330,7 +330,7 @@ _("%s block used/count inconsistency - %d/%hu\n"),
        /*
         * hash values monotonically increasing ???
         */
-       if (cursor->level[this_level].hashval >=
+       if (cursor->level[this_level].hashval >
                                be32_to_cpu(nodehdr.btree[entry].hashval)) {
                do_warn(
 _("%s block hashvalue inconsistency, expected > %u / saw %u\n"),