diff options
Diffstat (limited to 'fs/xfs/xfs_trans_resv.c')
-rw-r--r-- | fs/xfs/xfs_trans_resv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_trans_resv.c b/fs/xfs/xfs_trans_resv.c index 2fd59c0dae66..2ffd3e331b49 100644 --- a/fs/xfs/xfs_trans_resv.c +++ b/fs/xfs/xfs_trans_resv.c | |||
@@ -174,7 +174,7 @@ xfs_calc_itruncate_reservation( | |||
174 | xfs_calc_buf_res(5, 0) + | 174 | xfs_calc_buf_res(5, 0) + |
175 | xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1), | 175 | xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1), |
176 | XFS_FSB_TO_B(mp, 1)) + | 176 | XFS_FSB_TO_B(mp, 1)) + |
177 | xfs_calc_buf_res(2 + XFS_IALLOC_BLOCKS(mp) + | 177 | xfs_calc_buf_res(2 + mp->m_ialloc_blks + |
178 | mp->m_in_maxlevels, 0))); | 178 | mp->m_in_maxlevels, 0))); |
179 | } | 179 | } |
180 | 180 | ||
@@ -282,7 +282,7 @@ xfs_calc_create_resv_modify( | |||
282 | * For create we can allocate some inodes giving: | 282 | * For create we can allocate some inodes giving: |
283 | * the agi and agf of the ag getting the new inodes: 2 * sectorsize | 283 | * the agi and agf of the ag getting the new inodes: 2 * sectorsize |
284 | * the superblock for the nlink flag: sector size | 284 | * the superblock for the nlink flag: sector size |
285 | * the inode blocks allocated: XFS_IALLOC_BLOCKS * blocksize | 285 | * the inode blocks allocated: mp->m_ialloc_blks * blocksize |
286 | * the inode btree: max depth * blocksize | 286 | * the inode btree: max depth * blocksize |
287 | * the allocation btrees: 2 trees * (max depth - 1) * block size | 287 | * the allocation btrees: 2 trees * (max depth - 1) * block size |
288 | */ | 288 | */ |
@@ -292,7 +292,7 @@ xfs_calc_create_resv_alloc( | |||
292 | { | 292 | { |
293 | return xfs_calc_buf_res(2, mp->m_sb.sb_sectsize) + | 293 | return xfs_calc_buf_res(2, mp->m_sb.sb_sectsize) + |
294 | mp->m_sb.sb_sectsize + | 294 | mp->m_sb.sb_sectsize + |
295 | xfs_calc_buf_res(XFS_IALLOC_BLOCKS(mp), XFS_FSB_TO_B(mp, 1)) + | 295 | xfs_calc_buf_res(mp->m_ialloc_blks, XFS_FSB_TO_B(mp, 1)) + |
296 | xfs_calc_buf_res(mp->m_in_maxlevels, XFS_FSB_TO_B(mp, 1)) + | 296 | xfs_calc_buf_res(mp->m_in_maxlevels, XFS_FSB_TO_B(mp, 1)) + |
297 | xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1), | 297 | xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1), |
298 | XFS_FSB_TO_B(mp, 1)); | 298 | XFS_FSB_TO_B(mp, 1)); |
@@ -385,9 +385,9 @@ xfs_calc_ifree_reservation( | |||
385 | xfs_calc_inode_res(mp, 1) + | 385 | xfs_calc_inode_res(mp, 1) + |
386 | xfs_calc_buf_res(2, mp->m_sb.sb_sectsize) + | 386 | xfs_calc_buf_res(2, mp->m_sb.sb_sectsize) + |
387 | xfs_calc_buf_res(1, XFS_FSB_TO_B(mp, 1)) + | 387 | xfs_calc_buf_res(1, XFS_FSB_TO_B(mp, 1)) + |
388 | max_t(uint, XFS_FSB_TO_B(mp, 1), XFS_INODE_CLUSTER_SIZE(mp)) + | 388 | max_t(uint, XFS_FSB_TO_B(mp, 1), mp->m_inode_cluster_size) + |
389 | xfs_calc_buf_res(1, 0) + | 389 | xfs_calc_buf_res(1, 0) + |
390 | xfs_calc_buf_res(2 + XFS_IALLOC_BLOCKS(mp) + | 390 | xfs_calc_buf_res(2 + mp->m_ialloc_blks + |
391 | mp->m_in_maxlevels, 0) + | 391 | mp->m_in_maxlevels, 0) + |
392 | xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1), | 392 | xfs_calc_buf_res(XFS_ALLOCFREE_LOG_COUNT(mp, 1), |
393 | XFS_FSB_TO_B(mp, 1)); | 393 | XFS_FSB_TO_B(mp, 1)); |