Lines Matching refs:xfbt
69 struct xfbtree *xfbt) in xfbtree_destroy() argument
71 xfs_buftarg_drain(xfbt->target); in xfbtree_destroy()
87 struct xfbtree *xfbt, in xfbtree_init_leaf_block() argument
91 xfbno_t bno = xfbt->highest_bno++; in xfbtree_init_leaf_block()
94 error = xfs_buf_get(xfbt->target, xfbno_to_daddr(bno), XFBNO_BBSIZE, in xfbtree_init_leaf_block()
99 trace_xfbtree_create_root_buf(xfbt, bp); in xfbtree_init_leaf_block()
102 xfs_btree_init_buf(mp, bp, ops, 0, 0, xfbt->owner); in xfbtree_init_leaf_block()
105 xfbt->root.l = cpu_to_be64(bno); in xfbtree_init_leaf_block()
116 struct xfbtree *xfbt, in xfbtree_init() argument
134 memset(xfbt, 0, sizeof(*xfbt)); in xfbtree_init()
135 xfbt->target = btp; in xfbtree_init()
139 xfbt->maxrecs[0] = blocklen / ops->rec_len; in xfbtree_init()
140 xfbt->maxrecs[1] = blocklen / keyptr_len; in xfbtree_init()
141 xfbt->minrecs[0] = xfbt->maxrecs[0] / 2; in xfbtree_init()
142 xfbt->minrecs[1] = xfbt->maxrecs[1] / 2; in xfbtree_init()
143 xfbt->highest_bno = 0; in xfbtree_init()
144 xfbt->nlevels = 1; in xfbtree_init()
147 error = xfbtree_init_leaf_block(mp, xfbt, ops); in xfbtree_init()
151 trace_xfbtree_init(mp, xfbt, ops); in xfbtree_init()
156 xfs_buftarg_drain(xfbt->target); in xfbtree_init()
168 struct xfbtree *xfbt = cur->bc_mem.xfbtree; in xfbtree_alloc_block() local
169 xfbno_t bno = xfbt->highest_bno++; in xfbtree_alloc_block()
173 trace_xfbtree_alloc_block(xfbt, cur, bno); in xfbtree_alloc_block()
176 if (!xfbtree_verify_bno(xfbt, bno)) { in xfbtree_alloc_block()
177 ASSERT(xfbtree_verify_bno(xfbt, bno)); in xfbtree_alloc_block()
193 struct xfbtree *xfbt = cur->bc_mem.xfbtree; in xfbtree_free_block() local
199 trace_xfbtree_free_block(xfbt, cur, bno); in xfbtree_free_block()
201 if (bno + 1 == xfbt->highest_bno) in xfbtree_free_block()
202 xfbt->highest_bno--; in xfbtree_free_block()
213 struct xfbtree *xfbt = cur->bc_mem.xfbtree; in xfbtree_get_minrecs() local
215 return xfbt->minrecs[level != 0]; in xfbtree_get_minrecs()
224 struct xfbtree *xfbt = cur->bc_mem.xfbtree; in xfbtree_get_maxrecs() local
226 return xfbt->maxrecs[level != 0]; in xfbtree_get_maxrecs()
232 struct xfbtree *xfbt, in xfbtree_buf_match() argument
243 if (bp->b_target != xfbt->target) in xfbtree_buf_match()
268 struct xfbtree *xfbt, in xfbtree_trans_commit() argument
280 struct xfs_buf *bp = xfbtree_buf_match(xfbt, lip); in xfbtree_trans_commit()
288 trace_xfbtree_trans_commit_buf(xfbt, bp); in xfbtree_trans_commit()
319 struct xfbtree *xfbt, in xfbtree_trans_cancel() argument
326 struct xfs_buf *bp = xfbtree_buf_match(xfbt, lip); in xfbtree_trans_cancel()
334 trace_xfbtree_trans_cancel_buf(xfbt, bp); in xfbtree_trans_cancel()