diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-10-30 01:55:23 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@sgi.com> | 2008-10-30 01:55:23 -0400 |
commit | ce5e42db421a41b1ad0cfd68c6058566b963e14b (patch) | |
tree | 7723f47e468c6b933a89361462c04436fe617cda /fs/xfs/xfs_bmap_btree.c | |
parent | 8c4ed633e65d0bd0a25d45aad9b4646e3236cad7 (diff) |
[XFS] add get_maxrecs btree operation
Factor xfs_btree_maxrecs into a per-btree operation.
The get_maxrecs method is based on a patch from Dave Chinner.
SGI-PV: 985583
SGI-Modid: xfs-linux-melb:xfs-kern:32188a
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_bmap_btree.c')
-rw-r--r-- | fs/xfs/xfs_bmap_btree.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c index 16f2fde6433d..bdcfbea1e062 100644 --- a/fs/xfs/xfs_bmap_btree.c +++ b/fs/xfs/xfs_bmap_btree.c | |||
@@ -2415,6 +2415,14 @@ xfs_bmbt_dup_cursor( | |||
2415 | return new; | 2415 | return new; |
2416 | } | 2416 | } |
2417 | 2417 | ||
2418 | STATIC int | ||
2419 | xfs_bmbt_get_maxrecs( | ||
2420 | struct xfs_btree_cur *cur, | ||
2421 | int level) | ||
2422 | { | ||
2423 | return XFS_BMAP_BLOCK_IMAXRECS(level, cur); | ||
2424 | } | ||
2425 | |||
2418 | #ifdef XFS_BTREE_TRACE | 2426 | #ifdef XFS_BTREE_TRACE |
2419 | ktrace_t *xfs_bmbt_trace_buf; | 2427 | ktrace_t *xfs_bmbt_trace_buf; |
2420 | 2428 | ||
@@ -2502,6 +2510,7 @@ xfs_bmbt_trace_record( | |||
2502 | 2510 | ||
2503 | static const struct xfs_btree_ops xfs_bmbt_ops = { | 2511 | static const struct xfs_btree_ops xfs_bmbt_ops = { |
2504 | .dup_cursor = xfs_bmbt_dup_cursor, | 2512 | .dup_cursor = xfs_bmbt_dup_cursor, |
2513 | .get_maxrecs = xfs_bmbt_get_maxrecs, | ||
2505 | 2514 | ||
2506 | #ifdef XFS_BTREE_TRACE | 2515 | #ifdef XFS_BTREE_TRACE |
2507 | .trace_enter = xfs_bmbt_trace_enter, | 2516 | .trace_enter = xfs_bmbt_trace_enter, |