mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
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>
This commit is contained in:
parent
e70d829f8d
commit
fa30f03cda
2 changed files with 41 additions and 27 deletions
|
@ -67,16 +67,6 @@ struct xfs_trans_resv {
|
|||
/* shorthand way of accessing reservation structure */
|
||||
#define M_RES(mp) (&(mp)->m_resv)
|
||||
|
||||
/*
|
||||
* Per-extent log reservation for the allocation btree changes
|
||||
* involved in freeing or allocating an extent.
|
||||
* 2 trees * (2 blocks/level * max depth - 1) * block size
|
||||
*/
|
||||
#define XFS_ALLOCFREE_LOG_RES(mp,nx) \
|
||||
((nx) * (2 * XFS_FSB_TO_B((mp), 2 * (mp)->m_ag_maxlevels - 1)))
|
||||
#define XFS_ALLOCFREE_LOG_COUNT(mp,nx) \
|
||||
((nx) * (2 * (2 * (mp)->m_ag_maxlevels - 1)))
|
||||
|
||||
/*
|
||||
* Per-directory log reservation for any directory change.
|
||||
* dir blocks: (1 btree block per level + data block + free block) * dblock size
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue