Re: [PATCH 4/5] btrfs: disk-io: Show the timing of corrupted tree block explicitly

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

 




On 17.01.19 г. 9:48 ч., Qu Wenruo wrote:
> Just add one extra line to show when the corruption is detected.
> Currently only read time detection is possible.
> 
> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>

Reviewed-by: Nikolay Borisov <nborisov@xxxxxxxx>

> ---
>  fs/btrfs/disk-io.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 659bab9de03b..bc2379cb2091 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -652,11 +652,14 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
>  	 */
>  	if (found_level == 0 && btrfs_check_leaf_full(fs_info, eb)) {
>  		set_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags);
> +		btrfs_err(fs_info, "read time tree block corruption detected");
>  		ret = -EIO;
>  	}
>  
> -	if (found_level > 0 && btrfs_check_node(fs_info, eb))
> +	if (found_level > 0 && btrfs_check_node(fs_info, eb)) {
> +		btrfs_err(fs_info, "read time tree block corruption detected");
>  		ret = -EIO;
> +	}
>  
>  	if (!ret)
>  		set_extent_buffer_uptodate(eb);
> 



[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