Re: [PATCH v2 11/13] xfs: Only free full extents for forcealign

From: Christoph Hellwig
Date: Sat Jul 06 2024 - 04:00:03 EST


> + if (xfs_inode_has_forcealign(ip)) {
> + startoffset_fsb = roundup_64(startoffset_fsb, ip->i_extsize);
> + endoffset_fsb = rounddown_64(endoffset_fsb, ip->i_extsize);
> + } else if (xfs_inode_has_bigrtalloc(ip)) {
> startoffset_fsb = xfs_rtb_roundup_rtx(mp, startoffset_fsb);
> endoffset_fsb = xfs_rtb_rounddown_rtx(mp, endoffset_fsb);

And just like elsewhere this should use common helpers.

I mean in the end the rtextsize is basically a special case of force
align. The checks should be able to cover both easily.