Lines Matching refs:cur

166 	struct xfs_btree_cur	*cur)  in xfs_bmbt_dup_cursor()  argument
170 new = xfs_bmbt_init_cursor(cur->bc_mp, cur->bc_tp, in xfs_bmbt_dup_cursor()
171 cur->bc_ino.ip, cur->bc_ino.whichfork); in xfs_bmbt_dup_cursor()
177 new->bc_ino.flags = cur->bc_ino.flags; in xfs_bmbt_dup_cursor()
198 struct xfs_btree_cur *cur, in xfs_bmbt_alloc_block() argument
207 args.tp = cur->bc_tp; in xfs_bmbt_alloc_block()
208 args.mp = cur->bc_mp; in xfs_bmbt_alloc_block()
209 args.fsbno = cur->bc_tp->t_firstblock; 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()
228 } else if (cur->bc_tp->t_flags & XFS_TRANS_LOWMODE) { in xfs_bmbt_alloc_block()
235 args.wasdel = cur->bc_ino.flags & XFS_BTCUR_BMBT_WASDEL; in xfs_bmbt_alloc_block()
255 cur->bc_tp->t_flags |= XFS_TRANS_LOWMODE; in xfs_bmbt_alloc_block()
263 cur->bc_tp->t_firstblock = args.fsbno; in xfs_bmbt_alloc_block()
264 cur->bc_ino.allocated++; in xfs_bmbt_alloc_block()
265 cur->bc_ino.ip->i_nblocks++; in xfs_bmbt_alloc_block()
266 xfs_trans_log_inode(args.tp, cur->bc_ino.ip, XFS_ILOG_CORE); in xfs_bmbt_alloc_block()
267 xfs_trans_mod_dquot_byino(args.tp, cur->bc_ino.ip, in xfs_bmbt_alloc_block()
281 struct xfs_btree_cur *cur, in xfs_bmbt_free_block() argument
284 struct xfs_mount *mp = cur->bc_mp; in xfs_bmbt_free_block()
285 struct xfs_inode *ip = cur->bc_ino.ip; in xfs_bmbt_free_block()
286 struct xfs_trans *tp = cur->bc_tp; in xfs_bmbt_free_block()
290 xfs_rmap_ino_bmbt_owner(&oinfo, ip->i_ino, cur->bc_ino.whichfork); in xfs_bmbt_free_block()
291 xfs_free_extent_later(cur->bc_tp, fsbno, 1, &oinfo); in xfs_bmbt_free_block()
301 struct xfs_btree_cur *cur, in xfs_bmbt_get_minrecs() argument
304 if (level == cur->bc_nlevels - 1) { in xfs_bmbt_get_minrecs()
307 ifp = XFS_IFORK_PTR(cur->bc_ino.ip, in xfs_bmbt_get_minrecs()
308 cur->bc_ino.whichfork); in xfs_bmbt_get_minrecs()
310 return xfs_bmbt_maxrecs(cur->bc_mp, in xfs_bmbt_get_minrecs()
314 return cur->bc_mp->m_bmap_dmnr[level != 0]; in xfs_bmbt_get_minrecs()
319 struct xfs_btree_cur *cur, in xfs_bmbt_get_maxrecs() argument
322 if (level == cur->bc_nlevels - 1) { in xfs_bmbt_get_maxrecs()
325 ifp = XFS_IFORK_PTR(cur->bc_ino.ip, in xfs_bmbt_get_maxrecs()
326 cur->bc_ino.whichfork); in xfs_bmbt_get_maxrecs()
328 return xfs_bmbt_maxrecs(cur->bc_mp, in xfs_bmbt_get_maxrecs()
332 return cur->bc_mp->m_bmap_dmxr[level != 0]; in xfs_bmbt_get_maxrecs()
347 struct xfs_btree_cur *cur, in xfs_bmbt_get_dmaxrecs() argument
350 if (level != cur->bc_nlevels - 1) in xfs_bmbt_get_dmaxrecs()
351 return cur->bc_mp->m_bmap_dmxr[level != 0]; in xfs_bmbt_get_dmaxrecs()
352 return xfs_bmdr_maxrecs(cur->bc_ino.forksize, level == 0); in xfs_bmbt_get_dmaxrecs()
376 struct xfs_btree_cur *cur, in xfs_bmbt_init_rec_from_cur() argument
379 xfs_bmbt_disk_set_all(&rec->bmbt, &cur->bc_rec.b); in xfs_bmbt_init_rec_from_cur()
384 struct xfs_btree_cur *cur, in xfs_bmbt_init_ptr_from_cur() argument
392 struct xfs_btree_cur *cur, in xfs_bmbt_key_diff() argument
396 cur->bc_rec.b.br_startoff; in xfs_bmbt_key_diff()
401 struct xfs_btree_cur *cur, in xfs_bmbt_diff_two_keys() argument
502 struct xfs_btree_cur *cur, in xfs_bmbt_keys_inorder() argument
512 struct xfs_btree_cur *cur, in xfs_bmbt_recs_inorder() argument
554 struct xfs_btree_cur *cur; in xfs_bmbt_init_cursor() local
557 cur = xfs_btree_alloc_cursor(mp, tp, XFS_BTNUM_BMAP, in xfs_bmbt_init_cursor()
559 cur->bc_nlevels = be16_to_cpu(ifp->if_broot->bb_level) + 1; in xfs_bmbt_init_cursor()
560 cur->bc_statoff = XFS_STATS_CALC_INDEX(xs_bmbt_2); in xfs_bmbt_init_cursor()
562 cur->bc_ops = &xfs_bmbt_ops; in xfs_bmbt_init_cursor()
563 cur->bc_flags = XFS_BTREE_LONG_PTRS | XFS_BTREE_ROOT_IN_INODE; in xfs_bmbt_init_cursor()
565 cur->bc_flags |= XFS_BTREE_CRC_BLOCKS; in xfs_bmbt_init_cursor()
567 cur->bc_ino.forksize = XFS_IFORK_SIZE(ip, whichfork); in xfs_bmbt_init_cursor()
568 cur->bc_ino.ip = ip; in xfs_bmbt_init_cursor()
569 cur->bc_ino.allocated = 0; in xfs_bmbt_init_cursor()
570 cur->bc_ino.flags = 0; in xfs_bmbt_init_cursor()
571 cur->bc_ino.whichfork = whichfork; in xfs_bmbt_init_cursor()
573 return cur; in xfs_bmbt_init_cursor()
657 struct xfs_btree_cur *cur; in xfs_bmbt_change_owner() local
664 cur = xfs_bmbt_init_cursor(ip->i_mount, tp, ip, whichfork); in xfs_bmbt_change_owner()
665 cur->bc_ino.flags |= XFS_BTCUR_BMBT_INVALID_OWNER; in xfs_bmbt_change_owner()
667 error = xfs_btree_change_owner(cur, new_owner, buffer_list); in xfs_bmbt_change_owner()
668 xfs_btree_del_cursor(cur, error); in xfs_bmbt_change_owner()