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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h
index c3bfa5556c19..04311dbeff19 100644
--- a/fs/xfs/xfs_btree.h
+++ b/fs/xfs/xfs_btree.h
@@ -533,6 +533,7 @@ int xfs_btree_decrement(struct xfs_btree_cur *, int, int *);
533int xfs_btree_lookup(struct xfs_btree_cur *, xfs_lookup_t, int *); 533int xfs_btree_lookup(struct xfs_btree_cur *, xfs_lookup_t, int *);
534int xfs_btree_updkey(struct xfs_btree_cur *, union xfs_btree_key *, int); 534int xfs_btree_updkey(struct xfs_btree_cur *, union xfs_btree_key *, int);
535int xfs_btree_update(struct xfs_btree_cur *, union xfs_btree_rec *); 535int xfs_btree_update(struct xfs_btree_cur *, union xfs_btree_rec *);
536int xfs_btree_rshift(struct xfs_btree_cur *, int, int *);
536 537
537/* 538/*
538 * Helpers. 539 * Helpers.
@@ -542,6 +543,12 @@ static inline int xfs_btree_get_numrecs(struct xfs_btree_block *block)
542 return be16_to_cpu(block->bb_numrecs); 543 return be16_to_cpu(block->bb_numrecs);
543} 544}
544 545
546static inline void xfs_btree_set_numrecs(struct xfs_btree_block *block,
547 __uint16_t numrecs)
548{
549 block->bb_numrecs = cpu_to_be16(numrecs);
550}
551
545static inline int xfs_btree_get_level(struct xfs_btree_block *block) 552static inline int xfs_btree_get_level(struct xfs_btree_block *block)
546{ 553{
547 return be16_to_cpu(block->bb_level); 554 return be16_to_cpu(block->bb_level);