mbox series

[0/3] btrfs-progs: check: enhance the csum mismatch error message

Message ID 20210826064036.21660-1-wqu@suse.com (mailing list archive)
Headers show
Series btrfs-progs: check: enhance the csum mismatch error message | expand

Message

Qu Wenruo Aug. 26, 2021, 6:40 a.m. UTC
This patchset will change the csum mismatch error message for data csum
mismatch, from the old almost meaningless output:

  [5/7] checking csums against data
  mirror 1 bytenr 13631488 csum 19 expected csum 152 <<<
  ERROR: errors found in csum tree

To a more human readable output:

  [5/7] checking csums against data
  mirror 1 bytenr 13631488 csum 0x13fec125 expected csum 0x98757625
  ERROR: errors found in csum tree

Qu Wenruo (3):
  btrfs-progs: move btrfs_format_csum() to common/utils.[ch]
  btrfs-progs: slightly enhance btrfs_format_csum()
  btrfs-progs: check: output proper csum values for --check-data-csum

 check/main.c            | 13 ++++++++++---
 common/utils.c          | 16 ++++++++++++++++
 common/utils.h          |  4 ++++
 kernel-shared/disk-io.c | 19 ++-----------------
 4 files changed, 32 insertions(+), 20 deletions(-)

Comments

David Sterba Aug. 26, 2021, 12:28 p.m. UTC | #1
On Thu, Aug 26, 2021 at 02:40:33PM +0800, Qu Wenruo wrote:
> This patchset will change the csum mismatch error message for data csum
> mismatch, from the old almost meaningless output:
> 
>   [5/7] checking csums against data
>   mirror 1 bytenr 13631488 csum 19 expected csum 152 <<<
>   ERROR: errors found in csum tree
> 
> To a more human readable output:
> 
>   [5/7] checking csums against data
>   mirror 1 bytenr 13631488 csum 0x13fec125 expected csum 0x98757625
>   ERROR: errors found in csum tree
> 
> Qu Wenruo (3):
>   btrfs-progs: move btrfs_format_csum() to common/utils.[ch]
>   btrfs-progs: slightly enhance btrfs_format_csum()
>   btrfs-progs: check: output proper csum values for --check-data-csum

Nice, added to devel, thanks.
Qu Wenruo Aug. 26, 2021, 12:50 p.m. UTC | #2
On 2021/8/26 下午8:28, David Sterba wrote:
> On Thu, Aug 26, 2021 at 02:40:33PM +0800, Qu Wenruo wrote:
>> This patchset will change the csum mismatch error message for data csum
>> mismatch, from the old almost meaningless output:
>>
>>    [5/7] checking csums against data
>>    mirror 1 bytenr 13631488 csum 19 expected csum 152 <<<
>>    ERROR: errors found in csum tree
>>
>> To a more human readable output:
>>
>>    [5/7] checking csums against data
>>    mirror 1 bytenr 13631488 csum 0x13fec125 expected csum 0x98757625
>>    ERROR: errors found in csum tree
>>
>> Qu Wenruo (3):
>>    btrfs-progs: move btrfs_format_csum() to common/utils.[ch]
>>    btrfs-progs: slightly enhance btrfs_format_csum()
>>    btrfs-progs: check: output proper csum values for --check-data-csum
>
> Nice, added to devel, thanks.
>

BTW, the enhancement is just some fixes found when trying to reproduce
this bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1997477

If someone in the list is able to reproduce this strange bug (btrfs
check --check-data-csum reports strange random data error), please let
me know.

Thanks,
Qu