Lines Matching refs:cur
62 struct xfs_btree_cur *cur, /* btree cursor */ in xfs_inobt_lookup() argument
67 cur->bc_rec.i.ir_startino = ino; in xfs_inobt_lookup()
68 cur->bc_rec.i.ir_freecount = 0; in xfs_inobt_lookup()
69 cur->bc_rec.i.ir_free = 0; in xfs_inobt_lookup()
70 return xfs_btree_lookup(cur, dir, stat); in xfs_inobt_lookup()
79 struct xfs_btree_cur *cur, /* btree cursor */ in xfs_inobt_update() argument
87 return xfs_btree_update(cur, &rec); in xfs_inobt_update()
95 struct xfs_btree_cur *cur, /* btree cursor */ in xfs_inobt_get_rec() argument
102 error = xfs_btree_get_rec(cur, &rec, stat); in xfs_inobt_get_rec()
117 struct xfs_btree_cur *cur, in xfs_check_agi_freecount() argument
120 if (cur->bc_nlevels == 1) { in xfs_check_agi_freecount()
126 error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &i); in xfs_check_agi_freecount()
131 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_check_agi_freecount()
137 error = xfs_btree_increment(cur, 0, &i); in xfs_check_agi_freecount()
143 if (!XFS_FORCED_SHUTDOWN(cur->bc_mp)) in xfs_check_agi_freecount()
149 #define xfs_check_agi_freecount(cur, agi) 0 argument
278 xfs_btree_cur_t *cur; /* inode btree cursor */ in xfs_ialloc_ag_alloc() local
424 cur = xfs_inobt_init_cursor(args.mp, tp, agbp, agno); in xfs_ialloc_ag_alloc()
428 cur->bc_rec.i.ir_startino = thisino; in xfs_ialloc_ag_alloc()
429 cur->bc_rec.i.ir_freecount = XFS_INODES_PER_CHUNK; in xfs_ialloc_ag_alloc()
430 cur->bc_rec.i.ir_free = XFS_INOBT_ALL_FREE; in xfs_ialloc_ag_alloc()
431 error = xfs_btree_lookup(cur, XFS_LOOKUP_EQ, &i); in xfs_ialloc_ag_alloc()
433 xfs_btree_del_cursor(cur, XFS_BTREE_ERROR); in xfs_ialloc_ag_alloc()
437 error = xfs_btree_insert(cur, &i); in xfs_ialloc_ag_alloc()
439 xfs_btree_del_cursor(cur, XFS_BTREE_ERROR); in xfs_ialloc_ag_alloc()
444 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_ialloc_ag_alloc()
587 struct xfs_btree_cur *cur, in xfs_ialloc_next_rec() argument
596 error = xfs_btree_decrement(cur, 0, &i); in xfs_ialloc_next_rec()
598 error = xfs_btree_increment(cur, 0, &i); in xfs_ialloc_next_rec()
604 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_ialloc_next_rec()
615 struct xfs_btree_cur *cur, in xfs_ialloc_get_rec() argument
624 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_EQ, &i); in xfs_ialloc_get_rec()
629 error = xfs_inobt_get_rec(cur, rec, &i); in xfs_ialloc_get_rec()
657 struct xfs_btree_cur *cur, *tcur; in xfs_dialloc_ag() local
671 cur = xfs_inobt_init_cursor(mp, tp, agbp, agno); in xfs_dialloc_ag()
679 error = xfs_check_agi_freecount(cur, agi); in xfs_dialloc_ag()
691 error = xfs_inobt_lookup(cur, pagino, XFS_LOOKUP_LE, &i); in xfs_dialloc_ag()
696 error = xfs_inobt_get_rec(cur, &rec, &j); in xfs_dialloc_ag()
715 error = xfs_btree_dup_cursor(cur, &tcur); in xfs_dialloc_ag()
731 error = xfs_ialloc_get_rec(cur, pag->pagl_rightrec, in xfs_dialloc_ag()
742 error = xfs_ialloc_next_rec(cur, &rec, &doneright, 0); in xfs_dialloc_ag()
777 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_dialloc_ag()
778 cur = tcur; in xfs_dialloc_ag()
801 error = xfs_ialloc_next_rec(cur, &rec, in xfs_dialloc_ag()
819 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_dialloc_ag()
829 error = xfs_inobt_lookup(cur, be32_to_cpu(agi->agi_newino), in xfs_dialloc_ag()
835 error = xfs_inobt_get_rec(cur, &rec, &j); in xfs_dialloc_ag()
852 error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &i); in xfs_dialloc_ag()
858 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_dialloc_ag()
864 error = xfs_btree_increment(cur, 0, &i); in xfs_dialloc_ag()
879 error = xfs_inobt_update(cur, &rec); in xfs_dialloc_ag()
886 error = xfs_check_agi_freecount(cur, agi); in xfs_dialloc_ag()
890 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_dialloc_ag()
898 xfs_btree_del_cursor(cur, XFS_BTREE_ERROR); in xfs_dialloc_ag()
1082 xfs_btree_cur_t *cur; /* inode btree cursor */ in xfs_difree() local
1133 cur = xfs_inobt_init_cursor(mp, tp, agbp, agno); in xfs_difree()
1135 error = xfs_check_agi_freecount(cur, agi); in xfs_difree()
1142 if ((error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &i))) { in xfs_difree()
1148 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_difree()
1191 if ((error = xfs_btree_delete(cur, &i))) { in xfs_difree()
1203 error = xfs_inobt_update(cur, &rec); in xfs_difree()
1221 error = xfs_check_agi_freecount(cur, agi); in xfs_difree()
1225 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_difree()
1229 xfs_btree_del_cursor(cur, XFS_BTREE_ERROR); in xfs_difree()
1245 struct xfs_btree_cur *cur; in xfs_imap_lookup() local
1264 cur = xfs_inobt_init_cursor(mp, tp, agbp, agno); in xfs_imap_lookup()
1265 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &i); in xfs_imap_lookup()
1268 error = xfs_inobt_get_rec(cur, &rec, &i); in xfs_imap_lookup()
1274 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); in xfs_imap_lookup()