Re: [PATCH v2] xfs: check the disk address for hardware atomic writes
From: Pankaj Raghav (Samsung)
Date: Thu Nov 12 2026 - 18:13:09 EST
On Thu, Nov 12, 2026 at 09:41:56AM +0900, Daejun Park wrote:
> xfs_bmap_hw_atomic_write_possible() checks the alignment of the encoded
> br_startblock, not of the disk address. This was harmless while atomic
> writes were capped at the greatest power-of-two factor of the group
> size.
>
> Commit ec8f62cc109a ("xfs: don't limit software atomic writes by the
> group alignment") lifted that cap. The block layer can now fail a
> misaligned write with -EINVAL, and XFS does not fall back to COW.
> Unaligned AGs, such as those made by mkfs.xfs before 6.16, and rtgroups
> made by any version can hit this.
>
> Check the disk address instead.
>
> Fixes: ec8f62cc109a ("xfs: don't limit software atomic writes by the group alignment")
> Signed-off-by: Daejun Park <daejun7.park@xxxxxxxxxxx>
Looks good,
Reviewed-by: Pankaj Raghav (Samsung) <pankaj.raghav@xxxxxxxxx>
--
Pankaj