diff options
author | Brian Foster <bfoster@redhat.com> | 2018-02-26 22:43:15 -0600 |
---|---|---|
committer | Eric Sandeen <sandeen@redhat.com> | 2018-02-26 22:43:15 -0600 |
commit | ec1b0fd9750b5d23ef91c9d35a80c201d8655a70 (patch) | |
tree | 38f20328f53396669a392e78d3c7f909bdd62a25 | |
parent | 727b445bb72f50b073491261bc016cf32ad6d271 (diff) | |
download | xfsprogs-dev-ec1b0fd9750b5d23ef91c9d35a80c201d8655a70.tar.gz |
xfs: truncate transaction does not modify the inobt
Source kernel commit: a606ebdb859e78beb757dfefa08001df366e2ef5
The truncate transaction does not ever modify the inode btree, but
includes an associated log reservation. Update
xfs_calc_itruncate_reservation() to remove the reservation
associated with inobt updates.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r-- | libxfs/xfs_trans_resv.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/libxfs/xfs_trans_resv.c b/libxfs/xfs_trans_resv.c index 2be19c650b..2cbb6a9dae 100644 --- a/libxfs/xfs_trans_resv.c +++ b/libxfs/xfs_trans_resv.c @@ -231,8 +231,6 @@ xfs_calc_write_reservation( * the super block to reflect the freed blocks: sector size * worst case split in allocation btrees per extent assuming 4 extents: * 4 exts * 2 trees * (2 * max depth - 1) * block size - * the inode btree: max depth * blocksize - * the allocation btrees: 2 trees * (max depth - 1) * block size */ STATIC uint xfs_calc_itruncate_reservation( @@ -244,12 +242,7 @@ xfs_calc_itruncate_reservation( XFS_FSB_TO_B(mp, 1))), (xfs_calc_buf_res(9, mp->m_sb.sb_sectsize) + xfs_calc_buf_res(xfs_allocfree_log_count(mp, 4), - XFS_FSB_TO_B(mp, 1)) + - xfs_calc_buf_res(5, 0) + - xfs_calc_buf_res(xfs_allocfree_log_count(mp, 1), - XFS_FSB_TO_B(mp, 1)) + - xfs_calc_buf_res(2 + mp->m_ialloc_blks + - mp->m_in_maxlevels, 0))); + XFS_FSB_TO_B(mp, 1)))); } /* |