Lines Matching refs:cnt_cur
267 xfs_btree_cur_t *cnt_cur, /* cursor for by-size btree */ in xfs_alloc_fixup_trees() argument
287 if ((error = xfs_alloc_get_rec(cnt_cur, &nfbno1, &nflen1, &i))) in xfs_alloc_fixup_trees()
293 if ((error = xfs_alloc_lookup_eq(cnt_cur, fbno, flen, &i))) in xfs_alloc_fixup_trees()
318 cnt_cur->bc_nlevels == 1) { in xfs_alloc_fixup_trees()
320 cntblock = XFS_BUF_TO_ALLOC_BLOCK(cnt_cur->bc_bufs[0]); in xfs_alloc_fixup_trees()
350 if ((error = xfs_alloc_delete(cnt_cur, &i))) in xfs_alloc_fixup_trees()
357 if ((error = xfs_alloc_lookup_eq(cnt_cur, nfbno1, nflen1, &i))) in xfs_alloc_fixup_trees()
360 if ((error = xfs_alloc_insert(cnt_cur, &i))) in xfs_alloc_fixup_trees()
365 if ((error = xfs_alloc_lookup_eq(cnt_cur, nfbno2, nflen2, &i))) in xfs_alloc_fixup_trees()
368 if ((error = xfs_alloc_insert(cnt_cur, &i))) in xfs_alloc_fixup_trees()
649 xfs_btree_cur_t *cnt_cur;/* by count btree cursor */ in xfs_alloc_ag_vextent_exact() local
723 cnt_cur = xfs_btree_init_cursor(args->mp, args->tp, args->agbp, in xfs_alloc_ag_vextent_exact()
728 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen, in xfs_alloc_ag_vextent_exact()
730 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_ERROR); in xfs_alloc_ag_vextent_exact()
734 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_exact()
757 xfs_btree_cur_t *cnt_cur; /* cursor for count btree */ in xfs_alloc_ag_vextent_near() local
790 cnt_cur = xfs_btree_init_cursor(args->mp, args->tp, args->agbp, in xfs_alloc_ag_vextent_near()
797 if ((error = xfs_alloc_lookup_ge(cnt_cur, 0, args->maxlen, &i))) in xfs_alloc_ag_vextent_near()
804 if ((error = xfs_alloc_ag_vextent_small(args, cnt_cur, <bno, in xfs_alloc_ag_vextent_near()
808 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_near()
824 while (xfs_btree_islastblock(cnt_cur, 0)) { in xfs_alloc_ag_vextent_near()
841 cnt_cur->bc_ptrs[0] = 1; in xfs_alloc_ag_vextent_near()
843 if ((error = xfs_alloc_get_rec(cnt_cur, <bno, in xfs_alloc_ag_vextent_near()
849 if ((error = xfs_alloc_increment(cnt_cur, 0, &i))) in xfs_alloc_ag_vextent_near()
856 i = cnt_cur->bc_ptrs[0]; in xfs_alloc_ag_vextent_near()
859 error = xfs_alloc_increment(cnt_cur, 0, &j)) { in xfs_alloc_ag_vextent_near()
864 if ((error = xfs_alloc_get_rec(cnt_cur, <bno, <len, &i))) in xfs_alloc_ag_vextent_near()
883 besti = cnt_cur->bc_ptrs[0]; in xfs_alloc_ag_vextent_near()
895 cnt_cur->bc_ptrs[0] = besti; in xfs_alloc_ag_vextent_near()
896 if ((error = xfs_alloc_get_rec(cnt_cur, <bno, <len, &i))) in xfs_alloc_ag_vextent_near()
904 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_near()
923 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur_lt, ltbno, in xfs_alloc_ag_vextent_near()
926 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_near()
1248 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_near()
1259 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur_lt, ltbno, ltlen, in xfs_alloc_ag_vextent_near()
1263 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_near()
1269 if (cnt_cur != NULL) in xfs_alloc_ag_vextent_near()
1270 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_ERROR); in xfs_alloc_ag_vextent_near()
1289 xfs_btree_cur_t *cnt_cur; /* cursor for cnt btree */ in xfs_alloc_ag_vextent_size() local
1303 cnt_cur = xfs_btree_init_cursor(args->mp, args->tp, args->agbp, in xfs_alloc_ag_vextent_size()
1309 if ((error = xfs_alloc_lookup_ge(cnt_cur, 0, in xfs_alloc_ag_vextent_size()
1317 if ((error = xfs_alloc_ag_vextent_small(args, cnt_cur, &fbno, in xfs_alloc_ag_vextent_size()
1321 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_size()
1331 if ((error = xfs_alloc_get_rec(cnt_cur, &fbno, &flen, &i))) in xfs_alloc_ag_vextent_size()
1357 if ((error = xfs_alloc_decrement(cnt_cur, 0, &i))) in xfs_alloc_ag_vextent_size()
1361 if ((error = xfs_alloc_get_rec(cnt_cur, &fbno, &flen, in xfs_alloc_ag_vextent_size()
1382 if ((error = xfs_alloc_lookup_eq(cnt_cur, bestfbno, bestflen, in xfs_alloc_ag_vextent_size()
1398 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_size()
1410 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen, in xfs_alloc_ag_vextent_size()
1413 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_alloc_ag_vextent_size()
1415 cnt_cur = bno_cur = NULL; in xfs_alloc_ag_vextent_size()
1428 if (cnt_cur) in xfs_alloc_ag_vextent_size()
1429 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_ERROR); in xfs_alloc_ag_vextent_size()
1536 xfs_btree_cur_t *cnt_cur; /* cursor for by-size btree */ in xfs_free_ag_extent() local
1558 cnt_cur = NULL; in xfs_free_ag_extent()
1616 cnt_cur = xfs_btree_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_CNT, NULL, in xfs_free_ag_extent()
1626 if ((error = xfs_alloc_lookup_eq(cnt_cur, ltbno, ltlen, &i))) in xfs_free_ag_extent()
1629 if ((error = xfs_alloc_delete(cnt_cur, &i))) in xfs_free_ag_extent()
1635 if ((error = xfs_alloc_lookup_eq(cnt_cur, gtbno, gtlen, &i))) in xfs_free_ag_extent()
1638 if ((error = xfs_alloc_delete(cnt_cur, &i))) in xfs_free_ag_extent()
1686 if ((error = xfs_alloc_lookup_eq(cnt_cur, ltbno, ltlen, &i))) in xfs_free_ag_extent()
1689 if ((error = xfs_alloc_delete(cnt_cur, &i))) in xfs_free_ag_extent()
1712 if ((error = xfs_alloc_lookup_eq(cnt_cur, gtbno, gtlen, &i))) in xfs_free_ag_extent()
1715 if ((error = xfs_alloc_delete(cnt_cur, &i))) in xfs_free_ag_extent()
1743 if ((error = xfs_alloc_lookup_eq(cnt_cur, nbno, nlen, &i))) in xfs_free_ag_extent()
1746 if ((error = xfs_alloc_insert(cnt_cur, &i))) in xfs_free_ag_extent()
1749 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); in xfs_free_ag_extent()
1750 cnt_cur = NULL; in xfs_free_ag_extent()
1797 if (cnt_cur) in xfs_free_ag_extent()
1798 xfs_btree_del_cursor(cnt_cur, XFS_BTREE_ERROR); in xfs_free_ag_extent()