Lines Matching refs:cur
28 struct xfs_btree_cur *cur) in xfs_bnobt_dup_cursor() argument
30 return xfs_bnobt_init_cursor(cur->bc_mp, cur->bc_tp, cur->bc_ag.agbp, in xfs_bnobt_dup_cursor()
31 to_perag(cur->bc_group)); in xfs_bnobt_dup_cursor()
36 struct xfs_btree_cur *cur) in xfs_cntbt_dup_cursor() argument
38 return xfs_cntbt_init_cursor(cur->bc_mp, cur->bc_tp, cur->bc_ag.agbp, in xfs_cntbt_dup_cursor()
39 to_perag(cur->bc_group)); in xfs_cntbt_dup_cursor()
44 struct xfs_btree_cur *cur, in xfs_allocbt_set_root() argument
48 struct xfs_perag *pag = to_perag(cur->bc_group); in xfs_allocbt_set_root()
49 struct xfs_buf *agbp = cur->bc_ag.agbp; in xfs_allocbt_set_root()
54 if (xfs_btree_is_bno(cur->bc_ops)) { in xfs_allocbt_set_root()
64 xfs_alloc_log_agf(cur->bc_tp, agbp, XFS_AGF_ROOTS | XFS_AGF_LEVELS); in xfs_allocbt_set_root()
69 struct xfs_btree_cur *cur, in xfs_allocbt_alloc_block() argument
78 error = xfs_alloc_get_freelist(to_perag(cur->bc_group), cur->bc_tp, in xfs_allocbt_alloc_block()
79 cur->bc_ag.agbp, &bno, 1); in xfs_allocbt_alloc_block()
88 atomic64_inc(&cur->bc_mp->m_allocbt_blks); in xfs_allocbt_alloc_block()
89 xfs_extent_busy_reuse(cur->bc_group, bno, 1, false); in xfs_allocbt_alloc_block()
99 struct xfs_btree_cur *cur, in xfs_allocbt_free_block() argument
102 struct xfs_buf *agbp = cur->bc_ag.agbp; in xfs_allocbt_free_block()
106 bno = xfs_daddr_to_agbno(cur->bc_mp, xfs_buf_daddr(bp)); in xfs_allocbt_free_block()
107 error = xfs_alloc_put_freelist(to_perag(cur->bc_group), cur->bc_tp, in xfs_allocbt_free_block()
112 atomic64_dec(&cur->bc_mp->m_allocbt_blks); in xfs_allocbt_free_block()
113 xfs_extent_busy_insert(cur->bc_tp, pag_group(agbp->b_pag), bno, 1, in xfs_allocbt_free_block()
120 struct xfs_btree_cur *cur, in xfs_allocbt_get_minrecs() argument
123 return cur->bc_mp->m_alloc_mnr[level != 0]; in xfs_allocbt_get_minrecs()
128 struct xfs_btree_cur *cur, in xfs_allocbt_get_maxrecs() argument
131 return cur->bc_mp->m_alloc_mxr[level != 0]; in xfs_allocbt_get_maxrecs()
167 struct xfs_btree_cur *cur, in xfs_allocbt_init_rec_from_cur() argument
170 rec->alloc.ar_startblock = cpu_to_be32(cur->bc_rec.a.ar_startblock); in xfs_allocbt_init_rec_from_cur()
171 rec->alloc.ar_blockcount = cpu_to_be32(cur->bc_rec.a.ar_blockcount); in xfs_allocbt_init_rec_from_cur()
176 struct xfs_btree_cur *cur, in xfs_allocbt_init_ptr_from_cur() argument
179 struct xfs_agf *agf = cur->bc_ag.agbp->b_addr; in xfs_allocbt_init_ptr_from_cur()
181 ASSERT(cur->bc_group->xg_gno == be32_to_cpu(agf->agf_seqno)); in xfs_allocbt_init_ptr_from_cur()
183 if (xfs_btree_is_bno(cur->bc_ops)) in xfs_allocbt_init_ptr_from_cur()
191 struct xfs_btree_cur *cur, in xfs_bnobt_key_diff() argument
194 struct xfs_alloc_rec_incore *rec = &cur->bc_rec.a; in xfs_bnobt_key_diff()
202 struct xfs_btree_cur *cur, in xfs_cntbt_key_diff() argument
205 struct xfs_alloc_rec_incore *rec = &cur->bc_rec.a; in xfs_cntbt_key_diff()
218 struct xfs_btree_cur *cur, in xfs_bnobt_diff_two_keys() argument
231 struct xfs_btree_cur *cur, in xfs_cntbt_diff_two_keys() argument
361 struct xfs_btree_cur *cur, in xfs_bnobt_keys_inorder() argument
371 struct xfs_btree_cur *cur, in xfs_bnobt_recs_inorder() argument
382 struct xfs_btree_cur *cur, in xfs_cntbt_keys_inorder() argument
395 struct xfs_btree_cur *cur, in xfs_cntbt_recs_inorder() argument
408 struct xfs_btree_cur *cur, in xfs_allocbt_keys_contiguous() argument
491 struct xfs_btree_cur *cur; in xfs_bnobt_init_cursor() local
493 cur = xfs_btree_alloc_cursor(mp, tp, &xfs_bnobt_ops, in xfs_bnobt_init_cursor()
495 cur->bc_group = xfs_group_hold(pag_group(pag)); in xfs_bnobt_init_cursor()
496 cur->bc_ag.agbp = agbp; in xfs_bnobt_init_cursor()
500 cur->bc_nlevels = be32_to_cpu(agf->agf_bno_level); in xfs_bnobt_init_cursor()
502 return cur; in xfs_bnobt_init_cursor()
517 struct xfs_btree_cur *cur; in xfs_cntbt_init_cursor() local
519 cur = xfs_btree_alloc_cursor(mp, tp, &xfs_cntbt_ops, in xfs_cntbt_init_cursor()
521 cur->bc_group = xfs_group_hold(pag_group(pag)); in xfs_cntbt_init_cursor()
522 cur->bc_ag.agbp = agbp; in xfs_cntbt_init_cursor()
526 cur->bc_nlevels = be32_to_cpu(agf->agf_cnt_level); in xfs_cntbt_init_cursor()
528 return cur; in xfs_cntbt_init_cursor()
537 struct xfs_btree_cur *cur, in xfs_allocbt_commit_staged_btree() argument
542 struct xbtree_afakeroot *afake = cur->bc_ag.afake; in xfs_allocbt_commit_staged_btree()
544 ASSERT(cur->bc_flags & XFS_BTREE_STAGING); in xfs_allocbt_commit_staged_btree()
546 if (xfs_btree_is_bno(cur->bc_ops)) { in xfs_allocbt_commit_staged_btree()
555 xfs_btree_commit_afakeroot(cur, tp, agbp); in xfs_allocbt_commit_staged_btree()