diff mbox series

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

Message ID 156685510004.2843133.6588901612950010876.stgit@magnolia (mailing list archive)
State Superseded, archived
Headers show
Series xfs_scrub: fix IO error reporting | expand

Commit Message

Darrick J. Wong Aug. 26, 2019, 9:31 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(+)
diff mbox series

Patch

diff --git a/scrub/phase6.c b/scrub/phase6.c
index d6688418..f5b57185 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