btrfs: fix error message in btrfs_validate_super()
PATCH 1/1 btrfs: fix error message in btrfs_validate_super()
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.
--- fs/btrfs/disk-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/disk-io.c +2 -2
@@ -2533,8 +2533,8 @@ int btrfs_validate_super(const struct btrfs_fs_info *fs_info,if (unlikely (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 ; }
Signature · 1 line
2.52.0
Quoted 10 lines · Mark Harmstone
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.
Signed-off-by Mark Harmstone <[email protected]>Fixes 069ec957c35e ("btrfs: Refactor btrfs_check_super_valid")
Thanks,
Qu
Quoted 19 lines
--- fs/btrfs/disk-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)fs/btrfs/disk-io.c +2
-2@@ -2533,8 +2533,8 @@ int btrfs_validate_super(const struct btrfs_fs_info *fs_info,if (unlikely (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 ; }
Quoted 10 lines · Mark Harmstone
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.
Signed-off-by Mark Harmstone <[email protected]>Fixes 069ec957c35e ("btrfs: Refactor btrfs_check_super_valid")
FYI I've edited the subjects of the error message fixing patches to be more specific what is being fixed now that there are a few of them.