aboutsummaryrefslogtreecommitdiffstats
path: root/scrub/phase6.c
diff options
context:
space:
mode:
Diffstat (limited to 'scrub/phase6.c')
-rw-r--r--scrub/phase6.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/scrub/phase6.c b/scrub/phase6.c
index 33c3c8bde3..99a32bc796 100644
--- a/scrub/phase6.c
+++ b/scrub/phase6.c
@@ -397,7 +397,18 @@ report_ioerr_fsmap(
snprintf(buf, DESCR_BUFSZ, _("disk offset %"PRIu64),
(uint64_t)map->fmr_physical + err_off);
type = decode_special_owner(map->fmr_owner);
- str_corrupt(ctx, buf, _("media error in %s."), type);
+ /*
+ * On filesystems that don't store reverse mappings, the
+ * GETFSMAP call returns OWNER_UNKNOWN for allocated space.
+ * We'll have to let the directory tree walker find the file
+ * that lost data.
+ */
+ if (!(ctx->mnt.fsgeom.flags & XFS_FSOP_GEOM_FLAGS_RMAPBT) &&
+ map->fmr_owner == XFS_FMR_OWN_UNKNOWN) {
+ str_info(ctx, buf, _("media error detected."));
+ } else {
+ str_corrupt(ctx, buf, _("media error in %s."), type);
+ }
}
/* Report extent maps */