Hi John. On Mon, Mar 03, 2025 at 05:11:19PM +0000, John Garry wrote: > Now that CoW-based atomic writes are supported, update the max size of an > atomic write. > > For simplicity, limit at the max of what the mounted bdev can support in > terms of atomic write limits. Maybe in future we will have a better way > to advertise this optimised limit. > > In addition, the max atomic write size needs to be aligned to the agsize. > Limit the size of atomic writes to the greatest power-of-two factor of the > agsize so that allocations for an atomic write will always be aligned > compatibly with the alignment requirements of the storage. > > For RT inode, just limit to 1x block, even though larger can be supported > in future. > > Reviewed-by: "Darrick J. Wong" <djwong@xxxxxxxxxx> > Signed-off-by: John Garry <john.g.garry@xxxxxxxxxx> > --- > fs/xfs/xfs_iops.c | 13 ++++++++++++- > fs/xfs/xfs_mount.c | 28 ++++++++++++++++++++++++++++ > fs/xfs/xfs_mount.h | 1 + > 3 files changed, 41 insertions(+), 1 deletion(-) > > diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h > index fbed172d6770..bc96b8214173 100644 > --- a/fs/xfs/xfs_mount.h > +++ b/fs/xfs/xfs_mount.h > @@ -198,6 +198,7 @@ typedef struct xfs_mount { > bool m_fail_unmount; > bool m_finobt_nores; /* no per-AG finobt resv. */ > bool m_update_sb; /* sb needs update in mount */ > + xfs_extlen_t awu_max; /* data device max atomic write */ Could you please rename this to something else? All fields within xfs_mount follows the same pattern m_<name>. Perhaps m_awu_max? I was going to send a patch replacing it once I had this merged, but giving Dave's new comments, and the conflicts with zoned devices, you'll need to send a V5, so, please include this change if nobody else has any objections on keeping the xfs_mount naming convention. Carlos. > > /* > * Bitsets of per-fs metadata that have been checked and/or are sick. > -- > 2.31.1 >