xfs: add helpers to compute transaction reservation for finishing intent items
authorDarrick J. Wong <djwong@kernel.org>
Wed, 7 May 2025 21:18:25 +0000 (14:18 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 7 May 2025 21:25:30 +0000 (14:25 -0700)
commit805f89881252a9aee30799b8a395deec79c13414
treeb99150ddd3123c4df56d5f7980b806bde71b73f4
parent6d1bdc739140aa9b446182a00a7a4e03e2162861
xfs: add helpers to compute transaction reservation for finishing intent items

In the transaction reservation code, hoist the logic that computes the
reservation needed to finish one log intent item into separate helper
functions.  These will be used in subsequent patches to estimate the
number of blocks that an online repair can commit to reaping in the same
transaction as the change committing the new data structure.

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