]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: create shadow transaction reservations for computing minimum log size
authorDarrick J. Wong <djwong@kernel.org>
Tue, 26 Apr 2022 01:38:13 +0000 (18:38 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 28 Apr 2022 17:25:15 +0000 (10:25 -0700)
commit625ac2ec4527b863baae26db3435e73513546a8b
tree7d4b48f56a99f46a5756b8e8667581c5cc776a08
parentd12bb581f027965df6f0c3e130bb16b26b679f62
xfs: create shadow transaction reservations for computing minimum log size

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>
fs/xfs/libxfs/xfs_log_rlimit.c
fs/xfs/xfs_trace.h