]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs_scrub: don't report media errors in specially-owned areas as file data
authorDarrick J. Wong <djwong@kernel.org>
Thu, 4 Jun 2026 06:06:56 +0000 (23:06 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Thu, 11 Jun 2026 10:26:04 +0000 (12:26 +0200)
If a media error occurs for some disk space that has a "special" owner,
we mustn't try to walk parent pointers because special owners are not
files.  If it's an extent map, we shouldn't accidentally fall into
reporting that as file data loss.  This was, like the rest, found by
Codex.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
scrub/phase6.c

index c273420d42ca1465a6757d25b9fdefae6d2a553b..cd9bb26bf88628065a46308136e70c403aff8e41 100644 (file)
@@ -436,6 +436,8 @@ report_ioerr_fsmap(
                } else {
                        str_corrupt(ctx, buf, _("media error in %s."), type);
                }
+
+               return 0;
        }
 
        if (can_use_pptrs(ctx)) {
@@ -454,6 +456,8 @@ report_ioerr_fsmap(
                                attr ? _("extended attribute") :
                                       _("file data"));
                str_corrupt(ctx, buf, _("media error in extent map"));
+
+               return 0;
        }
 
        /*