Re: [PATCH v5 02/10] xfs: Switch atomic write size check in xfs_file_write_iter()

From: John Garry
Date: Wed Mar 12 2025 - 04:22:16 EST


On 12/03/2025 07:17, Christoph Hellwig wrote:
+void
+xfs_get_atomic_write_attr(
+ struct xfs_inode *ip,
+ unsigned int *unit_min,
+ unsigned int *unit_max)
+{
+ if (!xfs_inode_can_atomicwrite(ip)) {
+ *unit_min = *unit_max = 0;
+ return;
+ }
+
+ *unit_min = *unit_max = ip->i_mount->m_sb.sb_blocksize;

This is a rather ugly interface. Why not have separate helpers for
the min and max values that can just return the actual values?


ok, I can make that change.

Thanks,
John