Lines Matching refs:error

128 	int			error;  in xfs_alloc_get_rec()  local
130 error = xfs_btree_get_rec(cur, &rec, stat); in xfs_alloc_get_rec()
131 if (!error && *stat == 1) { in xfs_alloc_get_rec()
135 return error; in xfs_alloc_get_rec()
314 int error; /* error code */ in xfs_alloc_fixup_trees() local
329 if ((error = xfs_alloc_get_rec(cnt_cur, &nfbno1, &nflen1, &i))) in xfs_alloc_fixup_trees()
330 return error; in xfs_alloc_fixup_trees()
335 if ((error = xfs_alloc_lookup_eq(cnt_cur, fbno, flen, &i))) in xfs_alloc_fixup_trees()
336 return error; in xfs_alloc_fixup_trees()
344 if ((error = xfs_alloc_get_rec(bno_cur, &nfbno1, &nflen1, &i))) in xfs_alloc_fixup_trees()
345 return error; in xfs_alloc_fixup_trees()
350 if ((error = xfs_alloc_lookup_eq(bno_cur, fbno, flen, &i))) in xfs_alloc_fixup_trees()
351 return error; in xfs_alloc_fixup_trees()
392 if ((error = xfs_btree_delete(cnt_cur, &i))) in xfs_alloc_fixup_trees()
393 return error; in xfs_alloc_fixup_trees()
399 if ((error = xfs_alloc_lookup_eq(cnt_cur, nfbno1, nflen1, &i))) in xfs_alloc_fixup_trees()
400 return error; in xfs_alloc_fixup_trees()
402 if ((error = xfs_btree_insert(cnt_cur, &i))) in xfs_alloc_fixup_trees()
403 return error; in xfs_alloc_fixup_trees()
407 if ((error = xfs_alloc_lookup_eq(cnt_cur, nfbno2, nflen2, &i))) in xfs_alloc_fixup_trees()
408 return error; in xfs_alloc_fixup_trees()
410 if ((error = xfs_btree_insert(cnt_cur, &i))) in xfs_alloc_fixup_trees()
411 return error; in xfs_alloc_fixup_trees()
421 if ((error = xfs_btree_delete(bno_cur, &i))) in xfs_alloc_fixup_trees()
422 return error; in xfs_alloc_fixup_trees()
428 if ((error = xfs_alloc_update(bno_cur, nfbno1, nflen1))) in xfs_alloc_fixup_trees()
429 return error; in xfs_alloc_fixup_trees()
435 if ((error = xfs_alloc_lookup_eq(bno_cur, nfbno2, nflen2, &i))) in xfs_alloc_fixup_trees()
436 return error; in xfs_alloc_fixup_trees()
438 if ((error = xfs_btree_insert(bno_cur, &i))) in xfs_alloc_fixup_trees()
439 return error; in xfs_alloc_fixup_trees()
537 int error; in xfs_alloc_read_agfl() local
540 error = xfs_trans_read_buf( in xfs_alloc_read_agfl()
544 if (error) in xfs_alloc_read_agfl()
545 return error; in xfs_alloc_read_agfl()
588 int error=0; in xfs_alloc_ag_vextent() local
601 error = xfs_alloc_ag_vextent_size(args); in xfs_alloc_ag_vextent()
604 error = xfs_alloc_ag_vextent_near(args); in xfs_alloc_ag_vextent()
607 error = xfs_alloc_ag_vextent_exact(args); in xfs_alloc_ag_vextent()
614 if (error || args->agbno == NULLAGBLOCK) in xfs_alloc_ag_vextent()
615 return error; in xfs_alloc_ag_vextent()
623 error = xfs_alloc_update_counters(args->tp, args->pag, in xfs_alloc_ag_vextent()
626 if (error) in xfs_alloc_ag_vextent()
627 return error; in xfs_alloc_ag_vextent()
642 return error; in xfs_alloc_ag_vextent()
657 int error; in xfs_alloc_ag_vextent_exact() local
678 error = xfs_alloc_lookup_le(bno_cur, args->agbno, args->minlen, &i); in xfs_alloc_ag_vextent_exact()
679 if (error) in xfs_alloc_ag_vextent_exact()
687 error = xfs_alloc_get_rec(bno_cur, &fbno, &flen, &i); in xfs_alloc_ag_vextent_exact()
688 if (error) in xfs_alloc_ag_vextent_exact()
732 error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen, args->agbno, in xfs_alloc_ag_vextent_exact()
734 if (error) { in xfs_alloc_ag_vextent_exact()
756 return error; in xfs_alloc_ag_vextent_exact()
777 int error; in xfs_alloc_find_best_extent() local
788 error = xfs_alloc_get_rec(*scur, sbno, slen, &i); in xfs_alloc_find_best_extent()
789 if (error) in xfs_alloc_find_best_extent()
826 error = xfs_btree_increment(*scur, 0, &i); in xfs_alloc_find_best_extent()
828 error = xfs_btree_decrement(*scur, 0, &i); in xfs_alloc_find_best_extent()
829 if (error) in xfs_alloc_find_best_extent()
845 return error; in xfs_alloc_find_best_extent()
867 int error; /* error code */ in xfs_alloc_ag_vextent_near() local
903 if ((error = xfs_alloc_lookup_ge(cnt_cur, 0, args->maxlen, &i))) in xfs_alloc_ag_vextent_near()
910 if ((error = xfs_alloc_ag_vextent_small(args, cnt_cur, &ltbno, in xfs_alloc_ag_vextent_near()
951 if ((error = xfs_alloc_get_rec(cnt_cur, &ltbno, in xfs_alloc_ag_vextent_near()
957 if ((error = xfs_btree_increment(cnt_cur, 0, &i))) in xfs_alloc_ag_vextent_near()
966 !error && j && (blen < args->maxlen || bdiff > 0); in xfs_alloc_ag_vextent_near()
967 error = xfs_btree_increment(cnt_cur, 0, &j)) { in xfs_alloc_ag_vextent_near()
972 if ((error = xfs_alloc_get_rec(cnt_cur, &ltbno, &ltlen, &i))) in xfs_alloc_ag_vextent_near()
1005 if ((error = xfs_alloc_get_rec(cnt_cur, &ltbno, &ltlen, &i))) in xfs_alloc_ag_vextent_near()
1030 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur_lt, ltbno, in xfs_alloc_ag_vextent_near()
1059 if ((error = xfs_alloc_lookup_le(bno_cur_lt, args->agbno, args->maxlen, &i))) in xfs_alloc_ag_vextent_near()
1072 else if ((error = xfs_btree_dup_cursor(bno_cur_lt, &bno_cur_gt))) in xfs_alloc_ag_vextent_near()
1078 if ((error = xfs_btree_increment(bno_cur_gt, 0, &i))) in xfs_alloc_ag_vextent_near()
1094 if ((error = xfs_alloc_get_rec(bno_cur_lt, &ltbno, &ltlen, &i))) in xfs_alloc_ag_vextent_near()
1101 if ((error = xfs_btree_decrement(bno_cur_lt, 0, &i))) in xfs_alloc_ag_vextent_near()
1110 if ((error = xfs_alloc_get_rec(bno_cur_gt, &gtbno, &gtlen, &i))) in xfs_alloc_ag_vextent_near()
1117 if ((error = xfs_btree_increment(bno_cur_gt, 0, &i))) in xfs_alloc_ag_vextent_near()
1141 error = xfs_alloc_find_best_extent(args, in xfs_alloc_ag_vextent_near()
1158 error = xfs_alloc_find_best_extent(args, in xfs_alloc_ag_vextent_near()
1165 if (error) in xfs_alloc_ag_vextent_near()
1221 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur_lt, ltbno, ltlen, in xfs_alloc_ag_vextent_near()
1242 return error; in xfs_alloc_ag_vextent_near()
1257 int error; /* error result */ in xfs_alloc_ag_vextent_size() local
1276 if ((error = xfs_alloc_lookup_ge(cnt_cur, 0, in xfs_alloc_ag_vextent_size()
1289 error = xfs_alloc_ag_vextent_small(args, cnt_cur, in xfs_alloc_ag_vextent_size()
1291 if (error) in xfs_alloc_ag_vextent_size()
1308 error = xfs_alloc_get_rec(cnt_cur, &fbno, &flen, &i); in xfs_alloc_ag_vextent_size()
1309 if (error) in xfs_alloc_ag_vextent_size()
1319 error = xfs_btree_increment(cnt_cur, 0, &i); in xfs_alloc_ag_vextent_size()
1320 if (error) in xfs_alloc_ag_vextent_size()
1363 if ((error = xfs_btree_decrement(cnt_cur, 0, &i))) in xfs_alloc_ag_vextent_size()
1367 if ((error = xfs_alloc_get_rec(cnt_cur, &fbno, &flen, in xfs_alloc_ag_vextent_size()
1388 if ((error = xfs_alloc_lookup_eq(cnt_cur, bestfbno, bestflen, in xfs_alloc_ag_vextent_size()
1422 if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen, in xfs_alloc_ag_vextent_size()
1443 return error; in xfs_alloc_ag_vextent_size()
1465 int error; in xfs_alloc_ag_vextent_small() local
1470 if ((error = xfs_btree_decrement(ccur, 0, &i))) in xfs_alloc_ag_vextent_small()
1473 if ((error = xfs_alloc_get_rec(ccur, &fbno, &flen, &i))) in xfs_alloc_ag_vextent_small()
1485 error = xfs_alloc_get_freelist(args->tp, args->agbp, &fbno, 0); in xfs_alloc_ag_vextent_small()
1486 if (error) in xfs_alloc_ag_vextent_small()
1539 return error; in xfs_alloc_ag_vextent_small()
1556 int error; /* error return value */ in xfs_free_ag_extent() local
1579 if ((error = xfs_alloc_lookup_le(bno_cur, bno, len, &haveleft))) in xfs_free_ag_extent()
1585 if ((error = xfs_alloc_get_rec(bno_cur, &ltbno, &ltlen, &i))) in xfs_free_ag_extent()
1607 if ((error = xfs_btree_increment(bno_cur, 0, &haveright))) in xfs_free_ag_extent()
1613 if ((error = xfs_alloc_get_rec(bno_cur, &gtbno, &gtlen, &i))) in xfs_free_ag_extent()
1642 if ((error = xfs_alloc_lookup_eq(cnt_cur, ltbno, ltlen, &i))) in xfs_free_ag_extent()
1645 if ((error = xfs_btree_delete(cnt_cur, &i))) in xfs_free_ag_extent()
1651 if ((error = xfs_alloc_lookup_eq(cnt_cur, gtbno, gtlen, &i))) in xfs_free_ag_extent()
1654 if ((error = xfs_btree_delete(cnt_cur, &i))) in xfs_free_ag_extent()
1660 if ((error = xfs_btree_delete(bno_cur, &i))) in xfs_free_ag_extent()
1666 if ((error = xfs_btree_decrement(bno_cur, 0, &i))) in xfs_free_ag_extent()
1678 if ((error = xfs_alloc_get_rec(bno_cur, &xxbno, &xxlen, in xfs_free_ag_extent()
1691 if ((error = xfs_alloc_update(bno_cur, nbno, nlen))) in xfs_free_ag_extent()
1702 if ((error = xfs_alloc_lookup_eq(cnt_cur, ltbno, ltlen, &i))) in xfs_free_ag_extent()
1705 if ((error = xfs_btree_delete(cnt_cur, &i))) in xfs_free_ag_extent()
1712 if ((error = xfs_btree_decrement(bno_cur, 0, &i))) in xfs_free_ag_extent()
1717 if ((error = xfs_alloc_update(bno_cur, nbno, nlen))) in xfs_free_ag_extent()
1728 if ((error = xfs_alloc_lookup_eq(cnt_cur, gtbno, gtlen, &i))) in xfs_free_ag_extent()
1731 if ((error = xfs_btree_delete(cnt_cur, &i))) in xfs_free_ag_extent()
1740 if ((error = xfs_alloc_update(bno_cur, nbno, nlen))) in xfs_free_ag_extent()
1750 if ((error = xfs_btree_insert(bno_cur, &i))) in xfs_free_ag_extent()
1759 if ((error = xfs_alloc_lookup_eq(cnt_cur, nbno, nlen, &i))) in xfs_free_ag_extent()
1762 if ((error = xfs_btree_insert(cnt_cur, &i))) in xfs_free_ag_extent()
1772 error = xfs_alloc_update_counters(tp, pag, agbp, len); in xfs_free_ag_extent()
1774 if (error) in xfs_free_ag_extent()
1792 return error; in xfs_free_ag_extent()
1855 int error; /* error result code */ in xfs_alloc_fix_freelist() local
1868 if ((error = xfs_alloc_read_agf(mp, tp, args->agno, flags, in xfs_alloc_fix_freelist()
1870 return error; in xfs_alloc_fix_freelist()
1915 if ((error = xfs_alloc_read_agf(mp, tp, args->agno, flags, in xfs_alloc_fix_freelist()
1917 return error; in xfs_alloc_fix_freelist()
1955 error = xfs_alloc_get_freelist(tp, agbp, &bno, 0); in xfs_alloc_fix_freelist()
1956 if (error) in xfs_alloc_fix_freelist()
1957 return error; in xfs_alloc_fix_freelist()
1958 if ((error = xfs_free_ag_extent(tp, agbp, args->agno, bno, 1, 1))) in xfs_alloc_fix_freelist()
1959 return error; in xfs_alloc_fix_freelist()
1974 if ((error = xfs_alloc_read_agfl(mp, tp, targs.agno, &agflbp))) in xfs_alloc_fix_freelist()
1975 return error; in xfs_alloc_fix_freelist()
1985 if ((error = xfs_alloc_ag_vextent(&targs))) { in xfs_alloc_fix_freelist()
1987 return error; in xfs_alloc_fix_freelist()
2005 error = xfs_alloc_put_freelist(tp, agbp, in xfs_alloc_fix_freelist()
2007 if (error) in xfs_alloc_fix_freelist()
2008 return error; in xfs_alloc_fix_freelist()
2031 int error; in xfs_alloc_get_freelist() local
2047 error = xfs_alloc_read_agfl(mp, tp, be32_to_cpu(agf->agf_seqno), in xfs_alloc_get_freelist()
2049 if (error) in xfs_alloc_get_freelist()
2050 return error; in xfs_alloc_get_freelist()
2129 int error; in xfs_alloc_pagf_init() local
2131 if ((error = xfs_alloc_read_agf(mp, tp, agno, flags, &bp))) in xfs_alloc_pagf_init()
2132 return error; in xfs_alloc_pagf_init()
2151 int error; in xfs_alloc_put_freelist() local
2161 if (!agflbp && (error = xfs_alloc_read_agfl(mp, tp, in xfs_alloc_put_freelist()
2163 return error; in xfs_alloc_put_freelist()
2294 int error; in xfs_read_agf() local
2299 error = xfs_trans_read_buf( in xfs_read_agf()
2303 if (error) in xfs_read_agf()
2304 return error; in xfs_read_agf()
2326 int error; in xfs_alloc_read_agf() local
2331 error = xfs_read_agf(mp, tp, agno, in xfs_alloc_read_agf()
2334 if (error) in xfs_alloc_read_agf()
2335 return error; in xfs_alloc_read_agf()
2382 int error; in xfs_alloc_vextent() local
2430 error = xfs_alloc_fix_freelist(args, 0); in xfs_alloc_vextent()
2432 if (error) { in xfs_alloc_vextent()
2441 if ((error = xfs_alloc_ag_vextent(args))) in xfs_alloc_vextent()
2497 error = xfs_alloc_fix_freelist(args, flags); in xfs_alloc_vextent()
2499 if (error) { in xfs_alloc_vextent()
2507 if ((error = xfs_alloc_ag_vextent(args))) in xfs_alloc_vextent()
2585 return error; in xfs_alloc_vextent()
2600 int error; in xfs_free_extent() local
2622 error = xfs_alloc_fix_freelist(&args, XFS_ALLOC_FLAG_FREEING); in xfs_free_extent()
2623 if (error) in xfs_free_extent()
2629 error = -EFSCORRUPTED; in xfs_free_extent()
2633 error = xfs_free_ag_extent(tp, args.agbp, args.agno, args.agbno, len, 0); in xfs_free_extent()
2634 if (!error) in xfs_free_extent()
2638 return error; in xfs_free_extent()