Re: [PATCH 04/11] xfs_scrub: improve reporting of file metadata media errors

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

 



On 9/25/19 4:36 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> 
> Report media errors that map to data and attr fork extent maps.

Ok so I think the last patch removed reporting on files but this adds it
back...

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>


> Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> ---
>  scrub/phase6.c |   11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> 
> diff --git a/scrub/phase6.c b/scrub/phase6.c
> index 310ab36c..1013ba6d 100644
> --- a/scrub/phase6.c
> +++ b/scrub/phase6.c
> @@ -385,6 +385,17 @@ xfs_check_rmap_error_report(
>  		str_error(ctx, buf, _("media error in %s."), type);
>  	}
>  
> +	/* Report extent maps */
> +	if (map->fmr_flags & FMR_OF_EXTENT_MAP) {
> +		bool		attr = (map->fmr_flags & FMR_OF_ATTR_FORK);
> +
> +		scrub_render_ino_suffix(ctx, buf, DESCR_BUFSZ,
> +				map->fmr_owner, 0, " %s",
> +				attr ? _("extended attribute") :
> +				       _("file data"));
> +		str_error(ctx, buf, _("media error in extent map"));
> +	}
> +
>  	/*
>  	 * XXX: If we had a getparent() call we could report IO errors
>  	 * efficiently.  Until then, we'll have to scan the dir tree
> 



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux