diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-11-30 09:57:42 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-12-06 18:45:15 -0800 |
commit | a51489e140d302c7afae763eacf882a23513f7e4 (patch) | |
tree | 5ffa31c2b26eb2f9f1bf9183d366fa0a9b8c4ebc /fs | |
parent | e70fb328d5277297ea2d9169a3a046de6412d777 (diff) | |
download | lwn-a51489e140d302c7afae763eacf882a23513f7e4.tar.gz lwn-a51489e140d302c7afae763eacf882a23513f7e4.zip |
xfs: dump the recovered xattri log item if corruption happens
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 <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_attr_item.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_attr_item.c b/fs/xfs/xfs_attr_item.c index c4441eacf51c..c7c308d2f897 100644 --- a/fs/xfs/xfs_attr_item.c +++ b/fs/xfs/xfs_attr_item.c @@ -666,6 +666,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; |