aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_rmap_btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/libxfs/xfs_rmap_btree.c')
-rw-r--r--fs/xfs/libxfs/xfs_rmap_btree.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_rmap_btree.c b/fs/xfs/libxfs/xfs_rmap_btree.c
index 5738e11055e6..5d1f8884c888 100644
--- a/fs/xfs/libxfs/xfs_rmap_btree.c
+++ b/fs/xfs/libxfs/xfs_rmap_btree.c
@@ -578,6 +578,15 @@ xfs_rmapbt_calc_reserves(
578 tree_len = be32_to_cpu(agf->agf_rmap_blocks); 578 tree_len = be32_to_cpu(agf->agf_rmap_blocks);
579 xfs_trans_brelse(tp, agbp); 579 xfs_trans_brelse(tp, agbp);
580 580
581 /*
582 * The log is permanently allocated, so the space it occupies will
583 * never be available for the kinds of things that would require btree
584 * expansion. We therefore can pretend the space isn't there.
585 */
586 if (mp->m_sb.sb_logstart &&
587 XFS_FSB_TO_AGNO(mp, mp->m_sb.sb_logstart) == agno)
588 agblocks -= mp->m_sb.sb_logblocks;
589
581 /* Reserve 1% of the AG or enough for 1 block per record. */ 590 /* Reserve 1% of the AG or enough for 1 block per record. */
582 *ask += max(agblocks / 100, xfs_rmapbt_max_size(mp, agblocks)); 591 *ask += max(agblocks / 100, xfs_rmapbt_max_size(mp, agblocks));
583 *used += tree_len; 592 *used += tree_len;