xfs: factor duplicate code in xfs_alloc_ag_vextent_near into a helper
authorChristoph Hellwig <hch@infradead.org>
Fri, 10 Dec 2010 15:04:11 +0000 (15:04 +0000)
committerAlex Elder <aelder@sgi.com>
Thu, 16 Dec 2010 22:06:15 +0000 (16:06 -0600)
commit489a150f6454e2cd93d9e0ee6d7c5a361844f62a
tree18deded59797caaec9f01ef5a3eb66a765bef29f
parent9f9baab38dacd11fe6095a1e59f3783a305f7020
xfs: factor duplicate code in xfs_alloc_ag_vextent_near into a helper

Add a new xfs_alloc_find_best_extent that does a forward/backward
search in the allocation btree.  That code previously was existed
two times in xfs_alloc_ag_vextent_near, once for each search
direction.

Based on an earlier patch from Dave Chinner.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/xfs_alloc.c