[RFC PATCH 8/8] xfs: Lift the bs == ps restriction for HW buffered atomic writes

From: Ojaswin Mujoo

Date: Wed Nov 12 2025 - 06:08:50 EST


Now that we support bs < ps for HW atomic writes, lift this restirction from XFS
statx reporting

Signed-off-by: Ojaswin Mujoo <ojaswin@xxxxxxxxxxxxx>
---
fs/xfs/xfs_iops.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index 67d370947d95..5bd31aacf514 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -622,10 +622,9 @@ xfs_get_atomic_write_min(
return bs;
}
/*
- * Buffered IO only supports hw single block atomic writes and bs == ps
- * configurations.
+ * Buffered IO only supports hw single block atomic writes
*/
- if (xfs_inode_can_hw_atomic_write(ip) && bs == PAGE_SIZE)
+ if (xfs_inode_can_hw_atomic_write(ip))
return bs;

return 0;
@@ -661,10 +660,9 @@ xfs_get_atomic_write_max(
return XFS_FSB_TO_B(mp, mp->m_groups[XG_TYPE_AG].awu_max);
}
/*
- * Buffered IO only supports hw single block atomic writes and bs == ps
- * configurations.
+ * Buffered IO only supports hw single block atomic writes
*/
- if (xfs_inode_can_hw_atomic_write(ip) && bs == PAGE_SIZE)
+ if (xfs_inode_can_hw_atomic_write(ip))
return bs;

return 0;
--
2.51.0