diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-08-06 11:06:35 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-08-06 14:48:50 -0700 |
commit | 34a2815117a5c1ab0a6e1cceaefff973f06d5a22 (patch) | |
tree | 0736d91465728b771166c7c01789a96956a07362 /fs/xfs/xfs_extfree_item.c | |
parent | 58663feeda1ad2d7b50a7183c1958b80c8a8201f (diff) |
xfs: dump log intent items that cannot be recovered due to corruptionother-stuff-for-5.15_2021-08-06
If we try to recover a log intent item and the operation fails due to
filesystem corruption, dump the contents of the item to the log for
further analysis.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Diffstat (limited to 'fs/xfs/xfs_extfree_item.c')
-rw-r--r-- | fs/xfs/xfs_extfree_item.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c index 2424230ca2c3..3f8a0713573a 100644 --- a/fs/xfs/xfs_extfree_item.c +++ b/fs/xfs/xfs_extfree_item.c @@ -629,6 +629,9 @@ xfs_efi_item_recover( error = xfs_trans_free_extent(tp, efdp, extp->ext_start, extp->ext_len, &XFS_RMAP_OINFO_ANY_OWNER, false); + if (error == -EFSCORRUPTED) + XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp, + extp, sizeof(*extp)); if (error) goto abort_error; |