diff options
| author | John Garry <[email protected]> | 2025-05-07 21:18:21 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2025-05-07 21:25:30 +0000 |
| commit | 5d894321c49e61379189b0ff605f316e39cbd1e9 (patch) | |
| tree | ad54abd74941ac7eca4cbf17c2c42232f9d92b70 /fs/xfs/xfs_buf.c | |
| parent | xfs: allow ro mounts if rtdev or logdev are read-only (diff) | |
| download | kernel-5d894321c49e61379189b0ff605f316e39cbd1e9.tar.gz kernel-5d894321c49e61379189b0ff605f316e39cbd1e9.zip | |
fs: add atomic write unit max opt to statx
XFS will be able to support large atomic writes (atomic write > 1x block)
in future. This will be achieved by using different operating methods,
depending on the size of the write.
Specifically a new method of operation based in FS atomic extent remapping
will be supported in addition to the current HW offload-based method.
The FS method will generally be appreciably slower performing than the
HW-offload method. However the FS method will be typically able to
contribute to achieving a larger atomic write unit max limit.
XFS will support a hybrid mode, where HW offload method will be used when
possible, i.e. HW offload is used when the length of the write is
supported, and for other times FS-based atomic writes will be used.
As such, there is an atomic write length at which the user may experience
appreciably slower performance.
Advertise this limit in a new statx field, stx_atomic_write_unit_max_opt.
When zero, it means that there is no such performance boundary.
Masks STATX{_ATTR}_WRITE_ATOMIC can be used to get this new field. This is
ok for older kernels which don't support this new field, as they would
report 0 in this field (from zeroing in cp_statx()) already. Furthermore
those older kernels don't support large atomic writes - apart from block
fops, but there would be consistent performance there for atomic writes
in range [unit min, unit max].
Reviewed-by: Darrick J. Wong <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
Acked-by: Darrick J. Wong <[email protected]>
Signed-off-by: John Garry <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
0 files changed, 0 insertions, 0 deletions
