]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs_db: fix dir3 block magic check origin/for-next_2022-12-29 origin/for-next_2022-12-30
authorDarrick J. Wong <djwong@kernel.org>
Wed, 21 Dec 2022 00:53:34 +0000 (16:53 -0800)
committerCarlos Maiolino <cem@kernel.org>
Wed, 21 Dec 2022 11:22:42 +0000 (12:22 +0100)
Fix this broken check, which (amazingly) went unnoticed until I cranked
up the warning level /and/ built the system for s390x.

Fixes: e96864ff4d4 ("xfs_db: enable blockget for v5 filesystems")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
db/check.c

index bb27ce58053646a83ab479c242b82f44236764f4..964756d0ae57cdcf64effee49a41ac4fcf04adea 100644 (file)
@@ -2578,7 +2578,7 @@ process_data_dir_v2(
                error++;
        }
        if ((be32_to_cpu(data->magic) == XFS_DIR2_BLOCK_MAGIC ||
-            be32_to_cpu(data->magic) == XFS_DIR2_BLOCK_MAGIC) &&
+            be32_to_cpu(data->magic) == XFS_DIR3_BLOCK_MAGIC) &&
                                        stale != be32_to_cpu(btp->stale)) {
                if (!sflag || v)
                        dbprintf(_("dir %lld block %d bad stale tail count %d\n"),