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()
70 args.pag = cur->bc_ag.pag; 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()
110 trace_xfs_refcountbt_free_block(cur->bc_mp, cur->bc_ag.pag->pag_agno, in xfs_refcountbt_free_block()
111 XFS_FSB_TO_AGBNO(cur->bc_mp, fsbno), 1); in xfs_refcountbt_free_block()
113 xfs_alloc_log_agf(cur->bc_tp, agbp, XFS_AGF_REFCOUNT_BLOCKS); in xfs_refcountbt_free_block()
114 return xfs_free_extent_later(cur->bc_tp, fsbno, 1, in xfs_refcountbt_free_block()
120 struct xfs_btree_cur *cur, in xfs_refcountbt_get_minrecs() argument
123 return cur->bc_mp->m_refc_mnr[level != 0]; in xfs_refcountbt_get_minrecs()
128 struct xfs_btree_cur *cur, in xfs_refcountbt_get_maxrecs() argument
131 return cur->bc_mp->m_refc_mxr[level != 0]; in xfs_refcountbt_get_maxrecs()
156 struct xfs_btree_cur *cur, in xfs_refcountbt_init_rec_from_cur() argument
159 const struct xfs_refcount_irec *irec = &cur->bc_rec.rc; in xfs_refcountbt_init_rec_from_cur()
165 rec->refc.rc_blockcount = cpu_to_be32(cur->bc_rec.rc.rc_blockcount); in xfs_refcountbt_init_rec_from_cur()
166 rec->refc.rc_refcount = cpu_to_be32(cur->bc_rec.rc.rc_refcount); in xfs_refcountbt_init_rec_from_cur()
171 struct xfs_btree_cur *cur, in xfs_refcountbt_init_ptr_from_cur() argument
174 struct xfs_agf *agf = cur->bc_ag.agbp->b_addr; in xfs_refcountbt_init_ptr_from_cur()
176 ASSERT(cur->bc_ag.pag->pag_agno == be32_to_cpu(agf->agf_seqno)); in xfs_refcountbt_init_ptr_from_cur()
183 struct xfs_btree_cur *cur, in xfs_refcountbt_key_diff() argument
187 const struct xfs_refcount_irec *irec = &cur->bc_rec.rc; in xfs_refcountbt_key_diff()
197 struct xfs_btree_cur *cur, in xfs_refcountbt_diff_two_keys() argument
281 struct xfs_btree_cur *cur, in xfs_refcountbt_keys_inorder() argument
291 struct xfs_btree_cur *cur, in xfs_refcountbt_recs_inorder() argument
302 struct xfs_btree_cur *cur, in xfs_refcountbt_keys_contiguous() argument
344 struct xfs_btree_cur *cur; in xfs_refcountbt_init_common() local
348 cur = xfs_btree_alloc_cursor(mp, tp, XFS_BTNUM_REFC, in xfs_refcountbt_init_common()
350 cur->bc_statoff = XFS_STATS_CALC_INDEX(xs_refcbt_2); in xfs_refcountbt_init_common()
352 cur->bc_flags |= XFS_BTREE_CRC_BLOCKS; in xfs_refcountbt_init_common()
354 cur->bc_ag.pag = xfs_perag_hold(pag); in xfs_refcountbt_init_common()
355 cur->bc_ag.refc.nr_ops = 0; in xfs_refcountbt_init_common()
356 cur->bc_ag.refc.shape_changes = 0; in xfs_refcountbt_init_common()
357 cur->bc_ops = &xfs_refcountbt_ops; in xfs_refcountbt_init_common()
358 return cur; in xfs_refcountbt_init_common()
370 struct xfs_btree_cur *cur; in xfs_refcountbt_init_cursor() local
372 cur = xfs_refcountbt_init_common(mp, tp, pag); in xfs_refcountbt_init_cursor()
373 cur->bc_nlevels = be32_to_cpu(agf->agf_refcount_level); in xfs_refcountbt_init_cursor()
374 cur->bc_ag.agbp = agbp; in xfs_refcountbt_init_cursor()
375 return cur; in xfs_refcountbt_init_cursor()
385 struct xfs_btree_cur *cur; in xfs_refcountbt_stage_cursor() local
387 cur = xfs_refcountbt_init_common(mp, NULL, pag); in xfs_refcountbt_stage_cursor()
388 xfs_btree_stage_afakeroot(cur, afake); in xfs_refcountbt_stage_cursor()
389 return cur; in xfs_refcountbt_stage_cursor()
398 struct xfs_btree_cur *cur, in xfs_refcountbt_commit_staged_btree() argument
403 struct xbtree_afakeroot *afake = cur->bc_ag.afake; in xfs_refcountbt_commit_staged_btree()
405 ASSERT(cur->bc_flags & XFS_BTREE_STAGING); in xfs_refcountbt_commit_staged_btree()
413 xfs_btree_commit_afakeroot(cur, tp, agbp, &xfs_refcountbt_ops); in xfs_refcountbt_commit_staged_btree()