/* Calculate offset of the n-th block pointer in a btree block.  */
STATIC size_t xfs_btree_ptr_offset(struct xfs_btree_cur *cur, int n, int level)
/* Calculate offset of the n-th block pointer in a btree block.  */
STATIC size_t xfs_btree_ptr_offset(struct xfs_btree_cur *cur, int n, int level)
{
	return xfs_btree_block_len(cur) +
		cur->bc_ops->get_maxrecs(cur, level) * cur->bc_ops->key_len +
		(n - 1) * xfs_btree_ptr_len(cur);
}