Lines Matching refs:cur

30 	struct xfs_btree_cur	*cur,  in xfs_inobt_get_minrecs()  argument
33 return M_IGEO(cur->bc_mp)->inobt_mnr[level != 0]; in xfs_inobt_get_minrecs()
38 struct xfs_btree_cur *cur) in xfs_inobt_dup_cursor() argument
40 return xfs_inobt_init_cursor(to_perag(cur->bc_group), cur->bc_tp, in xfs_inobt_dup_cursor()
41 cur->bc_ag.agbp); in xfs_inobt_dup_cursor()
46 struct xfs_btree_cur *cur) in xfs_finobt_dup_cursor() argument
48 return xfs_finobt_init_cursor(to_perag(cur->bc_group), cur->bc_tp, in xfs_finobt_dup_cursor()
49 cur->bc_ag.agbp); in xfs_finobt_dup_cursor()
54 struct xfs_btree_cur *cur, in xfs_inobt_set_root() argument
58 struct xfs_buf *agbp = cur->bc_ag.agbp; in xfs_inobt_set_root()
63 xfs_ialloc_log_agi(cur->bc_tp, agbp, XFS_AGI_ROOT | XFS_AGI_LEVEL); in xfs_inobt_set_root()
68 struct xfs_btree_cur *cur, in xfs_finobt_set_root() argument
72 struct xfs_buf *agbp = cur->bc_ag.agbp; in xfs_finobt_set_root()
77 xfs_ialloc_log_agi(cur->bc_tp, agbp, in xfs_finobt_set_root()
84 struct xfs_btree_cur *cur, in xfs_inobt_mod_blockcount() argument
87 struct xfs_buf *agbp = cur->bc_ag.agbp; in xfs_inobt_mod_blockcount()
90 if (!xfs_has_inobtcounts(cur->bc_mp)) in xfs_inobt_mod_blockcount()
93 if (xfs_btree_is_fino(cur->bc_ops)) in xfs_inobt_mod_blockcount()
97 xfs_ialloc_log_agi(cur->bc_tp, agbp, XFS_AGI_IBLOCKS); in xfs_inobt_mod_blockcount()
102 struct xfs_btree_cur *cur, in __xfs_inobt_alloc_block() argument
113 args.tp = cur->bc_tp; in __xfs_inobt_alloc_block()
114 args.mp = cur->bc_mp; in __xfs_inobt_alloc_block()
115 args.pag = to_perag(cur->bc_group); in __xfs_inobt_alloc_block()
135 xfs_inobt_mod_blockcount(cur, 1); in __xfs_inobt_alloc_block()
141 struct xfs_btree_cur *cur, in xfs_inobt_alloc_block() argument
146 return __xfs_inobt_alloc_block(cur, start, new, stat, XFS_AG_RESV_NONE); in xfs_inobt_alloc_block()
151 struct xfs_btree_cur *cur, in xfs_finobt_alloc_block() argument
156 if (cur->bc_mp->m_finobt_nores) in xfs_finobt_alloc_block()
157 return xfs_inobt_alloc_block(cur, start, new, stat); in xfs_finobt_alloc_block()
158 return __xfs_inobt_alloc_block(cur, start, new, stat, in xfs_finobt_alloc_block()
164 struct xfs_btree_cur *cur, in __xfs_inobt_free_block() argument
170 xfs_inobt_mod_blockcount(cur, -1); in __xfs_inobt_free_block()
171 fsbno = XFS_DADDR_TO_FSB(cur->bc_mp, xfs_buf_daddr(bp)); in __xfs_inobt_free_block()
172 return xfs_free_extent_later(cur->bc_tp, fsbno, 1, in __xfs_inobt_free_block()
178 struct xfs_btree_cur *cur, in xfs_inobt_free_block() argument
181 return __xfs_inobt_free_block(cur, bp, XFS_AG_RESV_NONE); in xfs_inobt_free_block()
186 struct xfs_btree_cur *cur, in xfs_finobt_free_block() argument
189 if (cur->bc_mp->m_finobt_nores) in xfs_finobt_free_block()
190 return xfs_inobt_free_block(cur, bp); in xfs_finobt_free_block()
191 return __xfs_inobt_free_block(cur, bp, XFS_AG_RESV_METADATA); in xfs_finobt_free_block()
196 struct xfs_btree_cur *cur, in xfs_inobt_get_maxrecs() argument
199 return M_IGEO(cur->bc_mp)->inobt_mxr[level != 0]; in xfs_inobt_get_maxrecs()
224 struct xfs_btree_cur *cur, in xfs_inobt_init_rec_from_cur() argument
227 rec->inobt.ir_startino = cpu_to_be32(cur->bc_rec.i.ir_startino); in xfs_inobt_init_rec_from_cur()
228 if (xfs_has_sparseinodes(cur->bc_mp)) { in xfs_inobt_init_rec_from_cur()
230 cpu_to_be16(cur->bc_rec.i.ir_holemask); in xfs_inobt_init_rec_from_cur()
231 rec->inobt.ir_u.sp.ir_count = cur->bc_rec.i.ir_count; in xfs_inobt_init_rec_from_cur()
232 rec->inobt.ir_u.sp.ir_freecount = cur->bc_rec.i.ir_freecount; in xfs_inobt_init_rec_from_cur()
236 cpu_to_be32(cur->bc_rec.i.ir_freecount); in xfs_inobt_init_rec_from_cur()
238 rec->inobt.ir_free = cpu_to_be64(cur->bc_rec.i.ir_free); in xfs_inobt_init_rec_from_cur()
246 struct xfs_btree_cur *cur, in xfs_inobt_init_ptr_from_cur() argument
249 struct xfs_agi *agi = cur->bc_ag.agbp->b_addr; in xfs_inobt_init_ptr_from_cur()
251 ASSERT(cur->bc_group->xg_gno == be32_to_cpu(agi->agi_seqno)); in xfs_inobt_init_ptr_from_cur()
258 struct xfs_btree_cur *cur, in xfs_finobt_init_ptr_from_cur() argument
261 struct xfs_agi *agi = cur->bc_ag.agbp->b_addr; in xfs_finobt_init_ptr_from_cur()
263 ASSERT(cur->bc_group->xg_gno == be32_to_cpu(agi->agi_seqno)); in xfs_finobt_init_ptr_from_cur()
270 struct xfs_btree_cur *cur, in xfs_inobt_key_diff() argument
274 cur->bc_rec.i.ir_startino; in xfs_inobt_key_diff()
279 struct xfs_btree_cur *cur, in xfs_inobt_diff_two_keys() argument
380 struct xfs_btree_cur *cur, in xfs_inobt_keys_inorder() argument
390 struct xfs_btree_cur *cur, in xfs_inobt_recs_inorder() argument
400 struct xfs_btree_cur *cur, in xfs_inobt_keys_contiguous() argument
483 struct xfs_btree_cur *cur; in xfs_inobt_init_cursor() local
485 cur = xfs_btree_alloc_cursor(mp, tp, &xfs_inobt_ops, in xfs_inobt_init_cursor()
487 cur->bc_group = xfs_group_hold(pag_group(pag)); in xfs_inobt_init_cursor()
488 cur->bc_ag.agbp = agbp; in xfs_inobt_init_cursor()
492 cur->bc_nlevels = be32_to_cpu(agi->agi_level); in xfs_inobt_init_cursor()
494 return cur; in xfs_inobt_init_cursor()
509 struct xfs_btree_cur *cur; in xfs_finobt_init_cursor() local
511 cur = xfs_btree_alloc_cursor(mp, tp, &xfs_finobt_ops, in xfs_finobt_init_cursor()
513 cur->bc_group = xfs_group_hold(pag_group(pag)); in xfs_finobt_init_cursor()
514 cur->bc_ag.agbp = agbp; in xfs_finobt_init_cursor()
518 cur->bc_nlevels = be32_to_cpu(agi->agi_free_level); in xfs_finobt_init_cursor()
520 return cur; in xfs_finobt_init_cursor()
529 struct xfs_btree_cur *cur, in xfs_inobt_commit_staged_btree() argument
534 struct xbtree_afakeroot *afake = cur->bc_ag.afake; in xfs_inobt_commit_staged_btree()
537 ASSERT(cur->bc_flags & XFS_BTREE_STAGING); in xfs_inobt_commit_staged_btree()
539 if (xfs_btree_is_ino(cur->bc_ops)) { in xfs_inobt_commit_staged_btree()
543 if (xfs_has_inobtcounts(cur->bc_mp)) { in xfs_inobt_commit_staged_btree()
548 xfs_btree_commit_afakeroot(cur, tp, agbp); in xfs_inobt_commit_staged_btree()
553 if (xfs_has_inobtcounts(cur->bc_mp)) { in xfs_inobt_commit_staged_btree()
558 xfs_btree_commit_afakeroot(cur, tp, agbp); in xfs_inobt_commit_staged_btree()
746 struct xfs_btree_cur *cur; in xfs_finobt_count_blocks() local
754 cur = xfs_finobt_init_cursor(pag, tp, agbp); in xfs_finobt_count_blocks()
755 error = xfs_btree_count_blocks(cur, &blocks); in xfs_finobt_count_blocks()
756 xfs_btree_del_cursor(cur, error); in xfs_finobt_count_blocks()