aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_alloc_btree.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-10-30 01:55:34 -0400
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 01:55:34 -0400
commit65f1eaeac0efc968797f3ac955b85ba3f5d4f9c8 (patch)
tree149c010e3a1d4abb60021ed39d3972459f63d13d /fs/xfs/xfs_alloc_btree.c
parentce5e42db421a41b1ad0cfd68c6058566b963e14b (diff)
[XFS] add helpers for addressing entities inside a btree block
Add new helpers in xfs_btree.c to find the record, key and block pointer entries inside a btree block. To implement this genericly the ->get_maxrecs methods and two new xfs_btree_ops entries for the key and record sizes are used. Also add a big comment describing how the addressing inside a btree block works. Note that these helpers are unused until users are introduced in the next patches and this patch will thus cause some harmless compiler warnings. SGI-PV: 985583 SGI-Modid: xfs-linux-melb:xfs-kern:32189a 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_alloc_btree.c')
-rw-r--r--fs/xfs/xfs_alloc_btree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c
index 1f268b6f4362..9e2421c31a36 100644
--- a/fs/xfs/xfs_alloc_btree.c
+++ b/fs/xfs/xfs_alloc_btree.c
@@ -2294,6 +2294,9 @@ xfs_allocbt_trace_record(
2294#endif /* XFS_BTREE_TRACE */ 2294#endif /* XFS_BTREE_TRACE */
2295 2295
2296static const struct xfs_btree_ops xfs_allocbt_ops = { 2296static const struct xfs_btree_ops xfs_allocbt_ops = {
2297 .rec_len = sizeof(xfs_alloc_rec_t),
2298 .key_len = sizeof(xfs_alloc_key_t),
2299
2297 .dup_cursor = xfs_allocbt_dup_cursor, 2300 .dup_cursor = xfs_allocbt_dup_cursor,
2298 .get_maxrecs = xfs_allocbt_get_maxrecs, 2301 .get_maxrecs = xfs_allocbt_get_maxrecs,
2299 2302