summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_trans_resv.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-04-25 18:38:14 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-04-28 10:25:42 -0700
commitb037c4eed2df4568a7702cd512d26625962f95b9 (patch)
treef486c5504d4793ef91e0aa6e7784584f53f8727e /fs/xfs/libxfs/xfs_trans_resv.h
parent4ecf9e7c69edcb8f5b98df471dd026419b881d2b (diff)
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_trans_resv.h')
-rw-r--r--fs/xfs/libxfs/xfs_trans_resv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_trans_resv.h b/fs/xfs/libxfs/xfs_trans_resv.h
index fa330e646dc5..22b99042127a 100644
--- a/fs/xfs/libxfs/xfs_trans_resv.h
+++ b/fs/xfs/libxfs/xfs_trans_resv.h
@@ -98,4 +98,8 @@ struct xfs_trans_resv {
void xfs_trans_resv_calc(struct xfs_mount *mp, struct xfs_trans_resv *resp);
uint xfs_allocfree_log_count(struct xfs_mount *mp, uint num_ops);
+unsigned int xfs_calc_itruncate_reservation_minlogsize(struct xfs_mount *mp);
+unsigned int xfs_calc_write_reservation_minlogsize(struct xfs_mount *mp);
+unsigned int xfs_calc_qm_dqalloc_reservation_minlogsize(struct xfs_mount *mp);
+
#endif /* __XFS_TRANS_RESV_H__ */