Lines Matching full:error

216 	int			error;  in xrep_setup_parent()  local
227 error = xrep_tempfile_create(sc, S_IFREG); in xrep_setup_parent()
228 if (error) in xrep_setup_parent()
229 return error; in xrep_setup_parent()
245 int error; in xrep_parent_find_dotdot() local
271 error = xrep_findparent_confirm(sc, &ino); in xrep_parent_find_dotdot()
272 if (!error && ino != NULLFSINO) { in xrep_parent_find_dotdot()
279 error = xrep_findparent_scan(&rp->pscan); in xrep_parent_find_dotdot()
283 return error; in xrep_parent_find_dotdot()
333 int error; in xrep_parent_replay_updates() local
339 error = xfarray_load(rp->pptr_recs, array_cur, &pptr); in xrep_parent_replay_updates()
340 if (error) in xrep_parent_replay_updates()
343 error = xfblob_loadname(rp->pptr_names, pptr.name_cookie, in xrep_parent_replay_updates()
345 if (error) in xrep_parent_replay_updates()
350 error = xrep_parent_replay_update(rp, &rp->xname, &pptr); in xrep_parent_replay_updates()
351 if (error) in xrep_parent_replay_updates()
352 return error; in xrep_parent_replay_updates()
364 return error; in xrep_parent_replay_updates()
381 int error; in xrep_parent_stash_parentadd() local
386 error = xfblob_storename(rp->pptr_names, &pptr.name_cookie, name); in xrep_parent_stash_parentadd()
387 if (error) in xrep_parent_stash_parentadd()
388 return error; in xrep_parent_stash_parentadd()
407 int error; in xrep_parent_stash_parentremove() local
412 error = xfblob_storename(rp->pptr_names, &pptr.name_cookie, name); in xrep_parent_stash_parentremove()
413 if (error) in xrep_parent_stash_parentremove()
414 return error; in xrep_parent_stash_parentremove()
434 int error; in xrep_parent_scan_dirent() local
458 error = xrep_parent_stash_parentadd(rp, name, dp); in xrep_parent_scan_dirent()
460 return error; in xrep_parent_scan_dirent()
512 int error = 0; in xrep_parent_scan_file() local
525 error = -EBUSY; in xrep_parent_scan_file()
529 error = xchk_dir_walk(rp->sc, ip, xrep_parent_scan_dirent, rp); in xrep_parent_scan_file()
530 if (error) in xrep_parent_scan_file()
537 return error; in xrep_parent_scan_file()
561 int error; in xrep_parent_scan_dirtree() local
572 error = xchk_trans_alloc_empty(sc); in xrep_parent_scan_dirtree()
573 if (error) in xrep_parent_scan_dirtree()
574 return error; in xrep_parent_scan_dirtree()
576 while ((error = xchk_iscan_iter(&rp->pscan.iscan, &ip)) == 1) { in xrep_parent_scan_dirtree()
579 error = xrep_parent_scan_file(rp, ip); in xrep_parent_scan_dirtree()
581 if (error) in xrep_parent_scan_dirtree()
591 error = xrep_tempfile_iolock_polled(sc); in xrep_parent_scan_dirtree()
592 if (error) in xrep_parent_scan_dirtree()
595 error = xrep_parent_replay_updates(rp); in xrep_parent_scan_dirtree()
597 if (error) in xrep_parent_scan_dirtree()
600 error = xchk_trans_alloc_empty(sc); in xrep_parent_scan_dirtree()
601 if (error) in xrep_parent_scan_dirtree()
605 if (xchk_should_terminate(sc, &error)) in xrep_parent_scan_dirtree()
609 if (error) { in xrep_parent_scan_dirtree()
612 * change, change the error code so that we exit to userspace in xrep_parent_scan_dirtree()
615 if (error == -EBUSY) in xrep_parent_scan_dirtree()
617 return error; in xrep_parent_scan_dirtree()
642 int error; in xrep_parent_live_update() local
656 error = xrep_parent_stash_parentadd(rp, p->name, p->dp); in xrep_parent_live_update()
658 error = xrep_parent_stash_parentremove(rp, p->name, in xrep_parent_live_update()
660 if (!error) in xrep_parent_live_update()
663 if (error) in xrep_parent_live_update()
681 int error = 0; in xrep_parent_reset_dotdot() local
685 error = xchk_dir_lookup(sc, sc->ip, &xfs_name_dotdot, &ino); in xrep_parent_reset_dotdot()
686 if (error || ino == rp->pscan.parent_ino) in xrep_parent_reset_dotdot()
687 return error; in xrep_parent_reset_dotdot()
699 error = xfs_trans_reserve_more_inode(sc->tp, sc->ip, spaceres, 0, in xrep_parent_reset_dotdot()
701 if (error) in xrep_parent_reset_dotdot()
702 return error; in xrep_parent_reset_dotdot()
704 error = xfs_dir_replace(sc->tp, sc->ip, &xfs_name_dotdot, in xrep_parent_reset_dotdot()
706 if (error) in xrep_parent_reset_dotdot()
707 return error; in xrep_parent_reset_dotdot()
730 int error; in xrep_parent_lookup_pptr() local
735 error = xfs_parent_from_attr(sc->mp, attr_flags, name, namelen, value, in xrep_parent_lookup_pptr()
737 if (error) in xrep_parent_lookup_pptr()
738 return error; in xrep_parent_lookup_pptr()
754 int error; in xrep_parent_lookup_pptrs() local
758 error = xchk_xattr_walk(sc, sc->ip, xrep_parent_lookup_pptr, NULL, in xrep_parent_lookup_pptrs()
760 if (error && error != -ECANCELED) in xrep_parent_lookup_pptrs()
761 return error; in xrep_parent_lookup_pptrs()
779 int error; in xrep_parent_move_to_orphanage() local
788 error = xchk_dir_lookup(sc, sc->ip, &xfs_name_dotdot, in xrep_parent_move_to_orphanage()
790 if (error) in xrep_parent_move_to_orphanage()
791 return error; in xrep_parent_move_to_orphanage()
807 error = xrep_trans_commit(sc); in xrep_parent_move_to_orphanage()
808 if (error) in xrep_parent_move_to_orphanage()
809 return error; in xrep_parent_move_to_orphanage()
815 error = xrep_orphanage_iolock_two(sc); in xrep_parent_move_to_orphanage()
816 if (error) in xrep_parent_move_to_orphanage()
817 return error; in xrep_parent_move_to_orphanage()
821 error = xrep_adoption_trans_alloc(sc, &rp->adoption); in xrep_parent_move_to_orphanage()
822 if (error) in xrep_parent_move_to_orphanage()
823 return error; in xrep_parent_move_to_orphanage()
825 error = xrep_adoption_compute_name(&rp->adoption, &rp->xname); in xrep_parent_move_to_orphanage()
826 if (error) in xrep_parent_move_to_orphanage()
827 return error; in xrep_parent_move_to_orphanage()
837 error = xchk_dir_lookup(sc, sc->ip, &xfs_name_dotdot, in xrep_parent_move_to_orphanage()
840 error = xrep_parent_lookup_pptrs(sc, &new_parent); in xrep_parent_move_to_orphanage()
841 if (error) in xrep_parent_move_to_orphanage()
842 return error; in xrep_parent_move_to_orphanage()
849 error = xrep_adoption_move(&rp->adoption); in xrep_parent_move_to_orphanage()
850 if (error) in xrep_parent_move_to_orphanage()
851 return error; in xrep_parent_move_to_orphanage()
858 error = xrep_adoption_trans_roll(&rp->adoption); in xrep_parent_move_to_orphanage()
859 if (error) in xrep_parent_move_to_orphanage()
860 return error; in xrep_parent_move_to_orphanage()
915 int error; in xrep_parent_fetch_xattr_remote() local
921 error = xrep_parent_alloc_xattr_value(rp, valuelen); in xrep_parent_fetch_xattr_remote()
922 if (error == -ENOMEM) in xrep_parent_fetch_xattr_remote()
924 if (error) in xrep_parent_fetch_xattr_remote()
925 return error; in xrep_parent_fetch_xattr_remote()
950 int error; in xrep_parent_stash_xattr() local
956 error = xrep_parent_fetch_xattr_remote(rp, ip, attr_flags, in xrep_parent_stash_xattr()
958 if (error) in xrep_parent_stash_xattr()
959 return error; in xrep_parent_stash_xattr()
967 error = xfblob_store(rp->xattr_blobs, &key.name_cookie, name, in xrep_parent_stash_xattr()
969 if (error) in xrep_parent_stash_xattr()
970 return error; in xrep_parent_stash_xattr()
972 error = xfblob_store(rp->xattr_blobs, &key.value_cookie, value, in xrep_parent_stash_xattr()
974 if (error) in xrep_parent_stash_xattr()
975 return error; in xrep_parent_stash_xattr()
996 int error; in xrep_parent_insert_xattr() local
1013 error = xfblob_load(rp->xattr_blobs, key->name_cookie, rp->xattr_name, in xrep_parent_insert_xattr()
1015 if (error) in xrep_parent_insert_xattr()
1016 return error; in xrep_parent_insert_xattr()
1018 error = xfblob_free(rp->xattr_blobs, key->name_cookie); in xrep_parent_insert_xattr()
1019 if (error) in xrep_parent_insert_xattr()
1020 return error; in xrep_parent_insert_xattr()
1022 error = xfblob_load(rp->xattr_blobs, key->value_cookie, args.value, in xrep_parent_insert_xattr()
1024 if (error) in xrep_parent_insert_xattr()
1025 return error; in xrep_parent_insert_xattr()
1027 error = xfblob_free(rp->xattr_blobs, key->value_cookie); in xrep_parent_insert_xattr()
1028 if (error) in xrep_parent_insert_xattr()
1029 return error; in xrep_parent_insert_xattr()
1050 int error; in xrep_parent_flush_xattrs() local
1078 error = xrep_tempfile_iolock_polled(rp->sc); in xrep_parent_flush_xattrs()
1079 if (error) in xrep_parent_flush_xattrs()
1080 return error; in xrep_parent_flush_xattrs()
1086 error = xfarray_load(rp->xattr_records, array_cur, &key); in xrep_parent_flush_xattrs()
1087 if (error) in xrep_parent_flush_xattrs()
1088 return error; in xrep_parent_flush_xattrs()
1090 error = xrep_parent_insert_xattr(rp, &key); in xrep_parent_flush_xattrs()
1091 if (error) in xrep_parent_flush_xattrs()
1092 return error; in xrep_parent_flush_xattrs()
1102 error = xchk_trans_alloc_empty(rp->sc); in xrep_parent_flush_xattrs()
1103 if (error) in xrep_parent_flush_xattrs()
1104 return error; in xrep_parent_flush_xattrs()
1128 int error; in xrep_parent_try_flush_xattrs() local
1133 error = xrep_parent_flush_xattrs(rp); in xrep_parent_try_flush_xattrs()
1134 if (error) in xrep_parent_try_flush_xattrs()
1135 return error; in xrep_parent_try_flush_xattrs()
1147 error = -ESTALE; in xrep_parent_try_flush_xattrs()
1149 return error; in xrep_parent_try_flush_xattrs()
1158 int error; in xrep_parent_copy_xattrs() local
1169 error = xchk_xattr_walk(sc, sc->ip, xrep_parent_stash_xattr, in xrep_parent_copy_xattrs()
1171 if (error && error != -ESTALE) in xrep_parent_copy_xattrs()
1172 return error; in xrep_parent_copy_xattrs()
1174 if (error == -ESTALE) { in xrep_parent_copy_xattrs()
1180 error = xchk_xattr_walk(sc, sc->ip, xrep_parent_stash_xattr, in xrep_parent_copy_xattrs()
1182 if (error) in xrep_parent_copy_xattrs()
1183 return error; in xrep_parent_copy_xattrs()
1208 int error; in xrep_parent_ensure_attr_fork() local
1210 error = xfs_attr_add_fork(sc->tempip, in xrep_parent_ensure_attr_fork()
1212 if (error) in xrep_parent_ensure_attr_fork()
1213 return error; in xrep_parent_ensure_attr_fork()
1227 int error; in xrep_parent_finalize_tempfile() local
1236 error = xrep_parent_replay_updates(rp); in xrep_parent_finalize_tempfile()
1237 if (error) in xrep_parent_finalize_tempfile()
1238 return error; in xrep_parent_finalize_tempfile()
1240 error = xrep_parent_ensure_attr_fork(rp); in xrep_parent_finalize_tempfile()
1241 if (error) in xrep_parent_finalize_tempfile()
1242 return error; in xrep_parent_finalize_tempfile()
1244 error = xrep_tempexch_trans_alloc(sc, XFS_ATTR_FORK, &rp->tx); in xrep_parent_finalize_tempfile()
1245 if (error) in xrep_parent_finalize_tempfile()
1246 return error; in xrep_parent_finalize_tempfile()
1253 } while (!xchk_should_terminate(sc, &error)); in xrep_parent_finalize_tempfile()
1254 return error; in xrep_parent_finalize_tempfile()
1268 int error; in xrep_parent_rebuild_pptrs() local
1278 error = xrep_parent_copy_xattrs(rp); in xrep_parent_rebuild_pptrs()
1279 if (error) in xrep_parent_rebuild_pptrs()
1280 return error; in xrep_parent_rebuild_pptrs()
1290 error = xrep_tempfile_iolock_polled(sc); in xrep_parent_rebuild_pptrs()
1291 if (error) in xrep_parent_rebuild_pptrs()
1292 return error; in xrep_parent_rebuild_pptrs()
1299 error = xrep_parent_finalize_tempfile(rp); in xrep_parent_rebuild_pptrs()
1300 if (error) in xrep_parent_rebuild_pptrs()
1301 return error; in xrep_parent_rebuild_pptrs()
1304 if (xchk_should_terminate(sc, &error)) in xrep_parent_rebuild_pptrs()
1305 return error; in xrep_parent_rebuild_pptrs()
1314 error = xrep_xattr_swap(sc, &rp->tx); in xrep_parent_rebuild_pptrs()
1315 if (error) in xrep_parent_rebuild_pptrs()
1316 return error; in xrep_parent_rebuild_pptrs()
1317 error = xrep_xattr_reset_tempfile_fork(sc); in xrep_parent_rebuild_pptrs()
1318 if (error) in xrep_parent_rebuild_pptrs()
1319 return error; in xrep_parent_rebuild_pptrs()
1326 error = xfs_trans_roll(&sc->tp); in xrep_parent_rebuild_pptrs()
1327 if (error) in xrep_parent_rebuild_pptrs()
1328 return error; in xrep_parent_rebuild_pptrs()
1340 error = xrep_parent_lookup_pptrs(sc, &parent_ino); in xrep_parent_rebuild_pptrs()
1341 if (error) in xrep_parent_rebuild_pptrs()
1342 return error; in xrep_parent_rebuild_pptrs()
1357 int error; in xrep_parent_rebuild_tree() local
1360 error = xrep_parent_rebuild_pptrs(rp); in xrep_parent_rebuild_tree()
1361 if (error) in xrep_parent_rebuild_tree()
1362 return error; in xrep_parent_rebuild_tree()
1390 int error; in xrep_parent_count_pptr() local
1395 error = xfs_parent_from_attr(sc->mp, attr_flags, name, namelen, value, in xrep_parent_count_pptr()
1397 if (error) in xrep_parent_count_pptr()
1398 return error; in xrep_parent_count_pptr()
1417 int error; in xrep_parent_set_nondir_nlink() local
1421 error = xchk_xattr_walk(sc, ip, xrep_parent_count_pptr, NULL, rp); in xrep_parent_set_nondir_nlink()
1422 if (error) in xrep_parent_set_nondir_nlink()
1423 return error; in xrep_parent_set_nondir_nlink()
1439 error = xfs_iunlink_remove(sc->tp, pag, ip); in xrep_parent_set_nondir_nlink()
1441 if (error) in xrep_parent_set_nondir_nlink()
1442 return error; in xrep_parent_set_nondir_nlink()
1451 error = xfs_iunlink(sc->tp, ip); in xrep_parent_set_nondir_nlink()
1452 if (error) in xrep_parent_set_nondir_nlink()
1453 return error; in xrep_parent_set_nondir_nlink()
1482 int error; in xrep_parent_setup_scan() local
1502 error = xrep_parent_alloc_xattr_value(rp, max_len); in xrep_parent_setup_scan()
1503 if (error) in xrep_parent_setup_scan()
1508 error = xfarray_create(descr, 0, sizeof(struct xrep_pptr), in xrep_parent_setup_scan()
1511 if (error) in xrep_parent_setup_scan()
1515 error = xfblob_create(descr, &rp->pptr_names); in xrep_parent_setup_scan()
1517 if (error) in xrep_parent_setup_scan()
1523 error = xfarray_create(descr, 0, sizeof(struct xrep_parent_xattr), in xrep_parent_setup_scan()
1526 if (error) in xrep_parent_setup_scan()
1531 error = xfblob_create(descr, &rp->xattr_blobs); in xrep_parent_setup_scan()
1533 if (error) in xrep_parent_setup_scan()
1536 error = __xrep_findparent_scan_start(sc, &rp->pscan, in xrep_parent_setup_scan()
1538 if (error) in xrep_parent_setup_scan()
1561 return error; in xrep_parent_setup_scan()
1569 int error; in xrep_parent() local
1583 error = xrep_parent_setup_scan(rp); in xrep_parent()
1584 if (error) in xrep_parent()
1585 return error; in xrep_parent()
1588 error = xrep_parent_scan_dirtree(rp); in xrep_parent()
1590 error = xrep_parent_find_dotdot(rp); in xrep_parent()
1591 if (error) in xrep_parent()
1595 if (xchk_should_terminate(sc, &error)) in xrep_parent()
1598 error = xrep_parent_rebuild_tree(rp); in xrep_parent()
1599 if (error) in xrep_parent()
1602 error = xrep_parent_set_nondir_nlink(rp); in xrep_parent()
1603 if (error) in xrep_parent()
1607 error = xrep_defer_finish(sc); in xrep_parent()
1611 return error; in xrep_parent()