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

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

Commit Message

Darrick J. Wong Oct. 22, 2019, 6:47 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>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
---
 scrub/phase6.c |    4 ++++
 1 file changed, 4 insertions(+)

Patch
diff mbox series

diff --git a/scrub/phase6.c b/scrub/phase6.c
index 3125bfd5..71a1922d 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