Re: [PATCH v5.3 02/11] btrfs: disk-io: Show the timing of corrupted tree block explicitly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 20, 2019 at 02:27:40PM +0800, Qu Wenruo wrote:
> Just add one extra line to show when the corruption is detected.
> Currently only read time detection is possible.
> 
> The planned distinguish line would be:
>   read time:
>     <detail report>
>     block=XXXXX read time tree block corruption detected
> 
>   write time:
>     <detail report>
>     block=XXXXX write time tree block corruption detected
> 
> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
> Reviewed-by: Nikolay Borisov <nborisov@xxxxxxxx>
> Reviewed-by: Johannes Thumshirn <jthumshirn@xxxxxxx>
> ---
>  fs/btrfs/disk-io.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 6a7a1e168169..e8d4e238f832 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -659,6 +659,10 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
>  
>  	if (!ret)
>  		set_extent_buffer_uptodate(eb);
> +	else
> +		btrfs_err(fs_info,
> +			  "block=%llu read time tree block corruption detected",

This showed up in test btrfs/124, the logs below do not contain the
selftests outpt, that runs twice, only the last line is kept for
reference. That's the only message from the read/write time checks, the branch
is misc-next.

[ 5432.522317] BTRFS: selftest: running extent_map tests
[ 5432.573684] BTRFS: device fsid 519acff4-bdb4-4459-87b6-8f64ab1360cf devid 1 transid 7 /dev/vdb
[ 5432.578232] BTRFS info (device vdb): allowing degraded mounts
[ 5432.579703] BTRFS info (device vdb): disk space caching is enabled
[ 5432.581348] BTRFS info (device vdb): has skinny extents
[ 5432.583483] BTRFS warning (device vdb): devid 2 uuid dc83669e-dff7-4dee-bcc6-dbef1f470896 is missing
[ 5432.586115] BTRFS warning (device vdb): devid 2 uuid dc83669e-dff7-4dee-bcc6-dbef1f470896 is missing
[ 5513.939435] BTRFS: device fsid af58e3f0-8011-4d2a-b2bd-fc956d458a75 devid 1 transid 238 /dev/vda
[ 5513.992006] BTRFS info (device vdb): disk space caching is enabled
[ 5513.994398] BTRFS info (device vdb): has skinny extents
[ 5514.022526] BTRFS critical (device vdb): corrupt leaf: root=7 block=30474240 slot=0, invalid nritems, have 0 should not be 0 for non-root leaf
[ 5514.028271] BTRFS error (device vdb): block=30474240 read time tree block corruption detected
[ 5514.031529] BTRFS info (device vdb): read error corrected: ino 0 off 30474240 (dev /dev/vdc sector 18560)
[ 5514.034133] BTRFS info (device vdb): read error corrected: ino 0 off 30478336 (dev /dev/vdc sector 18568)
[ 5514.036662] BTRFS info (device vdb): read error corrected: ino 0 off 30482432 (dev /dev/vdc sector 18576)
[ 5514.039784] BTRFS info (device vdb): read error corrected: ino 0 off 30486528 (dev /dev/vdc sector 18584)
[ 5514.042383] BTRFS error (device vdb): bad tree block start, want 32210944 have 651061555542690057
[ 5514.044666] BTRFS info (device vdb): read error corrected: ino 0 off 32210944 (dev /dev/vdc sector 21952)
[ 5514.047146] BTRFS info (device vdb): read error corrected: ino 0 off 32215040 (dev /dev/vdc sector 21960)
[ 5514.049608] BTRFS info (device vdb): read error corrected: ino 0 off 32219136 (dev /dev/vdc sector 21968)
[ 5514.052034] BTRFS info (device vdb): read error corrected: ino 0 off 32223232 (dev /dev/vdc sector 21976)
[ 5514.056223] BTRFS error (device vdb): bad tree block start, want 32276480 have 0
[ 5514.058632] BTRFS info (device vdb): read error corrected: ino 0 off 32276480 (dev /dev/vdc sector 22080)
[ 5514.060448] BTRFS info (device vdb): read error corrected: ino 0 off 32280576 (dev /dev/vdc sector 22088)
[ 5514.064681] BTRFS info (device vdb): balance: start -d -m -s
[ 5514.066309] BTRFS info (device vdb): relocating block group 2479882240 flags data
[ 5514.068870] BTRFS error (device vdb): bad tree block start, want 31539200 have 723401728380766730
[ 5514.087183] BTRFS error (device vdb): bad tree block start, want 31457280 have 578721382704613384
[ 5514.087208] BTRFS error (device vdb): bad tree block start, want 31555584 have 723401728380766730
[ 5514.087244] BTRFS error (device vdb): bad tree block start, want 31522816 have 723401728380766730
[ 5514.107976] BTRFS error (device vdb): bad tree block start, want 31555584 have 723401728380766730
[ 5514.131715] BTRFS error (device vdb): bad tree block start, want 31440896 have 506381209866536711
[ 5514.131739] BTRFS error (device vdb): bad tree block start, want 31457280 have 578721382704613384
[ 5514.155830] BTRFS error (device vdb): bad tree block start, want 31457280 have 578721382704613384
[ 5527.886754] repair_io_failure: 54 callbacks suppressed
[ 5527.886761] BTRFS info (device vdb): read error corrected: ino 0 off 32145408 (dev /dev/vdc sector 21824)
[ 5527.895976] BTRFS info (device vdb): read error corrected: ino 0 off 32149504 (dev /dev/vdc sector 21832)
[ 5527.899446] BTRFS info (device vdb): read error corrected: ino 0 off 32153600 (dev /dev/vdc sector 21840)



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux