xfs: rmap btree transaction reservations
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 3 Aug 2016 01:37:10 +0000 (11:37 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 3 Aug 2016 01:37:10 +0000 (11:37 +1000)
commitfa30f03cda26783b1294af6e7da9f1142da0f52e
tree4585fb561e4c40306bea25fbc41121649641b8c8
parente70d829f8d288cd062d265085420f001828b0683
xfs: rmap btree transaction reservations

The rmap btrees will use the AGFL as the block allocation source, so
we need to ensure that the transaction reservations reflect the fact
this tree is modified by allocation and freeing. Hence we need to
extend all the extent allocation/free reservations used in
transactions to handle this.

Note that this also gets rid of the unused XFS_ALLOCFREE_LOG_RES
macro, as we now do buffer reservations based on the number of
buffers logged via xfs_calc_buf_res(). Hence we only need the buffer
count calculation now.

[darrick: use rmap_maxlevels when calculating log block resv]

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_trans_resv.c
fs/xfs/libxfs/xfs_trans_resv.h