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_cmp_key_with_cur() argument
194 struct xfs_alloc_rec_incore *rec = &cur->bc_rec.a; in xfs_bnobt_cmp_key_with_cur()
203 struct xfs_btree_cur *cur, in xfs_cntbt_cmp_key_with_cur() argument
206 struct xfs_alloc_rec_incore *rec = &cur->bc_rec.a; in xfs_cntbt_cmp_key_with_cur()
215 struct xfs_btree_cur *cur, in xfs_bnobt_cmp_two_keys() argument
228 struct xfs_btree_cur *cur, in xfs_cntbt_cmp_two_keys() argument
353 struct xfs_btree_cur *cur, in xfs_bnobt_keys_inorder() argument
363 struct xfs_btree_cur *cur, in xfs_bnobt_recs_inorder() argument
374 struct xfs_btree_cur *cur, in xfs_cntbt_keys_inorder() argument
387 struct xfs_btree_cur *cur, in xfs_cntbt_recs_inorder() argument
400 struct xfs_btree_cur *cur, in xfs_allocbt_keys_contiguous() argument
483 struct xfs_btree_cur *cur; in xfs_bnobt_init_cursor() local
485 cur = xfs_btree_alloc_cursor(mp, tp, &xfs_bnobt_ops, in xfs_bnobt_init_cursor()
487 cur->bc_group = xfs_group_hold(pag_group(pag)); in xfs_bnobt_init_cursor()
488 cur->bc_ag.agbp = agbp; in xfs_bnobt_init_cursor()
492 cur->bc_nlevels = be32_to_cpu(agf->agf_bno_level); in xfs_bnobt_init_cursor()
494 return cur; in xfs_bnobt_init_cursor()
509 struct xfs_btree_cur *cur; in xfs_cntbt_init_cursor() local
511 cur = xfs_btree_alloc_cursor(mp, tp, &xfs_cntbt_ops, in xfs_cntbt_init_cursor()
513 cur->bc_group = xfs_group_hold(pag_group(pag)); in xfs_cntbt_init_cursor()
514 cur->bc_ag.agbp = agbp; in xfs_cntbt_init_cursor()
518 cur->bc_nlevels = be32_to_cpu(agf->agf_cnt_level); in xfs_cntbt_init_cursor()
520 return cur; in xfs_cntbt_init_cursor()
529 struct xfs_btree_cur *cur, in xfs_allocbt_commit_staged_btree() argument
534 struct xbtree_afakeroot *afake = cur->bc_ag.afake; in xfs_allocbt_commit_staged_btree()
536 ASSERT(cur->bc_flags & XFS_BTREE_STAGING); in xfs_allocbt_commit_staged_btree()
538 if (xfs_btree_is_bno(cur->bc_ops)) { in xfs_allocbt_commit_staged_btree()
547 xfs_btree_commit_afakeroot(cur, tp, agbp); in xfs_allocbt_commit_staged_btree()