| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH] xfs_repair: don't abort on bad directory leaf crc during leaf check |
| From: | "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> |
| Date: | Wed, 18 Mar 2015 16:22:39 -0700 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
longform_dir2_check_leaf() checks a directory leaf block to help
decide if we need to rebuild the directory. If the verifier fails
with a CRC or corrupt structure error, rebuild the directory instead
of aborting.
Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
---
repair/phase6.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/repair/phase6.c b/repair/phase6.c
index 1728609..c09b394 100644
--- a/repair/phase6.c
+++ b/repair/phase6.c
@@ -1951,7 +1951,12 @@ longform_dir2_check_leaf(
da_bno = mp->m_dirleafblk;
error = dir_read_buf(ip, da_bno, -1, &bp, &xfs_dir3_leaf1_buf_ops,
&fixit);
- if (error) {
+ if (error == EFSBADCRC || error == EFSCORRUPTED || fixit) {
+ do_warn(
+ _("leaf block %u for directory inode %" PRIu64 " bad CRC\n"),
+ da_bno, ip->i_ino);
+ return 1;
+ } else if (error) {
do_error(
_("can't read block %u for directory inode %" PRIu64 ", error %d\n"),
da_bno, ip->i_ino, error);
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] libxfs: don't write uninitialized heap contents into new directory blocks, Darrick J. Wong |
|---|---|
| Next by Date: | [PATCH] mkfs: default to CRC enabled filesystems, Dave Chinner |
| Previous by Thread: | [PATCH] libxfs: don't write uninitialized heap contents into new directory blocks, Darrick J. Wong |
| Next by Thread: | Re: [PATCH] xfs_repair: don't abort on bad directory leaf crc during leaf check, Brian Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |