aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_btree.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_btree.h')
-rw-r--r--fs/xfs/xfs_btree.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h
index 5398cd0d4d4d..593f82b01b6f 100644
--- a/fs/xfs/xfs_btree.h
+++ b/fs/xfs/xfs_btree.h
@@ -180,6 +180,10 @@ do { \
180#define XFS_BTREE_MAXLEVELS 8 /* max of all btrees */ 180#define XFS_BTREE_MAXLEVELS 8 /* max of all btrees */
181 181
182struct xfs_btree_ops { 182struct xfs_btree_ops {
183 /* size of the key and record structures */
184 size_t key_len;
185 size_t rec_len;
186
183 /* cursor operations */ 187 /* cursor operations */
184 struct xfs_btree_cur *(*dup_cursor)(struct xfs_btree_cur *); 188 struct xfs_btree_cur *(*dup_cursor)(struct xfs_btree_cur *);
185 189
@@ -497,6 +501,15 @@ xfs_btree_setbuf(
497 int lev, /* level in btree */ 501 int lev, /* level in btree */
498 struct xfs_buf *bp); /* new buffer to set */ 502 struct xfs_buf *bp); /* new buffer to set */
499 503
504
505/*
506 * Helpers.
507 */
508static inline int xfs_btree_get_level(struct xfs_btree_block *block)
509{
510 return be16_to_cpu(block->bb_level);
511}
512
500#endif /* __KERNEL__ */ 513#endif /* __KERNEL__ */
501 514
502 515