From a870acd9b2671de56514a430edfa7867823c31c9 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sun, 24 Apr 2011 19:06:14 +0000 Subject: xfs: optimize AGFL refills While we need to make sure we do not reuse busy extents, there is no need to force out busy extents when moving them between the AGFL and the freespace btree as we still take care of that when doing the real allocation. To avoid the log force when just moving extents from the different free space tracking structures, move the busy search out of xfs_alloc_get_freelist into the callers that need it, and move the busy list insert from xfs_free_ag_extent which is used both by AGFL refills and real allocation to xfs_free_extent, which is only used by the latter. Signed-off-by: Christoph Hellwig Signed-off-by: Alex Elder --- fs/xfs/xfs_alloc_btree.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/xfs/xfs_alloc_btree.c') diff --git a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c index 3916925e258..bcfe92f47ed 100644 --- a/fs/xfs/xfs_alloc_btree.c +++ b/fs/xfs/xfs_alloc_btree.c @@ -94,6 +94,8 @@ xfs_allocbt_alloc_block( *stat = 0; return 0; } + if (xfs_alloc_busy_search(cur->bc_mp, cur->bc_private.a.agno, bno, 1)) + xfs_trans_set_sync(cur->bc_tp); xfs_trans_agbtree_delta(cur->bc_tp, 1); new->s = cpu_to_be32(bno); -- cgit v1.2.3-70-g09d2