@@ -557,7 +557,7 @@ static int scrub_print_warning_inode(u64 inum, u64 offset, u64 num_bytes,
557
557
*/
558
558
for (i = 0 ; i < ipath -> fspath -> elem_cnt ; ++ i )
559
559
btrfs_warn_in_rcu (fs_info ,
560
- "%s at logical %llu on dev %s, physical %llu, root %llu, inode %llu, offset %llu, length %u, links %u (path: %s)" ,
560
+ "scrub: %s at logical %llu on dev %s, physical %llu root %llu inode %llu offset %llu length %u links %u (path: %s)" ,
561
561
swarn -> errstr , swarn -> logical ,
562
562
btrfs_dev_name (swarn -> dev ),
563
563
swarn -> physical ,
@@ -571,7 +571,7 @@ static int scrub_print_warning_inode(u64 inum, u64 offset, u64 num_bytes,
571
571
572
572
err :
573
573
btrfs_warn_in_rcu (fs_info ,
574
- "%s at logical %llu on dev %s, physical %llu, root %llu, inode %llu, offset %llu: path resolving failed with ret=%d" ,
574
+ "scrub: %s at logical %llu on dev %s, physical %llu root %llu inode %llu offset %llu: path resolving failed with ret=%d" ,
575
575
swarn -> errstr , swarn -> logical ,
576
576
btrfs_dev_name (swarn -> dev ),
577
577
swarn -> physical ,
@@ -596,7 +596,7 @@ static void scrub_print_common_warning(const char *errstr, struct btrfs_device *
596
596
597
597
/* Super block error, no need to search extent tree. */
598
598
if (is_super ) {
599
- btrfs_warn_in_rcu (fs_info , "%s on device %s, physical %llu" ,
599
+ btrfs_warn_in_rcu (fs_info , "scrub: %s on device %s, physical %llu" ,
600
600
errstr , btrfs_dev_name (dev ), physical );
601
601
return ;
602
602
}
@@ -631,14 +631,14 @@ static void scrub_print_common_warning(const char *errstr, struct btrfs_device *
631
631
& ref_level );
632
632
if (ret < 0 ) {
633
633
btrfs_warn (fs_info ,
634
- " failed to resolve tree backref for logical %llu: %d" ,
635
- swarn .logical , ret );
634
+ "scrub: failed to resolve tree backref for logical %llu: %d" ,
635
+ swarn .logical , ret );
636
636
break ;
637
637
}
638
638
if (ret > 0 )
639
639
break ;
640
640
btrfs_warn_in_rcu (fs_info ,
641
- "%s at logical %llu on dev %s, physical %llu: metadata %s (level %d) in tree %llu" ,
641
+ "scrub: %s at logical %llu on dev %s, physical %llu: metadata %s (level %d) in tree %llu" ,
642
642
errstr , swarn .logical , btrfs_dev_name (dev ),
643
643
swarn .physical , (ref_level ? "node" : "leaf" ),
644
644
ref_level , ref_root );
@@ -718,7 +718,7 @@ static void scrub_verify_one_metadata(struct scrub_stripe *stripe, int sector_nr
718
718
scrub_bitmap_set_meta_error (stripe , sector_nr , sectors_per_tree );
719
719
scrub_bitmap_set_error (stripe , sector_nr , sectors_per_tree );
720
720
btrfs_warn_rl (fs_info ,
721
- " tree block %llu mirror %u has bad bytenr, has %llu want %llu" ,
721
+ "scrub: tree block %llu mirror %u has bad bytenr, has %llu want %llu" ,
722
722
logical , stripe -> mirror_num ,
723
723
btrfs_stack_header_bytenr (header ), logical );
724
724
return ;
@@ -728,7 +728,7 @@ static void scrub_verify_one_metadata(struct scrub_stripe *stripe, int sector_nr
728
728
scrub_bitmap_set_meta_error (stripe , sector_nr , sectors_per_tree );
729
729
scrub_bitmap_set_error (stripe , sector_nr , sectors_per_tree );
730
730
btrfs_warn_rl (fs_info ,
731
- " tree block %llu mirror %u has bad fsid, has %pU want %pU" ,
731
+ "scrub: tree block %llu mirror %u has bad fsid, has %pU want %pU" ,
732
732
logical , stripe -> mirror_num ,
733
733
header -> fsid , fs_info -> fs_devices -> fsid );
734
734
return ;
@@ -738,7 +738,7 @@ static void scrub_verify_one_metadata(struct scrub_stripe *stripe, int sector_nr
738
738
scrub_bitmap_set_meta_error (stripe , sector_nr , sectors_per_tree );
739
739
scrub_bitmap_set_error (stripe , sector_nr , sectors_per_tree );
740
740
btrfs_warn_rl (fs_info ,
741
- " tree block %llu mirror %u has bad chunk tree uuid, has %pU want %pU" ,
741
+ "scrub: tree block %llu mirror %u has bad chunk tree uuid, has %pU want %pU" ,
742
742
logical , stripe -> mirror_num ,
743
743
header -> chunk_tree_uuid , fs_info -> chunk_tree_uuid );
744
744
return ;
@@ -760,7 +760,7 @@ static void scrub_verify_one_metadata(struct scrub_stripe *stripe, int sector_nr
760
760
scrub_bitmap_set_meta_error (stripe , sector_nr , sectors_per_tree );
761
761
scrub_bitmap_set_error (stripe , sector_nr , sectors_per_tree );
762
762
btrfs_warn_rl (fs_info ,
763
- " tree block %llu mirror %u has bad csum, has " CSUM_FMT " want " CSUM_FMT ,
763
+ "scrub: tree block %llu mirror %u has bad csum, has " CSUM_FMT " want " CSUM_FMT ,
764
764
logical , stripe -> mirror_num ,
765
765
CSUM_FMT_VALUE (fs_info -> csum_size , on_disk_csum ),
766
766
CSUM_FMT_VALUE (fs_info -> csum_size , calculated_csum ));
@@ -771,7 +771,7 @@ static void scrub_verify_one_metadata(struct scrub_stripe *stripe, int sector_nr
771
771
scrub_bitmap_set_meta_gen_error (stripe , sector_nr , sectors_per_tree );
772
772
scrub_bitmap_set_error (stripe , sector_nr , sectors_per_tree );
773
773
btrfs_warn_rl (fs_info ,
774
- " tree block %llu mirror %u has bad generation, has %llu want %llu" ,
774
+ "scrub: tree block %llu mirror %u has bad generation, has %llu want %llu" ,
775
775
logical , stripe -> mirror_num ,
776
776
btrfs_stack_header_generation (header ),
777
777
stripe -> sectors [sector_nr ].generation );
@@ -814,7 +814,7 @@ static void scrub_verify_one_sector(struct scrub_stripe *stripe, int sector_nr)
814
814
*/
815
815
if (unlikely (sector_nr + sectors_per_tree > stripe -> nr_sectors )) {
816
816
btrfs_warn_rl (fs_info ,
817
- "tree block at %llu crosses stripe boundary %llu" ,
817
+ "scrub: tree block at %llu crosses stripe boundary %llu" ,
818
818
stripe -> logical +
819
819
(sector_nr << fs_info -> sectorsize_bits ),
820
820
stripe -> logical );
@@ -1046,12 +1046,12 @@ static void scrub_stripe_report_errors(struct scrub_ctx *sctx,
1046
1046
if (repaired ) {
1047
1047
if (dev ) {
1048
1048
btrfs_err_rl_in_rcu (fs_info ,
1049
- " fixed up error at logical %llu on dev %s physical %llu" ,
1049
+ "scrub: fixed up error at logical %llu on dev %s physical %llu" ,
1050
1050
stripe -> logical , btrfs_dev_name (dev ),
1051
1051
physical );
1052
1052
} else {
1053
1053
btrfs_err_rl_in_rcu (fs_info ,
1054
- " fixed up error at logical %llu on mirror %u" ,
1054
+ "scrub: fixed up error at logical %llu on mirror %u" ,
1055
1055
stripe -> logical , stripe -> mirror_num );
1056
1056
}
1057
1057
continue ;
@@ -1060,12 +1060,12 @@ static void scrub_stripe_report_errors(struct scrub_ctx *sctx,
1060
1060
/* The remaining are all for unrepaired. */
1061
1061
if (dev ) {
1062
1062
btrfs_err_rl_in_rcu (fs_info ,
1063
- " unable to fixup (regular) error at logical %llu on dev %s physical %llu" ,
1063
+ "scrub: unable to fixup (regular) error at logical %llu on dev %s physical %llu" ,
1064
1064
stripe -> logical , btrfs_dev_name (dev ),
1065
1065
physical );
1066
1066
} else {
1067
1067
btrfs_err_rl_in_rcu (fs_info ,
1068
- " unable to fixup (regular) error at logical %llu on mirror %u" ,
1068
+ "scrub: unable to fixup (regular) error at logical %llu on mirror %u" ,
1069
1069
stripe -> logical , stripe -> mirror_num );
1070
1070
}
1071
1071
@@ -1593,8 +1593,7 @@ static int sync_write_pointer_for_zoned(struct scrub_ctx *sctx, u64 logical,
1593
1593
physical ,
1594
1594
sctx -> write_pointer );
1595
1595
if (ret )
1596
- btrfs_err (fs_info ,
1597
- "zoned: failed to recover write pointer" );
1596
+ btrfs_err (fs_info , "scrub: zoned: failed to recover write pointer" );
1598
1597
}
1599
1598
mutex_unlock (& sctx -> wr_lock );
1600
1599
btrfs_dev_clear_zone_empty (sctx -> wr_tgtdev , physical );
@@ -1658,7 +1657,7 @@ static int scrub_find_fill_first_stripe(struct btrfs_block_group *bg,
1658
1657
int ret ;
1659
1658
1660
1659
if (unlikely (!extent_root || !csum_root )) {
1661
- btrfs_err (fs_info , "no valid extent or csum root for scrub " );
1660
+ btrfs_err (fs_info , "scrub: no valid extent or csum root found " );
1662
1661
return - EUCLEAN ;
1663
1662
}
1664
1663
memset (stripe -> sectors , 0 , sizeof (struct scrub_sector_verification ) *
@@ -1907,7 +1906,7 @@ static bool stripe_has_metadata_error(struct scrub_stripe *stripe)
1907
1906
struct btrfs_fs_info * fs_info = stripe -> bg -> fs_info ;
1908
1907
1909
1908
btrfs_err (fs_info ,
1910
- " stripe %llu has unrepaired metadata sector at %llu" ,
1909
+ "scrub: stripe %llu has unrepaired metadata sector at logical %llu" ,
1911
1910
stripe -> logical ,
1912
1911
stripe -> logical + (i << fs_info -> sectorsize_bits ));
1913
1912
return true;
@@ -2167,7 +2166,7 @@ static int scrub_raid56_parity_stripe(struct scrub_ctx *sctx,
2167
2166
bitmap_and (& error , & error , & has_extent , stripe -> nr_sectors );
2168
2167
if (!bitmap_empty (& error , stripe -> nr_sectors )) {
2169
2168
btrfs_err (fs_info ,
2170
- "unrepaired sectors detected, full stripe %llu data stripe %u errors %*pbl" ,
2169
+ "scrub: unrepaired sectors detected, full stripe %llu data stripe %u errors %*pbl" ,
2171
2170
full_stripe_start , i , stripe -> nr_sectors ,
2172
2171
& error );
2173
2172
ret = - EIO ;
@@ -2789,14 +2788,14 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
2789
2788
ro_set = 0 ;
2790
2789
} else if (ret == - ETXTBSY ) {
2791
2790
btrfs_warn (fs_info ,
2792
- " skipping scrub of block group %llu due to active swapfile" ,
2791
+ "scrub: skipping scrub of block group %llu due to active swapfile" ,
2793
2792
cache -> start );
2794
2793
scrub_pause_off (fs_info );
2795
2794
ret = 0 ;
2796
2795
goto skip_unfreeze ;
2797
2796
} else {
2798
- btrfs_warn (fs_info ,
2799
- "failed setting block group ro: %d" , ret );
2797
+ btrfs_warn (fs_info , "scrub: failed setting block group ro: %d" ,
2798
+ ret );
2800
2799
btrfs_unfreeze_block_group (cache );
2801
2800
btrfs_put_block_group (cache );
2802
2801
scrub_pause_off (fs_info );
@@ -2898,13 +2897,13 @@ static int scrub_one_super(struct scrub_ctx *sctx, struct btrfs_device *dev,
2898
2897
ret = btrfs_check_super_csum (fs_info , sb );
2899
2898
if (ret != 0 ) {
2900
2899
btrfs_err_rl (fs_info ,
2901
- " super block at physical %llu devid %llu has bad csum" ,
2900
+ "scrub: super block at physical %llu devid %llu has bad csum" ,
2902
2901
physical , dev -> devid );
2903
2902
return - EIO ;
2904
2903
}
2905
2904
if (btrfs_super_generation (sb ) != generation ) {
2906
2905
btrfs_err_rl (fs_info ,
2907
- "super block at physical %llu devid %llu has bad generation %llu expect %llu" ,
2906
+ "scrub: super block at physical %llu devid %llu has bad generation %llu expect %llu" ,
2908
2907
physical , dev -> devid ,
2909
2908
btrfs_super_generation (sb ), generation );
2910
2909
return - EUCLEAN ;
@@ -3065,7 +3064,7 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
3065
3064
!test_bit (BTRFS_DEV_STATE_WRITEABLE , & dev -> dev_state )) {
3066
3065
mutex_unlock (& fs_info -> fs_devices -> device_list_mutex );
3067
3066
btrfs_err_in_rcu (fs_info ,
3068
- "scrub on devid %llu: filesystem on %s is not writable" ,
3067
+ "scrub: devid %llu: filesystem on %s is not writable" ,
3069
3068
devid , btrfs_dev_name (dev ));
3070
3069
ret = - EROFS ;
3071
3070
goto out ;
0 commit comments