]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: reduce transaction reservations with reflink
authorDarrick J. Wong <djwong@kernel.org>
Tue, 26 Apr 2022 01:38:14 +0000 (18:38 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 28 Apr 2022 17:25:42 +0000 (10:25 -0700)
commit3d2ca42184f31d36b9cec79dc090f58b5ddf73c3
treef486c5504d4793ef91e0aa6e7784584f53f8727e
parent546ee7d9068af4653c756a24671a59b1fe6e6149
xfs: reduce transaction reservations with reflink

Before to the introduction of deferred refcount operations, reflink
would try to cram refcount btree updates into the same transaction as an
allocation or a free event.  Mainline XFS has never actually done that,
but we never refactored the transaction reservations to reflect that we
now do all refcount updates in separate transactions.  Fix this to
reduce the transaction reservation size even farther, so that between
this patch and the previous one, we reduce the tr_write and tr_itruncate
sizes by 66%.

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/libxfs/xfs_refcount.c
fs/xfs/libxfs/xfs_trans_resv.c
fs/xfs/libxfs/xfs_trans_resv.h