Lines Matching refs:cur
26 struct xfs_btree_cur *cur) in xfs_refcountbt_dup_cursor() argument
28 return xfs_refcountbt_init_cursor(cur->bc_mp, cur->bc_tp, in xfs_refcountbt_dup_cursor()
29 cur->bc_ag.agbp, cur->bc_ag.agno); in xfs_refcountbt_dup_cursor()
34 struct xfs_btree_cur *cur, in xfs_refcountbt_set_root() argument
38 struct xfs_buf *agbp = cur->bc_ag.agbp; in xfs_refcountbt_set_root()
48 xfs_alloc_log_agf(cur->bc_tp, agbp, in xfs_refcountbt_set_root()
54 struct xfs_btree_cur *cur, in xfs_refcountbt_alloc_block() argument
59 struct xfs_buf *agbp = cur->bc_ag.agbp; in xfs_refcountbt_alloc_block()
65 args.tp = cur->bc_tp; in xfs_refcountbt_alloc_block()
66 args.mp = cur->bc_mp; in xfs_refcountbt_alloc_block()
68 args.fsbno = XFS_AGB_TO_FSB(cur->bc_mp, cur->bc_ag.agno, in xfs_refcountbt_alloc_block()
77 trace_xfs_refcountbt_alloc_block(cur->bc_mp, cur->bc_ag.agno, in xfs_refcountbt_alloc_block()
83 ASSERT(args.agno == cur->bc_ag.agno); in xfs_refcountbt_alloc_block()
88 xfs_alloc_log_agf(cur->bc_tp, agbp, XFS_AGF_REFCOUNT_BLOCKS); in xfs_refcountbt_alloc_block()
99 struct xfs_btree_cur *cur, in xfs_refcountbt_free_block() argument
102 struct xfs_mount *mp = cur->bc_mp; in xfs_refcountbt_free_block()
103 struct xfs_buf *agbp = cur->bc_ag.agbp; in xfs_refcountbt_free_block()
108 trace_xfs_refcountbt_free_block(cur->bc_mp, cur->bc_ag.agno, in xfs_refcountbt_free_block()
109 XFS_FSB_TO_AGBNO(cur->bc_mp, fsbno), 1); in xfs_refcountbt_free_block()
111 xfs_alloc_log_agf(cur->bc_tp, agbp, XFS_AGF_REFCOUNT_BLOCKS); in xfs_refcountbt_free_block()
112 error = xfs_free_extent(cur->bc_tp, fsbno, 1, &XFS_RMAP_OINFO_REFC, in xfs_refcountbt_free_block()
122 struct xfs_btree_cur *cur, in xfs_refcountbt_get_minrecs() argument
125 return cur->bc_mp->m_refc_mnr[level != 0]; in xfs_refcountbt_get_minrecs()
130 struct xfs_btree_cur *cur, in xfs_refcountbt_get_maxrecs() argument
133 return cur->bc_mp->m_refc_mxr[level != 0]; in xfs_refcountbt_get_maxrecs()
158 struct xfs_btree_cur *cur, in xfs_refcountbt_init_rec_from_cur() argument
161 rec->refc.rc_startblock = cpu_to_be32(cur->bc_rec.rc.rc_startblock); in xfs_refcountbt_init_rec_from_cur()
162 rec->refc.rc_blockcount = cpu_to_be32(cur->bc_rec.rc.rc_blockcount); in xfs_refcountbt_init_rec_from_cur()
163 rec->refc.rc_refcount = cpu_to_be32(cur->bc_rec.rc.rc_refcount); in xfs_refcountbt_init_rec_from_cur()
168 struct xfs_btree_cur *cur, in xfs_refcountbt_init_ptr_from_cur() argument
171 struct xfs_agf *agf = cur->bc_ag.agbp->b_addr; in xfs_refcountbt_init_ptr_from_cur()
173 ASSERT(cur->bc_ag.agno == be32_to_cpu(agf->agf_seqno)); in xfs_refcountbt_init_ptr_from_cur()
180 struct xfs_btree_cur *cur, in xfs_refcountbt_key_diff() argument
183 struct xfs_refcount_irec *rec = &cur->bc_rec.rc; in xfs_refcountbt_key_diff()
191 struct xfs_btree_cur *cur, in xfs_refcountbt_diff_two_keys() argument
272 struct xfs_btree_cur *cur, in xfs_refcountbt_keys_inorder() argument
282 struct xfs_btree_cur *cur, in xfs_refcountbt_recs_inorder() argument
321 struct xfs_btree_cur *cur; in xfs_refcountbt_init_common() local
326 cur = kmem_cache_zalloc(xfs_btree_cur_zone, GFP_NOFS | __GFP_NOFAIL); in xfs_refcountbt_init_common()
327 cur->bc_tp = tp; in xfs_refcountbt_init_common()
328 cur->bc_mp = mp; in xfs_refcountbt_init_common()
329 cur->bc_btnum = XFS_BTNUM_REFC; in xfs_refcountbt_init_common()
330 cur->bc_blocklog = mp->m_sb.sb_blocklog; in xfs_refcountbt_init_common()
331 cur->bc_statoff = XFS_STATS_CALC_INDEX(xs_refcbt_2); in xfs_refcountbt_init_common()
333 cur->bc_ag.agno = agno; in xfs_refcountbt_init_common()
334 cur->bc_flags |= XFS_BTREE_CRC_BLOCKS; in xfs_refcountbt_init_common()
336 cur->bc_ag.refc.nr_ops = 0; in xfs_refcountbt_init_common()
337 cur->bc_ag.refc.shape_changes = 0; in xfs_refcountbt_init_common()
338 cur->bc_ops = &xfs_refcountbt_ops; in xfs_refcountbt_init_common()
339 return cur; in xfs_refcountbt_init_common()
351 struct xfs_btree_cur *cur; in xfs_refcountbt_init_cursor() local
353 cur = xfs_refcountbt_init_common(mp, tp, agno); in xfs_refcountbt_init_cursor()
354 cur->bc_nlevels = be32_to_cpu(agf->agf_refcount_level); in xfs_refcountbt_init_cursor()
355 cur->bc_ag.agbp = agbp; in xfs_refcountbt_init_cursor()
356 return cur; in xfs_refcountbt_init_cursor()
366 struct xfs_btree_cur *cur; in xfs_refcountbt_stage_cursor() local
368 cur = xfs_refcountbt_init_common(mp, NULL, agno); in xfs_refcountbt_stage_cursor()
369 xfs_btree_stage_afakeroot(cur, afake); in xfs_refcountbt_stage_cursor()
370 return cur; in xfs_refcountbt_stage_cursor()
379 struct xfs_btree_cur *cur, in xfs_refcountbt_commit_staged_btree() argument
384 struct xbtree_afakeroot *afake = cur->bc_ag.afake; in xfs_refcountbt_commit_staged_btree()
386 ASSERT(cur->bc_flags & XFS_BTREE_STAGING); in xfs_refcountbt_commit_staged_btree()
394 xfs_btree_commit_afakeroot(cur, tp, agbp, &xfs_refcountbt_ops); in xfs_refcountbt_commit_staged_btree()