Re: [PATCH 4/6] xfs: actually recover intended file sizes in xfs_xmi_item_recover_intent

Christoph Hellwig <[email protected]>
Newsgroups org.kernel.vger.linux-xfs,org.kernel.vger.stable
Message-ID <[email protected]>
On Wed, Aug 12, 2026 at 10:26:27PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <[email protected]>
> 
> LOLLM points out that xfs_xmi_item_recover_intent doesn't actually
> restore the isize1 and isize2 fields that were recovered from an
> unfinished exchmaps log intent item.  Instead, xfs_exchmaps_init_intent
> sets the wrong isize values from the recovered inodes, with the result
> that the file sizes are not set correctly when item recovery finishes.
> Fix this by restoring isize[12] from the log item.

Eww.  Can we come up with a test cases for this that uses error
injection to shut down the file system at just the right time?

The fix looks good:

Reviewed-by: Christoph Hellwig <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.