Lines Matching full:error
185 int error; in xrep_setup_directory() local
189 error = xrep_orphanage_try_create(sc); in xrep_setup_directory()
190 if (error) in xrep_setup_directory()
191 return error; in xrep_setup_directory()
193 error = xrep_tempfile_create(sc, S_IFDIR); in xrep_setup_directory()
194 if (error) in xrep_setup_directory()
195 return error; in xrep_setup_directory()
217 int error; in xrep_dir_lookup_parent() local
219 error = xfs_dir_lookup(sc->tp, sc->ip, &xfs_name_dotdot, &ino, NULL); in xrep_dir_lookup_parent()
220 if (error) in xrep_dir_lookup_parent()
225 error = xrep_findparent_confirm(sc, &ino); in xrep_dir_lookup_parent()
226 if (error) in xrep_dir_lookup_parent()
242 int error; in xrep_dir_dcache_parent() local
248 error = xrep_findparent_confirm(sc, &parent_ino); in xrep_dir_dcache_parent()
249 if (error) in xrep_dir_dcache_parent()
335 int error; in xrep_dir_stash_createname() local
339 error = xfblob_storename(rd->dir_names, &dirent.name_cookie, name); in xrep_dir_stash_createname()
340 if (error) in xrep_dir_stash_createname()
341 return error; in xrep_dir_stash_createname()
362 int error; in xrep_dir_stash_removename() local
366 error = xfblob_storename(rd->dir_names, &dirent.name_cookie, name); in xrep_dir_stash_removename()
367 if (error) in xrep_dir_stash_removename()
368 return error; in xrep_dir_stash_removename()
387 int error = 0; in xrep_dir_salvage_entry() local
389 if (xchk_should_terminate(sc, &error)) in xrep_dir_salvage_entry()
390 return error; in xrep_dir_salvage_entry()
414 error = xchk_iget(sc, ino, &ip); in xrep_dir_salvage_entry()
415 if (error) in xrep_dir_salvage_entry()
464 int error = 0; in xrep_dir_recover_data() local
478 if (xchk_should_terminate(rd->sc, &error)) in xrep_dir_recover_data()
479 return error; in xrep_dir_recover_data()
493 error = xrep_dir_salvage_data_entry(rd, dep); in xrep_dir_recover_data()
494 if (error) in xrep_dir_recover_data()
495 return error; in xrep_dir_recover_data()
513 int error = 0; in xrep_dir_recover_sf() local
524 if (xchk_should_terminate(rd->sc, &error)) in xrep_dir_recover_sf()
525 return error; in xrep_dir_recover_sf()
532 error = xrep_dir_salvage_sf_entry(rd, hdr, sfep); in xrep_dir_recover_sf()
533 if (error) in xrep_dir_recover_sf()
534 return error; in xrep_dir_recover_sf()
559 int error; in xrep_dir_guess_format() local
569 error = xfs_bmap_last_offset(dp, &last, XFS_DATA_FORK); in xrep_dir_guess_format()
570 if (!error && XFS_FSB_TO_B(mp, last) == geo->blksize && in xrep_dir_guess_format()
582 error = xfs_bmap_last_before(rd->sc->tp, dp, &last, XFS_DATA_FORK); in xrep_dir_guess_format()
583 if (!error && in xrep_dir_guess_format()
601 int error; in xrep_dir_recover_dirblock() local
607 error = xfs_da_read_buf(rd->sc->tp, rd->sc->ip, dabno, in xrep_dir_recover_dirblock()
609 if (error || !bp) in xrep_dir_recover_dirblock()
610 return error; in xrep_dir_recover_dirblock()
652 error = xrep_dir_recover_data(rd, bp); in xrep_dir_recover_dirblock()
657 return error; in xrep_dir_recover_dirblock()
690 int error; in xrep_dir_replay_createname() local
694 error = xfs_dir_ino_validate(sc->mp, inum); in xrep_dir_replay_createname()
695 if (error) in xrep_dir_replay_createname()
696 return error; in xrep_dir_replay_createname()
742 int error; in xrep_dir_replay_update() local
745 error = xchk_trans_alloc(rd->sc, resblks); in xrep_dir_replay_update()
746 if (error) in xrep_dir_replay_update()
747 return error; in xrep_dir_replay_update()
762 error = xchk_dir_lookup(rd->sc, rd->sc->tempip, xname, &ino); in xrep_dir_replay_update()
763 if (error != -ENOENT) { in xrep_dir_replay_update()
764 ASSERT(error != -ENOENT); in xrep_dir_replay_update()
769 error = xrep_dir_replay_createname(rd, xname, dirent->ino, in xrep_dir_replay_update()
771 if (error) in xrep_dir_replay_update()
786 error = xchk_dir_lookup(rd->sc, rd->sc->tempip, xname, &ino); in xrep_dir_replay_update()
787 if (error) { in xrep_dir_replay_update()
788 ASSERT(error != 0); in xrep_dir_replay_update()
793 error = -EIO; in xrep_dir_replay_update()
798 error = xrep_dir_replay_removename(rd, xname, resblks); in xrep_dir_replay_update()
799 if (error) in xrep_dir_replay_update()
808 error = -EIO; in xrep_dir_replay_update()
813 error = xrep_trans_commit(rd->sc); in xrep_dir_replay_update()
814 if (error) in xrep_dir_replay_update()
815 return error; in xrep_dir_replay_update()
822 return error; in xrep_dir_replay_update()
838 int error; in xrep_dir_replay_updates() local
845 error = xfarray_load(rd->dir_entries, array_cur, &dirent); in xrep_dir_replay_updates()
846 if (error) in xrep_dir_replay_updates()
849 error = xfblob_loadname(rd->dir_names, dirent.name_cookie, in xrep_dir_replay_updates()
851 if (error) in xrep_dir_replay_updates()
856 error = xrep_dir_replay_update(rd, &rd->xname, &dirent); in xrep_dir_replay_updates()
857 if (error) in xrep_dir_replay_updates()
858 return error; in xrep_dir_replay_updates()
869 return error; in xrep_dir_replay_updates()
881 int error; in xrep_dir_flush_stashed() local
902 error = xrep_trans_commit(rd->sc); in xrep_dir_flush_stashed()
903 if (error) in xrep_dir_flush_stashed()
904 return error; in xrep_dir_flush_stashed()
913 error = xrep_tempfile_iolock_polled(rd->sc); in xrep_dir_flush_stashed()
914 if (error) in xrep_dir_flush_stashed()
915 return error; in xrep_dir_flush_stashed()
918 error = xrep_dir_replay_updates(rd); in xrep_dir_flush_stashed()
920 if (error) in xrep_dir_flush_stashed()
921 return error; in xrep_dir_flush_stashed()
926 error = xchk_trans_alloc(rd->sc, 0); in xrep_dir_flush_stashed()
927 if (error) in xrep_dir_flush_stashed()
928 return error; in xrep_dir_flush_stashed()
956 int error; in xrep_dir_recover() local
965 error = xfs_bmapi_read(sc->ip, offset, geo->leafblk - offset, in xrep_dir_recover()
967 if (error) in xrep_dir_recover()
968 return error; in xrep_dir_recover()
977 if (xchk_should_terminate(rd->sc, &error)) in xrep_dir_recover()
978 return error; in xrep_dir_recover()
980 error = xrep_dir_recover_dirblock(rd, in xrep_dir_recover()
982 if (error) in xrep_dir_recover()
983 return error; in xrep_dir_recover()
987 error = xrep_dir_flush_stashed(rd); in xrep_dir_recover()
988 if (error) in xrep_dir_recover()
989 return error; in xrep_dir_recover()
1006 int error; in xrep_dir_find_entries() local
1013 error = xrep_dir_recover_sf(rd); in xrep_dir_find_entries()
1015 error = xfs_iread_extents(rd->sc->tp, dp, XFS_DATA_FORK); in xrep_dir_find_entries()
1016 if (error) in xrep_dir_find_entries()
1017 return error; in xrep_dir_find_entries()
1019 error = xrep_dir_recover(rd); in xrep_dir_find_entries()
1021 if (error) in xrep_dir_find_entries()
1022 return error; in xrep_dir_find_entries()
1033 int error; in xrep_dir_salvage_entries() local
1042 error = xrep_dir_find_parent(rd); in xrep_dir_salvage_entries()
1044 if (error) in xrep_dir_salvage_entries()
1045 return error; in xrep_dir_salvage_entries()
1052 error = xrep_dir_find_entries(rd); in xrep_dir_salvage_entries()
1053 if (error) in xrep_dir_salvage_entries()
1054 return error; in xrep_dir_salvage_entries()
1071 error = xrep_trans_commit(sc); in xrep_dir_salvage_entries()
1072 if (error) in xrep_dir_salvage_entries()
1073 return error; in xrep_dir_salvage_entries()
1104 int error; in xrep_dir_scan_pptr() local
1113 error = xfs_parent_from_attr(sc->mp, attr_flags, name, namelen, value, in xrep_dir_scan_pptr()
1115 if (error) in xrep_dir_scan_pptr()
1116 return error; in xrep_dir_scan_pptr()
1123 error = xrep_dir_stash_createname(rd, &xname, ip->i_ino); in xrep_dir_scan_pptr()
1125 return error; in xrep_dir_scan_pptr()
1219 int error = 0; in xrep_dir_scan_file() local
1231 error = -EBUSY; in xrep_dir_scan_file()
1235 error = xchk_xattr_walk(rd->sc, ip, xrep_dir_scan_pptr, NULL, rd); in xrep_dir_scan_file()
1236 if (error) in xrep_dir_scan_file()
1245 error = -EBUSY; in xrep_dir_scan_file()
1249 error = xchk_dir_walk(rd->sc, ip, xrep_dir_scan_dirent, rd); in xrep_dir_scan_file()
1250 if (error) in xrep_dir_scan_file()
1257 return error; in xrep_dir_scan_file()
1270 int error; in xrep_dir_scan_dirtree() local
1286 error = xchk_trans_alloc_empty(sc); in xrep_dir_scan_dirtree()
1287 if (error) in xrep_dir_scan_dirtree()
1288 return error; in xrep_dir_scan_dirtree()
1290 while ((error = xchk_iscan_iter(&rd->pscan.iscan, &ip)) == 1) { in xrep_dir_scan_dirtree()
1293 error = xrep_dir_scan_file(rd, ip); in xrep_dir_scan_dirtree()
1295 if (error) in xrep_dir_scan_dirtree()
1305 error = xrep_tempfile_iolock_polled(sc); in xrep_dir_scan_dirtree()
1306 if (error) in xrep_dir_scan_dirtree()
1309 error = xrep_dir_replay_updates(rd); in xrep_dir_scan_dirtree()
1311 if (error) in xrep_dir_scan_dirtree()
1314 error = xchk_trans_alloc_empty(sc); in xrep_dir_scan_dirtree()
1315 if (error) in xrep_dir_scan_dirtree()
1319 if (xchk_should_terminate(sc, &error)) in xrep_dir_scan_dirtree()
1323 if (error) { in xrep_dir_scan_dirtree()
1326 * change, change the error code so that we exit to userspace in xrep_dir_scan_dirtree()
1329 if (error == -EBUSY) in xrep_dir_scan_dirtree()
1331 return error; in xrep_dir_scan_dirtree()
1356 int error = 0; in xrep_dir_live_update() local
1370 error = xrep_dir_stash_createname(rd, p->name, in xrep_dir_live_update()
1373 error = xrep_dir_stash_removename(rd, p->name, in xrep_dir_live_update()
1376 if (error) in xrep_dir_live_update()
1420 int error; in xrep_dir_reset_fork() local
1424 error = xrep_reap_ifork(sc, sc->tempip, XFS_DATA_FORK); in xrep_dir_reset_fork()
1425 if (error) in xrep_dir_reset_fork()
1426 return error; in xrep_dir_reset_fork()
1452 int error; in xrep_dir_swap_prep() local
1468 error = xfs_dir2_sf_to_block(&args); in xrep_dir_swap_prep()
1469 if (error) in xrep_dir_swap_prep()
1470 return error; in xrep_dir_swap_prep()
1476 error = xfs_defer_finish(&sc->tp); in xrep_dir_swap_prep()
1477 if (error) in xrep_dir_swap_prep()
1478 return error; in xrep_dir_swap_prep()
1516 int error; in xrep_dir_replace() local
1520 error = xfs_dir_ino_validate(sc->mp, inum); in xrep_dir_replace()
1521 if (error) in xrep_dir_replace()
1522 return error; in xrep_dir_replace()
1544 int error; in xrep_dir_set_nlink() local
1579 error = xfs_iunlink_remove(sc->tp, pag, dp); in xrep_dir_set_nlink()
1581 if (error) in xrep_dir_set_nlink()
1582 return error; in xrep_dir_set_nlink()
1600 int error; in xrep_dir_finalize_tempdir() local
1612 error = xrep_dir_replay_updates(rd); in xrep_dir_finalize_tempdir()
1613 if (error) in xrep_dir_finalize_tempdir()
1614 return error; in xrep_dir_finalize_tempdir()
1616 error = xrep_tempexch_trans_alloc(sc, XFS_DATA_FORK, &rd->tx); in xrep_dir_finalize_tempdir()
1617 if (error) in xrep_dir_finalize_tempdir()
1618 return error; in xrep_dir_finalize_tempdir()
1625 } while (!xchk_should_terminate(sc, &error)); in xrep_dir_finalize_tempdir()
1626 return error; in xrep_dir_finalize_tempdir()
1636 int error = 0; in xrep_dir_swap() local
1660 error = xrep_dir_replace(rd, rd->sc->tempip, &xfs_name_dotdot, in xrep_dir_swap()
1662 if (error) in xrep_dir_swap()
1663 return error; in xrep_dir_swap()
1689 error = xrep_tempfile_roll_trans(rd->sc); in xrep_dir_swap()
1690 if (error) in xrep_dir_swap()
1691 return error; in xrep_dir_swap()
1694 error = xrep_dir_swap_prep(sc, temp_local, ip_local); in xrep_dir_swap()
1695 if (error) in xrep_dir_swap()
1696 return error; in xrep_dir_swap()
1702 error = xrep_dir_set_nlink(rd); in xrep_dir_swap()
1703 if (error) in xrep_dir_swap()
1704 return error; in xrep_dir_swap()
1718 int error; in xrep_dir_rebuild_tree() local
1727 error = xrep_tempfile_iolock_polled(rd->sc); in xrep_dir_rebuild_tree()
1728 if (error) in xrep_dir_rebuild_tree()
1729 return error; in xrep_dir_rebuild_tree()
1736 error = xrep_dir_finalize_tempdir(rd); in xrep_dir_rebuild_tree()
1737 if (error) in xrep_dir_rebuild_tree()
1738 return error; in xrep_dir_rebuild_tree()
1748 error = xrep_dir_swap(rd); in xrep_dir_rebuild_tree()
1749 if (error) in xrep_dir_rebuild_tree()
1750 return error; in xrep_dir_rebuild_tree()
1757 error = xrep_dir_reset_fork(rd, sc->mp->m_rootip->i_ino); in xrep_dir_rebuild_tree()
1758 if (error) in xrep_dir_rebuild_tree()
1759 return error; in xrep_dir_rebuild_tree()
1766 error = xfs_trans_roll(&sc->tp); in xrep_dir_rebuild_tree()
1767 if (error) in xrep_dir_rebuild_tree()
1768 return error; in xrep_dir_rebuild_tree()
1782 int error; in xrep_dir_setup_scan() local
1786 error = xfarray_create(descr, 0, sizeof(struct xrep_dirent), in xrep_dir_setup_scan()
1789 if (error) in xrep_dir_setup_scan()
1790 return error; in xrep_dir_setup_scan()
1793 error = xfblob_create(descr, &rd->dir_names); in xrep_dir_setup_scan()
1795 if (error) in xrep_dir_setup_scan()
1799 error = __xrep_findparent_scan_start(sc, &rd->pscan, in xrep_dir_setup_scan()
1802 error = xrep_findparent_scan_start(sc, &rd->pscan); in xrep_dir_setup_scan()
1803 if (error) in xrep_dir_setup_scan()
1814 return error; in xrep_dir_setup_scan()
1831 int error; in xrep_dir_move_to_orphanage() local
1838 error = xchk_dir_lookup(sc, sc->ip, &xfs_name_dotdot, &orig_parent); in xrep_dir_move_to_orphanage()
1839 if (error) in xrep_dir_move_to_orphanage()
1840 return error; in xrep_dir_move_to_orphanage()
1847 error = xrep_trans_commit(sc); in xrep_dir_move_to_orphanage()
1848 if (error) in xrep_dir_move_to_orphanage()
1849 return error; in xrep_dir_move_to_orphanage()
1855 error = xrep_orphanage_iolock_two(sc); in xrep_dir_move_to_orphanage()
1856 if (error) in xrep_dir_move_to_orphanage()
1857 return error; in xrep_dir_move_to_orphanage()
1861 error = xrep_adoption_trans_alloc(sc, &rd->adoption); in xrep_dir_move_to_orphanage()
1862 if (error) in xrep_dir_move_to_orphanage()
1863 return error; in xrep_dir_move_to_orphanage()
1865 error = xrep_adoption_compute_name(&rd->adoption, &rd->xname); in xrep_dir_move_to_orphanage()
1866 if (error) in xrep_dir_move_to_orphanage()
1867 return error; in xrep_dir_move_to_orphanage()
1875 error = xchk_dir_lookup(sc, sc->ip, &xfs_name_dotdot, &new_parent); in xrep_dir_move_to_orphanage()
1876 if (error) in xrep_dir_move_to_orphanage()
1877 return error; in xrep_dir_move_to_orphanage()
1884 error = xrep_adoption_move(&rd->adoption); in xrep_dir_move_to_orphanage()
1885 if (error) in xrep_dir_move_to_orphanage()
1886 return error; in xrep_dir_move_to_orphanage()
1893 error = xrep_adoption_trans_roll(&rd->adoption); in xrep_dir_move_to_orphanage()
1894 if (error) in xrep_dir_move_to_orphanage()
1895 return error; in xrep_dir_move_to_orphanage()
1918 int error; in xrep_directory() local
1927 error = xrep_dir_setup_scan(rd); in xrep_directory()
1928 if (error) in xrep_directory()
1929 return error; in xrep_directory()
1932 error = xrep_dir_scan_dirtree(rd); in xrep_directory()
1934 error = xrep_dir_salvage_entries(rd); in xrep_directory()
1935 if (error) in xrep_directory()
1939 if (xchk_should_terminate(sc, &error)) in xrep_directory()
1942 error = xrep_dir_rebuild_tree(rd); in xrep_directory()
1943 if (error) in xrep_directory()
1948 error = -EFSCORRUPTED; in xrep_directory()
1950 error = xrep_dir_move_to_orphanage(rd); in xrep_directory()
1951 if (error) in xrep_directory()
1957 return error; in xrep_directory()