]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: fix super block offset in error message in btrfs_validate_super()
authorMark Harmstone <mark@harmstone.com>
Tue, 17 Feb 2026 17:35:42 +0000 (17:35 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2026 19:09:08 +0000 (20:09 +0100)
Fix the superblock offset mismatch error message in
btrfs_validate_super(): we changed it so that it considers all the
superblocks, but the message still assumes we're only looking at the
first one.

The change from %u to %llu is because we're changing from a constant to
a u64.

Fixes: 069ec957c35e ("btrfs: Refactor btrfs_check_super_valid")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c

index b1b53d713ee94bd3b74bef9275c526e5f4b8cc6d..3524976ccc1d818e2cdca2f993b2ba28950d7b99 100644 (file)
@@ -2531,8 +2531,8 @@ int btrfs_validate_super(const struct btrfs_fs_info *fs_info,
 
        if (mirror_num >= 0 &&
            btrfs_super_bytenr(sb) != btrfs_sb_offset(mirror_num)) {
-               btrfs_err(fs_info, "super offset mismatch %llu != %u",
-                         btrfs_super_bytenr(sb), BTRFS_SUPER_INFO_OFFSET);
+               btrfs_err(fs_info, "super offset mismatch %llu != %llu",
+                         btrfs_super_bytenr(sb), btrfs_sb_offset(mirror_num));
                ret = -EINVAL;
        }