Skip to content

xfs: handle inode extent count mismatch

Dave Chinner linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xfs: transactionless xfs_bunmapi shouldn't do format conversionfs/xfs/libxfs/xfs_bmap.c+13 -19 replies
2/2xfs: More robust inode extent count validationfs/xfs/libxfs/xfs_format.h fs/xfs/libxfs/xfs_inode_buf.c+48 -294 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchDarrick J. Wong
1/2
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] xfs: handle inode extent count mismatch

Hi folks,

Wen Xu provided an image that caused a crash allocating an extent. The AGFL was corrupt, as was the inode data fork extent count. The combination of the two corruptions could lead to a delalloc extent being allocated on write, and then when allocation fails because the AGFL was corrupt, it would try to punch out the delalloc extent which would then try to convert the format of the extent list in the inode data fork without a transaction. This would crash.

The following two patches address this - the first makes xfs_bunmapi() return EFSCORRUPTED if it tries to change the inode fork format without a transaction context and avoids the crash. THe second makes the inode verifier detect this specific inode fork corruption and prevents any attempt to access it with EFSCORRUPTED.

Comments?

Cheers,

Dave.