]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: create shadow transaction reservations for computing minimum log size
authorDarrick J. Wong <djwong@kernel.org>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
commitad769a07b1cc00c1460abbb93d3f7aa14aa09912
tree872dce5cfa5a9577c914e2c9d563caf18d2d1aa3
parenteb9a1cac4c2e320a7b7550add4b6c262386e1eb0
xfs: create shadow transaction reservations for computing minimum log size

Source kernel commit: 52d8ea4f2406c14d632a0e7f816bbb18d8c3e9ed

Every time someone changes the transaction reservation sizes, they
introduce potential compatibility problems if the changes affect the
minimum log size that we validate at mount time.  If the minimum log
size gets larger (which should be avoided because doing so presents a
serious risk of log livelock), filesystems created with old mkfs will
not mount on a newer kernel; if the minimum size shrinks, filesystems
created with newer mkfs will not mount on older kernels.

Therefore, enable the creation of a shadow log reservation structure
where we can "undo" the effects of tweaks when computing minimum log
sizes.  These shadow reservations should never be used in practice, but
they insulate us from perturbations in minimum log size.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/xfs_trace.h
libxfs/xfs_log_rlimit.c