xfs
[Top] [All Lists]

[PATCH] use XFS_CORRUPTION_ERROR in xfs_btree_check_sblock

To: xfs mailing list <xfs@xxxxxxxxxxx>
Subject: [PATCH] use XFS_CORRUPTION_ERROR in xfs_btree_check_sblock
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Mon, 20 Jul 2009 10:52:15 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)
In Red Hat Bug 512552
 - Can't write to XFS mount during raid5 resync

a user ran into corruption while resyncing a raid, and we failed
a consistency test, but didn't get much more info; it'd be nice
to call XFS_CORRUPTION_ERROR here so we can see the buffer
contents.

Compile-tested only...

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
---

diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c
index e9df995..2671738 100644
--- a/fs/xfs/xfs_btree.c
+++ b/fs/xfs/xfs_btree.c
@@ -120,8 +120,8 @@ xfs_btree_check_sblock(
                        XFS_RANDOM_BTREE_CHECK_SBLOCK))) {
                if (bp)
                        xfs_buftrace("SBTREE ERROR", bp);
-               XFS_ERROR_REPORT("xfs_btree_check_sblock", XFS_ERRLEVEL_LOW,
-                                cur->bc_mp);
+               XFS_CORRUPTION_ERROR("xfs_btree_check_sblock",
+                       XFS_ERRLEVEL_LOW, cur->bc_mp, block);
                return XFS_ERROR(EFSCORRUPTED);
        }
        return 0;

<Prev in Thread] Current Thread [Next in Thread>