Lines Matching refs:cur

167 	struct xfs_btree_cur	*cur)  in xfs_bmbt_dup_cursor()  argument
171 new = xfs_bmbt_init_cursor(cur->bc_mp, cur->bc_tp, in xfs_bmbt_dup_cursor()
172 cur->bc_ino.ip, cur->bc_ino.whichfork); in xfs_bmbt_dup_cursor()
178 new->bc_ino.flags = cur->bc_ino.flags; in xfs_bmbt_dup_cursor()
199 struct xfs_btree_cur *cur, in xfs_bmbt_alloc_block() argument
208 args.tp = cur->bc_tp; in xfs_bmbt_alloc_block()
209 args.mp = cur->bc_mp; in xfs_bmbt_alloc_block()
210 xfs_rmap_ino_bmbt_owner(&args.oinfo, cur->bc_ino.ip->i_ino, in xfs_bmbt_alloc_block()
211 cur->bc_ino.whichfork); in xfs_bmbt_alloc_block()
213 args.wasdel = cur->bc_ino.flags & XFS_BTCUR_BMBT_WASDEL; in xfs_bmbt_alloc_block()
223 if (cur->bc_tp->t_highest_agno == NULLAGNUMBER) in xfs_bmbt_alloc_block()
224 args.minleft = xfs_bmapi_minleft(cur->bc_tp, cur->bc_ino.ip, in xfs_bmbt_alloc_block()
225 cur->bc_ino.whichfork); in xfs_bmbt_alloc_block()
241 cur->bc_tp->t_flags |= XFS_TRANS_LOWMODE; in xfs_bmbt_alloc_block()
249 cur->bc_ino.allocated++; in xfs_bmbt_alloc_block()
250 cur->bc_ino.ip->i_nblocks++; in xfs_bmbt_alloc_block()
251 xfs_trans_log_inode(args.tp, cur->bc_ino.ip, XFS_ILOG_CORE); in xfs_bmbt_alloc_block()
252 xfs_trans_mod_dquot_byino(args.tp, cur->bc_ino.ip, in xfs_bmbt_alloc_block()
263 struct xfs_btree_cur *cur, in xfs_bmbt_free_block() argument
266 struct xfs_mount *mp = cur->bc_mp; in xfs_bmbt_free_block()
267 struct xfs_inode *ip = cur->bc_ino.ip; in xfs_bmbt_free_block()
268 struct xfs_trans *tp = cur->bc_tp; in xfs_bmbt_free_block()
273 xfs_rmap_ino_bmbt_owner(&oinfo, ip->i_ino, cur->bc_ino.whichfork); in xfs_bmbt_free_block()
274 error = xfs_free_extent_later(cur->bc_tp, fsbno, 1, &oinfo, in xfs_bmbt_free_block()
287 struct xfs_btree_cur *cur, in xfs_bmbt_get_minrecs() argument
290 if (level == cur->bc_nlevels - 1) { in xfs_bmbt_get_minrecs()
293 ifp = xfs_ifork_ptr(cur->bc_ino.ip, in xfs_bmbt_get_minrecs()
294 cur->bc_ino.whichfork); in xfs_bmbt_get_minrecs()
296 return xfs_bmbt_maxrecs(cur->bc_mp, in xfs_bmbt_get_minrecs()
300 return cur->bc_mp->m_bmap_dmnr[level != 0]; in xfs_bmbt_get_minrecs()
305 struct xfs_btree_cur *cur, in xfs_bmbt_get_maxrecs() argument
308 if (level == cur->bc_nlevels - 1) { in xfs_bmbt_get_maxrecs()
311 ifp = xfs_ifork_ptr(cur->bc_ino.ip, in xfs_bmbt_get_maxrecs()
312 cur->bc_ino.whichfork); in xfs_bmbt_get_maxrecs()
314 return xfs_bmbt_maxrecs(cur->bc_mp, in xfs_bmbt_get_maxrecs()
318 return cur->bc_mp->m_bmap_dmxr[level != 0]; in xfs_bmbt_get_maxrecs()
333 struct xfs_btree_cur *cur, in xfs_bmbt_get_dmaxrecs() argument
336 if (level != cur->bc_nlevels - 1) in xfs_bmbt_get_dmaxrecs()
337 return cur->bc_mp->m_bmap_dmxr[level != 0]; in xfs_bmbt_get_dmaxrecs()
338 return xfs_bmdr_maxrecs(cur->bc_ino.forksize, level == 0); in xfs_bmbt_get_dmaxrecs()
362 struct xfs_btree_cur *cur, in xfs_bmbt_init_rec_from_cur() argument
365 xfs_bmbt_disk_set_all(&rec->bmbt, &cur->bc_rec.b); in xfs_bmbt_init_rec_from_cur()
370 struct xfs_btree_cur *cur, in xfs_bmbt_init_ptr_from_cur() argument
378 struct xfs_btree_cur *cur, in xfs_bmbt_key_diff() argument
382 cur->bc_rec.b.br_startoff; in xfs_bmbt_key_diff()
387 struct xfs_btree_cur *cur, in xfs_bmbt_diff_two_keys() argument
491 struct xfs_btree_cur *cur, in xfs_bmbt_keys_inorder() argument
501 struct xfs_btree_cur *cur, in xfs_bmbt_recs_inorder() argument
512 struct xfs_btree_cur *cur, in xfs_bmbt_keys_contiguous() argument
557 struct xfs_btree_cur *cur; in xfs_bmbt_init_cursor() local
560 cur = xfs_btree_alloc_cursor(mp, tp, XFS_BTNUM_BMAP, in xfs_bmbt_init_cursor()
562 cur->bc_nlevels = be16_to_cpu(ifp->if_broot->bb_level) + 1; in xfs_bmbt_init_cursor()
563 cur->bc_statoff = XFS_STATS_CALC_INDEX(xs_bmbt_2); in xfs_bmbt_init_cursor()
565 cur->bc_ops = &xfs_bmbt_ops; in xfs_bmbt_init_cursor()
566 cur->bc_flags = XFS_BTREE_LONG_PTRS | XFS_BTREE_ROOT_IN_INODE; in xfs_bmbt_init_cursor()
568 cur->bc_flags |= XFS_BTREE_CRC_BLOCKS; in xfs_bmbt_init_cursor()
570 cur->bc_ino.forksize = xfs_inode_fork_size(ip, whichfork); in xfs_bmbt_init_cursor()
571 cur->bc_ino.ip = ip; in xfs_bmbt_init_cursor()
572 cur->bc_ino.allocated = 0; in xfs_bmbt_init_cursor()
573 cur->bc_ino.flags = 0; in xfs_bmbt_init_cursor()
574 cur->bc_ino.whichfork = whichfork; in xfs_bmbt_init_cursor()
576 return cur; in xfs_bmbt_init_cursor()
665 struct xfs_btree_cur *cur; in xfs_bmbt_change_owner() local
672 cur = xfs_bmbt_init_cursor(ip->i_mount, tp, ip, whichfork); in xfs_bmbt_change_owner()
673 cur->bc_ino.flags |= XFS_BTCUR_BMBT_INVALID_OWNER; in xfs_bmbt_change_owner()
675 error = xfs_btree_change_owner(cur, new_owner, buffer_list); in xfs_bmbt_change_owner()
676 xfs_btree_del_cursor(cur, error); in xfs_bmbt_change_owner()