diff mbox series

btrfs: tree-checker: fix iref size in error messages

Message ID a2c72015288d70b870ded1d6f8aaba1c2cf63f97.1705045187.git.cccheng@synology.com (mailing list archive)
State New, archived
Headers show
Series btrfs: tree-checker: fix iref size in error messages | expand

Commit Message

Chung-Chiang Cheng Jan. 12, 2024, 7:41 a.m. UTC
The error message should accurately reflect the size rather than the
size.

Signed-off-by: Chung-Chiang Cheng <cccheng@synology.com>
---
 fs/btrfs/tree-checker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Filipe Manana Jan. 12, 2024, 11:30 a.m. UTC | #1
On Fri, Jan 12, 2024 at 7:49 AM Chung-Chiang Cheng <cccheng@synology.com> wrote:
>
> The error message should accurately reflect the size rather than the
> size.

The second "size" should be "type".

>
> Signed-off-by: Chung-Chiang Cheng <cccheng@synology.com>

Other than that, it looks good.

Reviewed-by: Filipe Manana <fdmanana@suse.com>

> ---
>  fs/btrfs/tree-checker.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
> index 50fdc69fdddf..6eccf8496486 100644
> --- a/fs/btrfs/tree-checker.c
> +++ b/fs/btrfs/tree-checker.c
> @@ -1436,7 +1436,7 @@ static int check_extent_item(struct extent_buffer *leaf,
>                 if (unlikely(ptr + btrfs_extent_inline_ref_size(inline_type) > end)) {
>                         extent_err(leaf, slot,
>  "inline ref item overflows extent item, ptr %lu iref size %u end %lu",
> -                                  ptr, inline_type, end);
> +                                  ptr, btrfs_extent_inline_ref_size(inline_type), end);
>                         return -EUCLEAN;
>                 }
>
> --
> 2.34.1
>
>
David Sterba Jan. 12, 2024, 3:43 p.m. UTC | #2
On Fri, Jan 12, 2024 at 03:41:05PM +0800, Chung-Chiang Cheng wrote:
> The error message should accurately reflect the size rather than the
> size.
> 
> Signed-off-by: Chung-Chiang Cheng <cccheng@synology.com>

Applied, thanks.
Qu Wenruo Jan. 12, 2024, 8:35 p.m. UTC | #3
On 2024/1/12 18:11, Chung-Chiang Cheng wrote:
> The error message should accurately reflect the size rather than the
> size.
I guess the second "size" mean inline type?

Otherwise looks good.

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu

>
> Signed-off-by: Chung-Chiang Cheng <cccheng@synology.com>
> ---
>   fs/btrfs/tree-checker.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
> index 50fdc69fdddf..6eccf8496486 100644
> --- a/fs/btrfs/tree-checker.c
> +++ b/fs/btrfs/tree-checker.c
> @@ -1436,7 +1436,7 @@ static int check_extent_item(struct extent_buffer *leaf,
>   		if (unlikely(ptr + btrfs_extent_inline_ref_size(inline_type) > end)) {
>   			extent_err(leaf, slot,
>   "inline ref item overflows extent item, ptr %lu iref size %u end %lu",
> -				   ptr, inline_type, end);
> +				   ptr, btrfs_extent_inline_ref_size(inline_type), end);
>   			return -EUCLEAN;
>   		}
>
Chung-Chiang Cheng Jan. 14, 2024, 4:17 p.m. UTC | #4
> > The error message should accurately reflect the size rather than the
> > size.
> I guess the second "size" mean inline type?

Yes. I mistyped. It should be "type".

Thanks,
Cheng
diff mbox series

Patch

diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 50fdc69fdddf..6eccf8496486 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -1436,7 +1436,7 @@  static int check_extent_item(struct extent_buffer *leaf,
 		if (unlikely(ptr + btrfs_extent_inline_ref_size(inline_type) > end)) {
 			extent_err(leaf, slot,
 "inline ref item overflows extent item, ptr %lu iref size %u end %lu",
-				   ptr, inline_type, end);
+				   ptr, btrfs_extent_inline_ref_size(inline_type), end);
 			return -EUCLEAN;
 		}