* [PATCH] btrfs: fix error message in btrfs_validate_super()
@ 2026-02-17 18:53 Mark Harmstone
2026-02-17 21:04 ` Qu Wenruo
2026-02-24 17:30 ` David Sterba
0 siblings, 2 replies; 3+ messages in thread
From: Mark Harmstone @ 2026-02-17 18:53 UTC (permalink / raw)
To: linux-btrfs, wqu; +Cc: 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 <mark@harmstone.com>
Fixes: 069ec957c35e ("btrfs: Refactor btrfs_check_super_valid")
---
fs/btrfs/disk-io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 600287ac8eb7..f39008591631 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -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;
}
--
2.52.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] btrfs: fix error message in btrfs_validate_super()
2026-02-17 18:53 [PATCH] btrfs: fix error message in btrfs_validate_super() Mark Harmstone
@ 2026-02-17 21:04 ` Qu Wenruo
2026-02-24 17:30 ` David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2026-02-17 21:04 UTC (permalink / raw)
To: Mark Harmstone, linux-btrfs, wqu
在 2026/2/18 05:23, 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 <mark@harmstone.com>
> Fixes: 069ec957c35e ("btrfs: Refactor btrfs_check_super_valid")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
> ---
> fs/btrfs/disk-io.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 600287ac8eb7..f39008591631 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -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;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] btrfs: fix error message in btrfs_validate_super()
2026-02-17 18:53 [PATCH] btrfs: fix error message in btrfs_validate_super() Mark Harmstone
2026-02-17 21:04 ` Qu Wenruo
@ 2026-02-24 17:30 ` David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2026-02-24 17:30 UTC (permalink / raw)
To: Mark Harmstone; +Cc: linux-btrfs, wqu
On Tue, Feb 17, 2026 at 06:53:19PM +0000, Mark Harmstone wrote:
> 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 <mark@harmstone.com>
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-24 17:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-17 18:53 [PATCH] btrfs: fix error message in btrfs_validate_super() Mark Harmstone
2026-02-17 21:04 ` Qu Wenruo
2026-02-24 17:30 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox