]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: allow sysadmins to specify a maximum atomic write limit at mount time
authorDarrick J. Wong <djwong@kernel.org>
Tue, 1 Jul 2025 17:45:13 +0000 (10:45 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Fri, 18 Jul 2025 14:05:10 +0000 (16:05 +0200)
commit1ba98d1f4fd9a484bc69420e449aaaa2848896cd
treef0212a602787d09745a5a8fb68a0d27cfe01c404
parent9ae045b77d88a027240f5df7212a28326ccc9d7a
xfs: allow sysadmins to specify a maximum atomic write limit at mount time

Source kernel commit: 4528b9052731f14c1a9be16b98e33c9401e6d1bc

Introduce a mount option to allow sysadmins to specify the maximum size
of an atomic write.  If the filesystem can work with the supplied value,
that becomes the new guaranteed maximum.

The value mustn't be too big for the existing filesystem geometry (max
write size, max AG/rtgroup size).  We dynamically recompute the
tr_atomic_write transaction reservation based on the given block size,
check that the current log size isn't less than the new minimum log size
constraints, and set a new maximum.

The actual software atomic write max is still computed based off of
tr_atomic_ioend the same way it has for the past few commits.  Note also
that xfs_calc_atomic_write_log_geometry is non-static because mkfs will
need that.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: John Garry <john.g.garry@oracle.com>
include/platform_defs.h
include/xfs_trace.h
libxfs/xfs_trans_resv.c
libxfs/xfs_trans_resv.h