| To: | david@xxxxxxxxxxxxx, darrick.wong@xxxxxxxxxx |
|---|---|
| Subject: | [PATCH 05/10] xfs_repair: force not-so-bad bmbt blocks back through the verifier |
| From: | "Darrick J. Wong" <djwong@xxxxxxxxxxxxxxxx> |
| Date: | Fri, 14 Aug 2015 18:44:10 -0700 |
| Cc: | xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20150815014338.1839.37405.stgit@xxxxxxxxxxxxxxxx> |
| References: | <20150815014338.1839.37405.stgit@xxxxxxxxxxxxxxxx> |
| User-agent: | StGit/0.17.1-dirty |
If during prefetch we encounter a bmbt block that fails the CRC check
due to corruption in the unused part of the block, force the buffer
back through the non-prefetch verifiers later so that the CRC is
updated. Otherwise, the bad checksum goes unfixed and the kernel will
still flag the bmbt block as invalid.
Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
---
repair/prefetch.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/repair/prefetch.c b/repair/prefetch.c
index 8b261ae..fc7097f 100644
--- a/repair/prefetch.c
+++ b/repair/prefetch.c
@@ -276,6 +276,14 @@ pf_scan_lbtree(
XFS_BUF_SET_PRIORITY(bp, isadir ? B_DIR_BMAP : B_BMAP);
+ /*
+ * Make this bmbt buffer go back through the verifiers later so that
+ * we correct checksum errors stemming from bitflips in the unused
+ * parts of the bmbt block.
+ */
+ if (bp->b_error == -EFSBADCRC || bp->b_error == -EFSCORRUPTED)
+ bp->b_flags |= LIBXFS_B_UNCHECKED;
+
rc = (*func)(XFS_BUF_TO_BLOCK(bp), level - 1, isadir, args);
libxfs_putbuf(bp);
|
| Previous by Date: | [PATCH 03/10] xfs_repair: ignore "repaired" flag after we decide to clear xattr block, Darrick J. Wong |
|---|---|
| Next by Date: | [PATCH 06/10] xfs_repair: mark unreachable prefetched metadata blocks stale, Darrick J. Wong |
| Previous by Thread: | Re: [PATCH 03/10] xfs_repair: ignore "repaired" flag after we decide to clear xattr block, Darrick J. Wong |
| Next by Thread: | Re: [PATCH 05/10] xfs_repair: force not-so-bad bmbt blocks back through the verifier, Eric Sandeen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |