[05/11] xfs_scrub: don't report media errors on unwritten extents
diff mbox series

Message ID 156944739811.300131.17079426522479861861.stgit@magnolia
State New
Headers show
Series
  • xfs_scrub: fix IO error reporting
Related show

Commit Message

Darrick J. Wong Sept. 25, 2019, 9:36 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Don't report media errors for unwritten extents since no data has been
lost.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 scrub/phase6.c |    4 ++++
 1 file changed, 4 insertions(+)

Comments

Eric Sandeen Oct. 21, 2019, 4:54 p.m. UTC | #1
On 9/25/19 4:36 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Don't report media errors for unwritten extents since no data has been
> lost.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  scrub/phase6.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> 
> diff --git a/scrub/phase6.c b/scrub/phase6.c
> index 1013ba6d..ec821373 100644
> --- a/scrub/phase6.c
> +++ b/scrub/phase6.c
> @@ -372,6 +372,10 @@ xfs_check_rmap_error_report(
>  	uint64_t		err_physical = *(uint64_t *)arg;
>  	uint64_t		err_off;
>  
> +	/* Don't care about unwritten extents. */
> +	if (map->fmr_flags & FMR_OF_PREALLOC)
> +		return true;
> +
>  	if (err_physical > map->fmr_physical)
>  		err_off = err_physical - map->fmr_physical;
>  	else
>

Patch
diff mbox series

diff --git a/scrub/phase6.c b/scrub/phase6.c
index 1013ba6d..ec821373 100644
--- a/scrub/phase6.c
+++ b/scrub/phase6.c
@@ -372,6 +372,10 @@  xfs_check_rmap_error_report(
 	uint64_t		err_physical = *(uint64_t *)arg;
 	uint64_t		err_off;
 
+	/* Don't care about unwritten extents. */
+	if (map->fmr_flags & FMR_OF_PREALLOC)
+		return true;
+
 	if (err_physical > map->fmr_physical)
 		err_off = err_physical - map->fmr_physical;
 	else