Lines Matching refs:cur

182 	struct xfs_btree_cur	*cur)  in xfs_bmbt_dup_cursor()  argument
186 new = xfs_bmbt_init_cursor(cur->bc_mp, cur->bc_tp, in xfs_bmbt_dup_cursor()
187 cur->bc_ino.ip, cur->bc_ino.whichfork); in xfs_bmbt_dup_cursor()
188 new->bc_flags |= (cur->bc_flags & in xfs_bmbt_dup_cursor()
209 struct xfs_btree_cur *cur, in xfs_bmbt_alloc_block() argument
218 args.tp = cur->bc_tp; in xfs_bmbt_alloc_block()
219 args.mp = cur->bc_mp; in xfs_bmbt_alloc_block()
220 xfs_rmap_ino_bmbt_owner(&args.oinfo, cur->bc_ino.ip->i_ino, in xfs_bmbt_alloc_block()
221 cur->bc_ino.whichfork); in xfs_bmbt_alloc_block()
223 args.wasdel = cur->bc_flags & XFS_BTREE_BMBT_WASDEL; in xfs_bmbt_alloc_block()
233 if (cur->bc_tp->t_highest_agno == NULLAGNUMBER) in xfs_bmbt_alloc_block()
234 args.minleft = xfs_bmapi_minleft(cur->bc_tp, cur->bc_ino.ip, in xfs_bmbt_alloc_block()
235 cur->bc_ino.whichfork); in xfs_bmbt_alloc_block()
251 cur->bc_tp->t_flags |= XFS_TRANS_LOWMODE; in xfs_bmbt_alloc_block()
259 cur->bc_bmap.allocated++; in xfs_bmbt_alloc_block()
260 cur->bc_ino.ip->i_nblocks++; in xfs_bmbt_alloc_block()
261 xfs_trans_log_inode(args.tp, cur->bc_ino.ip, XFS_ILOG_CORE); in xfs_bmbt_alloc_block()
262 xfs_trans_mod_dquot_byino(args.tp, cur->bc_ino.ip, in xfs_bmbt_alloc_block()
273 struct xfs_btree_cur *cur, in xfs_bmbt_free_block() argument
276 struct xfs_mount *mp = cur->bc_mp; in xfs_bmbt_free_block()
277 struct xfs_inode *ip = cur->bc_ino.ip; in xfs_bmbt_free_block()
278 struct xfs_trans *tp = cur->bc_tp; in xfs_bmbt_free_block()
283 xfs_rmap_ino_bmbt_owner(&oinfo, ip->i_ino, cur->bc_ino.whichfork); in xfs_bmbt_free_block()
284 error = xfs_free_extent_later(cur->bc_tp, fsbno, 1, &oinfo, in xfs_bmbt_free_block()
297 struct xfs_btree_cur *cur, in xfs_bmbt_get_minrecs() argument
300 if (level == cur->bc_nlevels - 1) { in xfs_bmbt_get_minrecs()
301 struct xfs_ifork *ifp = xfs_btree_ifork_ptr(cur); in xfs_bmbt_get_minrecs()
303 return xfs_bmbt_maxrecs(cur->bc_mp, in xfs_bmbt_get_minrecs()
307 return cur->bc_mp->m_bmap_dmnr[level != 0]; in xfs_bmbt_get_minrecs()
312 struct xfs_btree_cur *cur, in xfs_bmbt_get_maxrecs() argument
315 if (level == cur->bc_nlevels - 1) { in xfs_bmbt_get_maxrecs()
316 struct xfs_ifork *ifp = xfs_btree_ifork_ptr(cur); in xfs_bmbt_get_maxrecs()
318 return xfs_bmbt_maxrecs(cur->bc_mp, in xfs_bmbt_get_maxrecs()
322 return cur->bc_mp->m_bmap_dmxr[level != 0]; in xfs_bmbt_get_maxrecs()
337 struct xfs_btree_cur *cur, in xfs_bmbt_get_dmaxrecs() argument
340 if (level != cur->bc_nlevels - 1) in xfs_bmbt_get_dmaxrecs()
341 return cur->bc_mp->m_bmap_dmxr[level != 0]; in xfs_bmbt_get_dmaxrecs()
342 return xfs_bmdr_maxrecs(cur->bc_ino.forksize, level == 0); in xfs_bmbt_get_dmaxrecs()
366 struct xfs_btree_cur *cur, in xfs_bmbt_init_rec_from_cur() argument
369 xfs_bmbt_disk_set_all(&rec->bmbt, &cur->bc_rec.b); in xfs_bmbt_init_rec_from_cur()
374 struct xfs_btree_cur *cur, in xfs_bmbt_key_diff() argument
378 cur->bc_rec.b.br_startoff; in xfs_bmbt_key_diff()
383 struct xfs_btree_cur *cur, in xfs_bmbt_diff_two_keys() argument
487 struct xfs_btree_cur *cur, in xfs_bmbt_keys_inorder() argument
497 struct xfs_btree_cur *cur, in xfs_bmbt_recs_inorder() argument
508 struct xfs_btree_cur *cur, in xfs_bmbt_keys_contiguous() argument
622 struct xfs_btree_cur *cur, in xfs_bmbt_broot_realloc() argument
625 return xfs_bmap_broot_realloc(cur->bc_ino.ip, cur->bc_ino.whichfork, in xfs_bmbt_broot_realloc()
671 struct xfs_btree_cur *cur; in xfs_bmbt_init_cursor() local
688 cur = xfs_btree_alloc_cursor(mp, tp, &xfs_bmbt_ops, maxlevels, in xfs_bmbt_init_cursor()
690 cur->bc_ino.ip = ip; in xfs_bmbt_init_cursor()
691 cur->bc_ino.whichfork = whichfork; in xfs_bmbt_init_cursor()
692 cur->bc_bmap.allocated = 0; in xfs_bmbt_init_cursor()
696 cur->bc_nlevels = be16_to_cpu(ifp->if_broot->bb_level) + 1; in xfs_bmbt_init_cursor()
697 cur->bc_ino.forksize = xfs_inode_fork_size(ip, whichfork); in xfs_bmbt_init_cursor()
699 return cur; in xfs_bmbt_init_cursor()
719 struct xfs_btree_cur *cur, in xfs_bmbt_commit_staged_btree() argument
723 struct xbtree_ifakeroot *ifake = cur->bc_ino.ifake; in xfs_bmbt_commit_staged_btree()
729 ASSERT(cur->bc_flags & XFS_BTREE_STAGING); in xfs_bmbt_commit_staged_btree()
737 ifp = xfs_ifork_ptr(cur->bc_ino.ip, whichfork); in xfs_bmbt_commit_staged_btree()
752 xfs_trans_log_inode(tp, cur->bc_ino.ip, flags); in xfs_bmbt_commit_staged_btree()
753 xfs_btree_commit_ifakeroot(cur, tp, whichfork); in xfs_bmbt_commit_staged_btree()
831 struct xfs_btree_cur *cur; in xfs_bmbt_change_owner() local
838 cur = xfs_bmbt_init_cursor(ip->i_mount, tp, ip, whichfork); in xfs_bmbt_change_owner()
839 cur->bc_flags |= XFS_BTREE_BMBT_INVALID_OWNER; in xfs_bmbt_change_owner()
841 error = xfs_btree_change_owner(cur, new_owner, buffer_list); in xfs_bmbt_change_owner()
842 xfs_btree_del_cursor(cur, error); in xfs_bmbt_change_owner()