Lines Matching full:error
132 int error; in xrep_setup_rtrefcountbt() local
135 error = xrep_setup_xfbtree(sc, descr); in xrep_setup_rtrefcountbt()
137 return error; in xrep_setup_rtrefcountbt()
178 int error = 0; in xrep_rtrefc_stash() local
180 if (xchk_should_terminate(rr->sc, &error)) in xrep_rtrefc_stash()
181 return error; in xrep_rtrefc_stash()
185 error = xrep_rtrefc_check_ext(rr->sc, &irec); in xrep_rtrefc_stash()
186 if (error) in xrep_rtrefc_stash()
187 return error; in xrep_rtrefc_stash()
230 int error = 0; in xrep_rtrefc_walk_rmaps() local
241 if (xchk_should_terminate(rr->sc, &error)) in xrep_rtrefc_walk_rmaps()
242 return error; in xrep_rtrefc_walk_rmaps()
244 error = xfs_btree_increment(cur, 0, &have_gt); in xrep_rtrefc_walk_rmaps()
245 if (error) in xrep_rtrefc_walk_rmaps()
246 return error; in xrep_rtrefc_walk_rmaps()
250 error = xfs_rmap_get_rec(cur, rmap, &have_gt); in xrep_rtrefc_walk_rmaps()
251 if (error) in xrep_rtrefc_walk_rmaps()
252 return error; in xrep_rtrefc_walk_rmaps()
259 error = xrep_rtrefc_stash_cow(rr, rmap->rm_startblock, in xrep_rtrefc_walk_rmaps()
261 if (error) in xrep_rtrefc_walk_rmaps()
262 return error; in xrep_rtrefc_walk_rmaps()
323 int error; in xrep_rtrefc_sort_records() local
325 error = xfarray_sort(rr->refcount_records, xrep_rtrefc_extent_cmp, in xrep_rtrefc_sort_records()
327 if (error) in xrep_rtrefc_sort_records()
328 return error; in xrep_rtrefc_sort_records()
331 if (xchk_should_terminate(rr->sc, &error)) in xrep_rtrefc_sort_records()
332 return error; in xrep_rtrefc_sort_records()
334 error = xfarray_load(rr->refcount_records, cur, &irec); in xrep_rtrefc_sort_records()
335 if (error) in xrep_rtrefc_sort_records()
336 return error; in xrep_rtrefc_sort_records()
352 return error; in xrep_rtrefc_sort_records()
363 int error = 0; in xrep_rtrefc_walk_rmap() local
365 if (xchk_should_terminate(rr->sc, &error)) in xrep_rtrefc_walk_rmap()
366 return error; in xrep_rtrefc_walk_rmap()
372 error = xrep_check_ino_btree_mapping(rr->sc, rec); in xrep_rtrefc_walk_rmap()
373 if (error) in xrep_rtrefc_walk_rmap()
374 return error; in xrep_rtrefc_walk_rmap()
397 int error; in xrep_rtrefc_push_rmaps_at() local
400 error = rcbag_add(rcstack, rr->sc->tp, rmap); in xrep_rtrefc_push_rmaps_at()
401 if (error) in xrep_rtrefc_push_rmaps_at()
402 return error; in xrep_rtrefc_push_rmaps_at()
404 error = xrep_rtrefc_walk_rmaps(rr, rmap, have); in xrep_rtrefc_push_rmaps_at()
405 if (error) in xrep_rtrefc_push_rmaps_at()
406 return error; in xrep_rtrefc_push_rmaps_at()
409 error = xfs_btree_decrement(sc->sr.rmap_cur, 0, &have_gt); in xrep_rtrefc_push_rmaps_at()
410 if (error) in xrep_rtrefc_push_rmaps_at()
411 return error; in xrep_rtrefc_push_rmaps_at()
427 int error; in xrep_rtrefc_scan_ag() local
429 error = xrep_ag_init(sc, pag, &sc->sa); in xrep_rtrefc_scan_ag()
430 if (error) in xrep_rtrefc_scan_ag()
431 return error; in xrep_rtrefc_scan_ag()
433 error = xfs_rmap_query_all(sc->sa.rmap_cur, xrep_rtrefc_walk_rmap, rr); in xrep_rtrefc_scan_ag()
435 return error; in xrep_rtrefc_scan_ag()
451 int error; in xrep_rtrefc_find_refcounts() local
455 error = xrep_rtrefc_scan_ag(rr, pag); in xrep_rtrefc_find_refcounts()
456 if (error) { in xrep_rtrefc_find_refcounts()
458 return error; in xrep_rtrefc_find_refcounts()
469 error = rcbag_init(sc->mp, sc->xmbtp, &rcstack); in xrep_rtrefc_find_refcounts()
470 if (error) in xrep_rtrefc_find_refcounts()
474 error = xfs_btree_goto_left_edge(sc->sr.rmap_cur); in xrep_rtrefc_find_refcounts()
475 if (error) in xrep_rtrefc_find_refcounts()
483 error = xrep_rtrefc_walk_rmaps(rr, &rmap, &have); in xrep_rtrefc_find_refcounts()
484 if (error) in xrep_rtrefc_find_refcounts()
489 error = xrep_rtrefc_push_rmaps_at(rr, rcstack, sbno, &rmap, in xrep_rtrefc_find_refcounts()
491 if (error) in xrep_rtrefc_find_refcounts()
495 error = rcbag_next_edge(rcstack, sc->tp, &rmap, have, &nbno); in xrep_rtrefc_find_refcounts()
496 if (error) in xrep_rtrefc_find_refcounts()
505 error = rcbag_remove_ending_at(rcstack, sc->tp, nbno); in xrep_rtrefc_find_refcounts()
506 if (error) in xrep_rtrefc_find_refcounts()
510 error = xrep_rtrefc_walk_rmaps(rr, &rmap, &have); in xrep_rtrefc_find_refcounts()
511 if (error) in xrep_rtrefc_find_refcounts()
514 error = xrep_rtrefc_push_rmaps_at(rr, rcstack, in xrep_rtrefc_find_refcounts()
516 if (error) in xrep_rtrefc_find_refcounts()
524 error = xrep_rtrefc_stash(rr, in xrep_rtrefc_find_refcounts()
528 if (error) in xrep_rtrefc_find_refcounts()
541 error = rcbag_next_edge(rcstack, sc->tp, &rmap, have, in xrep_rtrefc_find_refcounts()
543 if (error) in xrep_rtrefc_find_refcounts()
555 return error; in xrep_rtrefc_find_refcounts()
570 int error; in xrep_rtrefc_get_records() local
573 error = xfarray_load(rr->refcount_records, rr->array_cur++, in xrep_rtrefc_get_records()
575 if (error) in xrep_rtrefc_get_records()
576 return error; in xrep_rtrefc_get_records()
621 int error; in xrep_rtrefc_build_new_tree() local
623 error = xrep_rtrefc_sort_records(rr); in xrep_rtrefc_build_new_tree()
624 if (error) in xrep_rtrefc_build_new_tree()
625 return error; in xrep_rtrefc_build_new_tree()
633 error = xrep_newbt_init_metadir_inode(&rr->new_btree, sc); in xrep_rtrefc_build_new_tree()
634 if (error) in xrep_rtrefc_build_new_tree()
635 return error; in xrep_rtrefc_build_new_tree()
645 error = xfs_btree_bload_compute_geometry(refc_cur, &rr->new_btree.bload, in xrep_rtrefc_build_new_tree()
647 if (error) in xrep_rtrefc_build_new_tree()
651 if (xchk_should_terminate(sc, &error)) in xrep_rtrefc_build_new_tree()
661 error = xfs_trans_reserve_more_inode(sc->tp, rtg_refcount(rtg), in xrep_rtrefc_build_new_tree()
663 if (error) in xrep_rtrefc_build_new_tree()
667 error = xrep_newbt_alloc_blocks(&rr->new_btree, in xrep_rtrefc_build_new_tree()
669 if (error) in xrep_rtrefc_build_new_tree()
675 error = xfs_btree_bload(refc_cur, &rr->new_btree.bload, rr); in xrep_rtrefc_build_new_tree()
676 if (error) in xrep_rtrefc_build_new_tree()
689 error = xrep_newbt_commit(&rr->new_btree); in xrep_rtrefc_build_new_tree()
690 if (error) in xrep_rtrefc_build_new_tree()
691 return error; in xrep_rtrefc_build_new_tree()
695 xfs_btree_del_cursor(refc_cur, error); in xrep_rtrefc_build_new_tree()
697 return error; in xrep_rtrefc_build_new_tree()
708 int error; in xrep_rtrefc_remove_old_tree() local
714 error = xrep_reap_metadir_fsblocks(rr->sc, in xrep_rtrefc_remove_old_tree()
716 if (error) in xrep_rtrefc_remove_old_tree()
717 return error; in xrep_rtrefc_remove_old_tree()
734 int error; in xrep_rtrefcountbt() local
741 error = xrep_metadata_inode_forks(sc); in xrep_rtrefcountbt()
742 if (error) in xrep_rtrefcountbt()
743 return error; in xrep_rtrefcountbt()
752 error = xfarray_create(descr, mp->m_sb.sb_rextents, in xrep_rtrefcountbt()
756 if (error) in xrep_rtrefcountbt()
761 error = xrep_rtrefc_find_refcounts(rr); in xrep_rtrefcountbt()
762 if (error) in xrep_rtrefcountbt()
768 error = xrep_rtrefc_build_new_tree(rr); in xrep_rtrefcountbt()
769 if (error) in xrep_rtrefcountbt()
773 error = xrep_rtrefc_remove_old_tree(rr); in xrep_rtrefcountbt()
774 if (error) in xrep_rtrefcountbt()
782 return error; in xrep_rtrefcountbt()