[PATCH 6.6 2/4] xfs: dump the recovered xattri log item if corruption happens
Fedor Pchelkin <[email protected]> Sat, 22 Mar 2025 17:34:13 +0300
| Newsgroups | dev.linux.lists.xfs-stable,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
From: Darrick J. Wong <[email protected]> commit a51489e140d302c7afae763eacf882a23513f7e4 upstream. If xfs_attri_item_recover receives a corruption error when it tries to finish a recovered log intent item, it should dump the log item for debugging, just like all the other log intent items. Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Fedor Pchelkin <[email protected]> --- fs/xfs/xfs_attr_item.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/xfs/xfs_attr_item.c b/fs/xfs/xfs_attr_item.c index 2b73132fa607..8ed840c189cb 100644 --- a/fs/xfs/xfs_attr_item.c +++ b/fs/xfs/xfs_attr_item.c @@ -672,6 +672,10 @@ xfs_attri_item_recover( xfs_irele(ip); return 0; } + if (error == -EFSCORRUPTED) + XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp, + &attrip->attri_format, + sizeof(attrip->attri_format)); if (error) { xfs_trans_cancel(tp); goto out_unlock; -- 2.49.0