Re: [PATCH -next v5 6/8] xfs: reserve blocks for truncating large realtime inode

From: Christoph Hellwig
Date: Fri Jun 14 2024 - 01:58:59 EST


On Thu, Jun 13, 2024 at 05:00:31PM +0800, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@xxxxxxxxxx>
>
> For a large realtime inode, __xfs_bunmapi() could split the tail written
> extent and convert the later one that beyond EOF block to unwritten, but
> it couldn't work as expected on truncate down now since the reserved
> block is zero in xfs_setattr_size(), fix this by reserving
> XFS_DIOSTRAT_SPACE_RES blocks for large realtime inode.

Looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>