Lines Matching refs:cnt_cur
308 xfs_btree_cur_t *cnt_cur, /* cursor for by-size btree */
328 if ((error = xfs_alloc_get_rec(cnt_cur, &nfbno1, &nflen1, &i)))
334 if ((error = xfs_alloc_lookup_eq(cnt_cur, fbno, flen, &i)))
355 if (bno_cur->bc_nlevels == 1 && cnt_cur->bc_nlevels == 1) {
360 cntblock = XFS_BUF_TO_BLOCK(cnt_cur->bc_bufs[0]);
391 if ((error = xfs_btree_delete(cnt_cur, &i)))
398 if ((error = xfs_alloc_lookup_eq(cnt_cur, nfbno1, nflen1, &i)))
401 if ((error = xfs_btree_insert(cnt_cur, &i)))
406 if ((error = xfs_alloc_lookup_eq(cnt_cur, nfbno2, nflen2, &i)))
409 if ((error = xfs_btree_insert(cnt_cur, &i)))
568 xfs_btree_cur_t *cnt_cur;/* by count btree cursor */
639 cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp,
643 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen,
645 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_ERROR);
649 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
673 xfs_btree_cur_t *cnt_cur; /* cursor for count btree */
701 cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp,
708 if ((error = xfs_alloc_lookup_ge(cnt_cur, 0, args->maxlen, &i)))
715 if ((error = xfs_alloc_ag_vextent_small(args, cnt_cur, <bno,
719 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
735 while (xfs_btree_islastblock(cnt_cur, 0)) {
752 cnt_cur->bc_ptrs[0] = 1;
754 if ((error = xfs_alloc_get_rec(cnt_cur, <bno,
760 if ((error = xfs_btree_increment(cnt_cur, 0, &i)))
767 i = cnt_cur->bc_ptrs[0];
770 error = xfs_btree_increment(cnt_cur, 0, &j)) {
775 if ((error = xfs_alloc_get_rec(cnt_cur, <bno, <len, &i)))
794 besti = cnt_cur->bc_ptrs[0];
806 cnt_cur->bc_ptrs[0] = besti;
807 if ((error = xfs_alloc_get_rec(cnt_cur, <bno, <len, &i)))
813 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
832 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur_lt, ltbno,
835 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
1157 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
1167 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur_lt, ltbno, ltlen,
1176 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
1182 if (cnt_cur != NULL)
1183 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_ERROR);
1202 xfs_btree_cur_t *cnt_cur; /* cursor for cnt btree */
1213 cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp,
1219 if ((error = xfs_alloc_lookup_ge(cnt_cur, 0,
1227 if ((error = xfs_alloc_ag_vextent_small(args, cnt_cur, &fbno,
1231 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
1241 if ((error = xfs_alloc_get_rec(cnt_cur, &fbno, &flen, &i)))
1267 if ((error = xfs_btree_decrement(cnt_cur, 0, &i)))
1271 if ((error = xfs_alloc_get_rec(cnt_cur, &fbno, &flen,
1292 if ((error = xfs_alloc_lookup_eq(cnt_cur, bestfbno, bestflen,
1308 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
1320 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen,
1323 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
1325 cnt_cur = bno_cur = NULL;
1337 if (cnt_cur)
1338 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_ERROR);
1444 xfs_btree_cur_t *cnt_cur; /* cursor for by-size btree */
1462 cnt_cur = NULL;
1520 cnt_cur = xfs_allocbt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_CNT);
1529 if ((error = xfs_alloc_lookup_eq(cnt_cur, ltbno, ltlen, &i)))
1532 if ((error = xfs_btree_delete(cnt_cur, &i)))
1538 if ((error = xfs_alloc_lookup_eq(cnt_cur, gtbno, gtlen, &i)))
1541 if ((error = xfs_btree_delete(cnt_cur, &i)))
1589 if ((error = xfs_alloc_lookup_eq(cnt_cur, ltbno, ltlen, &i)))
1592 if ((error = xfs_btree_delete(cnt_cur, &i)))
1615 if ((error = xfs_alloc_lookup_eq(cnt_cur, gtbno, gtlen, &i)))
1618 if ((error = xfs_btree_delete(cnt_cur, &i)))
1646 if ((error = xfs_alloc_lookup_eq(cnt_cur, nbno, nlen, &i)))
1649 if ((error = xfs_btree_insert(cnt_cur, &i)))
1652 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR);
1653 cnt_cur = NULL;
1699 if (cnt_cur)
1700 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_ERROR);