Lines Matching refs:cur
29 struct xfs_btree_cur *cur) in xfs_refcountbt_dup_cursor() argument
31 return xfs_refcountbt_init_cursor(cur->bc_mp, cur->bc_tp, in xfs_refcountbt_dup_cursor()
32 cur->bc_ag.agbp, cur->bc_ag.pag); in xfs_refcountbt_dup_cursor()
37 struct xfs_btree_cur *cur, in xfs_refcountbt_set_root() argument
41 struct xfs_buf *agbp = cur->bc_ag.agbp; in xfs_refcountbt_set_root()
51 xfs_alloc_log_agf(cur->bc_tp, agbp, in xfs_refcountbt_set_root()
57 struct xfs_btree_cur *cur, in xfs_refcountbt_alloc_block() argument
62 struct xfs_buf *agbp = cur->bc_ag.agbp; in xfs_refcountbt_alloc_block()
68 args.tp = cur->bc_tp; in xfs_refcountbt_alloc_block()
69 args.mp = cur->bc_mp; in xfs_refcountbt_alloc_block()
71 args.fsbno = XFS_AGB_TO_FSB(cur->bc_mp, cur->bc_ag.pag->pag_agno, in xfs_refcountbt_alloc_block()
80 trace_xfs_refcountbt_alloc_block(cur->bc_mp, cur->bc_ag.pag->pag_agno, in xfs_refcountbt_alloc_block()
86 ASSERT(args.agno == cur->bc_ag.pag->pag_agno); in xfs_refcountbt_alloc_block()
91 xfs_alloc_log_agf(cur->bc_tp, agbp, XFS_AGF_REFCOUNT_BLOCKS); in xfs_refcountbt_alloc_block()
102 struct xfs_btree_cur *cur, in xfs_refcountbt_free_block() argument
105 struct xfs_mount *mp = cur->bc_mp; in xfs_refcountbt_free_block()
106 struct xfs_buf *agbp = cur->bc_ag.agbp; in xfs_refcountbt_free_block()
111 trace_xfs_refcountbt_free_block(cur->bc_mp, cur->bc_ag.pag->pag_agno, in xfs_refcountbt_free_block()
112 XFS_FSB_TO_AGBNO(cur->bc_mp, fsbno), 1); in xfs_refcountbt_free_block()
114 xfs_alloc_log_agf(cur->bc_tp, agbp, XFS_AGF_REFCOUNT_BLOCKS); in xfs_refcountbt_free_block()
115 error = xfs_free_extent(cur->bc_tp, fsbno, 1, &XFS_RMAP_OINFO_REFC, in xfs_refcountbt_free_block()
125 struct xfs_btree_cur *cur, in xfs_refcountbt_get_minrecs() argument
128 return cur->bc_mp->m_refc_mnr[level != 0]; in xfs_refcountbt_get_minrecs()
133 struct xfs_btree_cur *cur, in xfs_refcountbt_get_maxrecs() argument
136 return cur->bc_mp->m_refc_mxr[level != 0]; in xfs_refcountbt_get_maxrecs()
161 struct xfs_btree_cur *cur, in xfs_refcountbt_init_rec_from_cur() argument
164 const struct xfs_refcount_irec *irec = &cur->bc_rec.rc; in xfs_refcountbt_init_rec_from_cur()
170 rec->refc.rc_blockcount = cpu_to_be32(cur->bc_rec.rc.rc_blockcount); in xfs_refcountbt_init_rec_from_cur()
171 rec->refc.rc_refcount = cpu_to_be32(cur->bc_rec.rc.rc_refcount); in xfs_refcountbt_init_rec_from_cur()
176 struct xfs_btree_cur *cur, in xfs_refcountbt_init_ptr_from_cur() argument
179 struct xfs_agf *agf = cur->bc_ag.agbp->b_addr; in xfs_refcountbt_init_ptr_from_cur()
181 ASSERT(cur->bc_ag.pag->pag_agno == be32_to_cpu(agf->agf_seqno)); in xfs_refcountbt_init_ptr_from_cur()
188 struct xfs_btree_cur *cur, in xfs_refcountbt_key_diff() argument
192 const struct xfs_refcount_irec *irec = &cur->bc_rec.rc; in xfs_refcountbt_key_diff()
202 struct xfs_btree_cur *cur, in xfs_refcountbt_diff_two_keys() argument
283 struct xfs_btree_cur *cur, in xfs_refcountbt_keys_inorder() argument
293 struct xfs_btree_cur *cur, in xfs_refcountbt_recs_inorder() argument
332 struct xfs_btree_cur *cur; in xfs_refcountbt_init_common() local
336 cur = xfs_btree_alloc_cursor(mp, tp, XFS_BTNUM_REFC, in xfs_refcountbt_init_common()
338 cur->bc_statoff = XFS_STATS_CALC_INDEX(xs_refcbt_2); in xfs_refcountbt_init_common()
340 cur->bc_flags |= XFS_BTREE_CRC_BLOCKS; in xfs_refcountbt_init_common()
344 cur->bc_ag.pag = pag; in xfs_refcountbt_init_common()
346 cur->bc_ag.refc.nr_ops = 0; in xfs_refcountbt_init_common()
347 cur->bc_ag.refc.shape_changes = 0; in xfs_refcountbt_init_common()
348 cur->bc_ops = &xfs_refcountbt_ops; in xfs_refcountbt_init_common()
349 return cur; in xfs_refcountbt_init_common()
361 struct xfs_btree_cur *cur; in xfs_refcountbt_init_cursor() local
363 cur = xfs_refcountbt_init_common(mp, tp, pag); in xfs_refcountbt_init_cursor()
364 cur->bc_nlevels = be32_to_cpu(agf->agf_refcount_level); in xfs_refcountbt_init_cursor()
365 cur->bc_ag.agbp = agbp; in xfs_refcountbt_init_cursor()
366 return cur; in xfs_refcountbt_init_cursor()
376 struct xfs_btree_cur *cur; in xfs_refcountbt_stage_cursor() local
378 cur = xfs_refcountbt_init_common(mp, NULL, pag); in xfs_refcountbt_stage_cursor()
379 xfs_btree_stage_afakeroot(cur, afake); in xfs_refcountbt_stage_cursor()
380 return cur; in xfs_refcountbt_stage_cursor()
389 struct xfs_btree_cur *cur, in xfs_refcountbt_commit_staged_btree() argument
394 struct xbtree_afakeroot *afake = cur->bc_ag.afake; in xfs_refcountbt_commit_staged_btree()
396 ASSERT(cur->bc_flags & XFS_BTREE_STAGING); in xfs_refcountbt_commit_staged_btree()
404 xfs_btree_commit_afakeroot(cur, tp, agbp, &xfs_refcountbt_ops); in xfs_refcountbt_commit_staged_btree()