aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_btree.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-10-30 01:54:43 -0400
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 01:54:43 -0400
commitb524bfeee2152fa64b6210f28ced80489b9d2439 (patch)
tree226355f2fc34b50975c9c756a211446901dbecbe /fs/xfs/xfs_btree.h
parente99ab90d6a9e8ac92f05d2c31d44aa7feee15394 (diff)
[XFS] refactor xfs_btree_readahead
From: Dave Chinner <dgc@sgi.com> Refactor xfs_btree_readahead to make it more readable: (a) remove the inline xfs_btree_readahead wrapper and move all checks out of line into the main routine. (b) factor out helpers for short/long form btrees (c) move check for root in inodes from the callers into xfs_btree_readahead [hch: split out from a big patch and minor cleanups] SGI-PV: 985583 SGI-Modid: xfs-linux-melb:xfs-kern:32182a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Bill O'Donnell <billodo@sgi.com> Signed-off-by: David Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_btree.h')
-rw-r--r--fs/xfs/xfs_btree.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h
index dd93fd39c56a..8be838f0154a 100644
--- a/fs/xfs/xfs_btree.h
+++ b/fs/xfs/xfs_btree.h
@@ -421,23 +421,10 @@ xfs_btree_reada_bufs(
421 * Bits in lr are set from XFS_BTCUR_{LEFT,RIGHT}RA. 421 * Bits in lr are set from XFS_BTCUR_{LEFT,RIGHT}RA.
422 */ 422 */
423int /* readahead block count */ 423int /* readahead block count */
424xfs_btree_readahead_core(
425 xfs_btree_cur_t *cur, /* btree cursor */
426 int lev, /* level in btree */
427 int lr); /* left/right bits */
428
429static inline int /* readahead block count */
430xfs_btree_readahead( 424xfs_btree_readahead(
431 xfs_btree_cur_t *cur, /* btree cursor */ 425 xfs_btree_cur_t *cur, /* btree cursor */
432 int lev, /* level in btree */ 426 int lev, /* level in btree */
433 int lr) /* left/right bits */ 427 int lr); /* left/right bits */
434{
435 if ((cur->bc_ra[lev] | lr) == cur->bc_ra[lev])
436 return 0;
437
438 return xfs_btree_readahead_core(cur, lev, lr);
439}
440
441 428
442/* 429/*
443 * Set the buffer for level "lev" in the cursor to bp, releasing 430 * Set the buffer for level "lev" in the cursor to bp, releasing