Lines Matching refs:cnt_cur
415 xfs_btree_cur_t *cnt_cur, /* cursor for by-size btree */ in xfs_alloc_fixup_trees() argument
431 mp = cnt_cur->bc_mp; in xfs_alloc_fixup_trees()
438 if ((error = xfs_alloc_get_rec(cnt_cur, &nfbno1, &nflen1, &i))) in xfs_alloc_fixup_trees()
444 if ((error = xfs_alloc_lookup_eq(cnt_cur, fbno, flen, &i))) in xfs_alloc_fixup_trees()
465 if (bno_cur->bc_nlevels == 1 && cnt_cur->bc_nlevels == 1) { in xfs_alloc_fixup_trees()
470 cntblock = XFS_BUF_TO_BLOCK(cnt_cur->bc_bufs[0]); in xfs_alloc_fixup_trees()
501 if ((error = xfs_btree_delete(cnt_cur, &i))) in xfs_alloc_fixup_trees()
508 if ((error = xfs_alloc_lookup_eq(cnt_cur, nfbno1, nflen1, &i))) in xfs_alloc_fixup_trees()
511 if ((error = xfs_btree_insert(cnt_cur, &i))) in xfs_alloc_fixup_trees()
516 if ((error = xfs_alloc_lookup_eq(cnt_cur, nfbno2, nflen2, &i))) in xfs_alloc_fixup_trees()
519 if ((error = xfs_btree_insert(cnt_cur, &i))) in xfs_alloc_fixup_trees()
785 xfs_btree_cur_t *cnt_cur;/* by count btree cursor */ in xfs_alloc_ag_vextent_exact() local
857 cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp, in xfs_alloc_ag_vextent_exact()
861 error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen, args->agbno, in xfs_alloc_ag_vextent_exact()
864 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_ERROR); in xfs_alloc_ag_vextent_exact()
869 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_exact()
995 xfs_btree_cur_t *cnt_cur; /* cursor for count btree */ in xfs_alloc_ag_vextent_near() local
1045 cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp, in xfs_alloc_ag_vextent_near()
1051 if ((error = xfs_alloc_lookup_ge(cnt_cur, 0, args->maxlen, &i))) in xfs_alloc_ag_vextent_near()
1058 if ((error = xfs_alloc_ag_vextent_small(args, cnt_cur, <bno, in xfs_alloc_ag_vextent_near()
1062 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_near()
1080 while (xfs_btree_islastblock(cnt_cur, 0)) { in xfs_alloc_ag_vextent_near()
1097 cnt_cur->bc_ptrs[0] = 1; in xfs_alloc_ag_vextent_near()
1099 if ((error = xfs_alloc_get_rec(cnt_cur, <bno, in xfs_alloc_ag_vextent_near()
1105 if ((error = xfs_btree_increment(cnt_cur, 0, &i))) in xfs_alloc_ag_vextent_near()
1112 i = cnt_cur->bc_ptrs[0]; in xfs_alloc_ag_vextent_near()
1115 error = xfs_btree_increment(cnt_cur, 0, &j)) { in xfs_alloc_ag_vextent_near()
1120 if ((error = xfs_alloc_get_rec(cnt_cur, <bno, <len, &i))) in xfs_alloc_ag_vextent_near()
1142 besti = cnt_cur->bc_ptrs[0]; in xfs_alloc_ag_vextent_near()
1154 cnt_cur->bc_ptrs[0] = besti; in xfs_alloc_ag_vextent_near()
1155 if ((error = xfs_alloc_get_rec(cnt_cur, <bno, <len, &i))) in xfs_alloc_ag_vextent_near()
1175 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur_lt, ltbno, in xfs_alloc_ag_vextent_near()
1178 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_near()
1318 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_near()
1361 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur_lt, ltbno, ltlen, in xfs_alloc_ag_vextent_near()
1370 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_near()
1376 if (cnt_cur != NULL) in xfs_alloc_ag_vextent_near()
1377 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_ERROR); in xfs_alloc_ag_vextent_near()
1396 xfs_btree_cur_t *cnt_cur; /* cursor for cnt btree */ in xfs_alloc_ag_vextent_size() local
1410 cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp, in xfs_alloc_ag_vextent_size()
1418 if ((error = xfs_alloc_lookup_ge(cnt_cur, 0, in xfs_alloc_ag_vextent_size()
1430 error = xfs_alloc_ag_vextent_small(args, cnt_cur, in xfs_alloc_ag_vextent_size()
1435 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_size()
1447 error = xfs_alloc_get_rec(cnt_cur, &fbno, &flen, &i); in xfs_alloc_ag_vextent_size()
1458 error = xfs_btree_increment(cnt_cur, 0, &i); in xfs_alloc_ag_vextent_size()
1467 xfs_btree_del_cursor(cnt_cur, in xfs_alloc_ag_vextent_size()
1497 if ((error = xfs_btree_decrement(cnt_cur, 0, &i))) in xfs_alloc_ag_vextent_size()
1501 if ((error = xfs_alloc_get_rec(cnt_cur, &fbno, &flen, in xfs_alloc_ag_vextent_size()
1522 if ((error = xfs_alloc_lookup_eq(cnt_cur, bestfbno, bestflen, in xfs_alloc_ag_vextent_size()
1538 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_size()
1554 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen, in xfs_alloc_ag_vextent_size()
1557 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_size()
1559 cnt_cur = bno_cur = NULL; in xfs_alloc_ag_vextent_size()
1571 if (cnt_cur) in xfs_alloc_ag_vextent_size()
1572 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_ERROR); in xfs_alloc_ag_vextent_size()
1578 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_size()
1706 xfs_btree_cur_t *cnt_cur; /* cursor for by-size btree */ in xfs_free_ag_extent() local
1720 bno_cur = cnt_cur = NULL; in xfs_free_ag_extent()
1791 cnt_cur = xfs_allocbt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_CNT); in xfs_free_ag_extent()
1800 if ((error = xfs_alloc_lookup_eq(cnt_cur, ltbno, ltlen, &i))) in xfs_free_ag_extent()
1803 if ((error = xfs_btree_delete(cnt_cur, &i))) in xfs_free_ag_extent()
1809 if ((error = xfs_alloc_lookup_eq(cnt_cur, gtbno, gtlen, &i))) in xfs_free_ag_extent()
1812 if ((error = xfs_btree_delete(cnt_cur, &i))) in xfs_free_ag_extent()
1860 if ((error = xfs_alloc_lookup_eq(cnt_cur, ltbno, ltlen, &i))) in xfs_free_ag_extent()
1863 if ((error = xfs_btree_delete(cnt_cur, &i))) in xfs_free_ag_extent()
1886 if ((error = xfs_alloc_lookup_eq(cnt_cur, gtbno, gtlen, &i))) in xfs_free_ag_extent()
1889 if ((error = xfs_btree_delete(cnt_cur, &i))) in xfs_free_ag_extent()
1917 if ((error = xfs_alloc_lookup_eq(cnt_cur, nbno, nlen, &i))) in xfs_free_ag_extent()
1920 if ((error = xfs_btree_insert(cnt_cur, &i))) in xfs_free_ag_extent()
1923 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_free_ag_extent()
1924 cnt_cur = NULL; in xfs_free_ag_extent()
1947 if (cnt_cur) in xfs_free_ag_extent()
1948 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_ERROR); in xfs_free_ag_extent()