Lines Matching full:error

201 	int			error = 0;  in xrep_xattr_salvage_key()  local
203 if (xchk_should_terminate(rx->sc, &error)) in xrep_xattr_salvage_key()
204 return error; in xrep_xattr_salvage_key()
226 error = xfblob_store(rx->xattr_blobs, &key.name_cookie, name, in xrep_xattr_salvage_key()
228 if (error) in xrep_xattr_salvage_key()
229 return error; in xrep_xattr_salvage_key()
231 error = xfblob_store(rx->xattr_blobs, &key.value_cookie, value, in xrep_xattr_salvage_key()
233 if (error) in xrep_xattr_salvage_key()
234 return error; in xrep_xattr_salvage_key()
236 error = xfarray_append(rx->xattr_records, &key); in xrep_xattr_salvage_key()
237 if (error) in xrep_xattr_salvage_key()
238 return error; in xrep_xattr_salvage_key()
340 int error; in xrep_xattr_salvage_remote_attr() local
361 error = xchk_setup_xattr_buf(rx->sc, args.valuelen); in xrep_xattr_salvage_remote_attr()
362 if (error == -ENOMEM) in xrep_xattr_salvage_remote_attr()
363 error = -EDEADLOCK; in xrep_xattr_salvage_remote_attr()
364 if (error) in xrep_xattr_salvage_remote_attr()
365 return error; in xrep_xattr_salvage_remote_attr()
368 error = xfs_attr3_leaf_getvalue(leaf_bp, &args); in xrep_xattr_salvage_remote_attr()
369 if (error || args.rmtblkno == 0) in xrep_xattr_salvage_remote_attr()
372 error = xfs_attr_rmtval_get(&args); in xrep_xattr_salvage_remote_attr()
373 if (error) in xrep_xattr_salvage_remote_attr()
377 error = xrep_xattr_salvage_key(rx, ent->flags, rentry->name, in xrep_xattr_salvage_remote_attr()
381 if (error == -EFSBADCRC || error == -EFSCORRUPTED) in xrep_xattr_salvage_remote_attr()
382 error = 0; in xrep_xattr_salvage_remote_attr()
383 return error; in xrep_xattr_salvage_remote_attr()
406 int error = 0; in xrep_xattr_recover_leaf() local
419 if (xchk_should_terminate(sc, &error)) in xrep_xattr_recover_leaf()
420 return error; in xrep_xattr_recover_leaf()
436 error = xrep_xattr_salvage_local_attr(rx, ent, nameidx, in xrep_xattr_recover_leaf()
440 error = xrep_xattr_salvage_remote_attr(rx, ent, nameidx, in xrep_xattr_recover_leaf()
443 if (error) in xrep_xattr_recover_leaf()
444 return error; in xrep_xattr_recover_leaf()
463 int error = 0; in xrep_xattr_recover_sf() local
477 if (xchk_should_terminate(sc, &error)) in xrep_xattr_recover_sf()
478 return error; in xrep_xattr_recover_sf()
491 error = xrep_xattr_salvage_sf_attr(rx, hdr, sfe); in xrep_xattr_recover_sf()
492 if (error) in xrep_xattr_recover_sf()
493 return error; in xrep_xattr_recover_sf()
576 int error; in xrep_xattr_recover_block() local
578 error = xrep_xattr_find_buf(rx->sc->mp, fsbno, max_len, true, &bp); in xrep_xattr_recover_block()
579 if (error) in xrep_xattr_recover_block()
580 return error; in xrep_xattr_recover_block()
594 error = xrep_xattr_recover_leaf(rx, bp); in xrep_xattr_recover_block()
606 return error; in xrep_xattr_recover_block()
626 int error; in xrep_xattr_insert_rec() local
641 error = xfblob_load(rx->xattr_blobs, key->name_cookie, ab->name, in xrep_xattr_insert_rec()
643 if (error) in xrep_xattr_insert_rec()
644 return error; in xrep_xattr_insert_rec()
646 error = xfblob_free(rx->xattr_blobs, key->name_cookie); in xrep_xattr_insert_rec()
647 if (error) in xrep_xattr_insert_rec()
648 return error; in xrep_xattr_insert_rec()
650 error = xfblob_load(rx->xattr_blobs, key->value_cookie, args.value, in xrep_xattr_insert_rec()
652 if (error) in xrep_xattr_insert_rec()
653 return error; in xrep_xattr_insert_rec()
655 error = xfblob_free(rx->xattr_blobs, key->value_cookie); in xrep_xattr_insert_rec()
656 if (error) in xrep_xattr_insert_rec()
657 return error; in xrep_xattr_insert_rec()
676 error = xfs_attr_set(&args, XFS_ATTRUPDATE_CREATE, false); in xrep_xattr_insert_rec()
677 if (error == -EEXIST) in xrep_xattr_insert_rec()
678 error = 0; in xrep_xattr_insert_rec()
680 return error; in xrep_xattr_insert_rec()
693 int error; in xrep_xattr_flush_stashed() local
714 error = xrep_trans_commit(rx->sc); in xrep_xattr_flush_stashed()
715 if (error) in xrep_xattr_flush_stashed()
716 return error; in xrep_xattr_flush_stashed()
725 error = xrep_tempfile_iolock_polled(rx->sc); in xrep_xattr_flush_stashed()
726 if (error) in xrep_xattr_flush_stashed()
727 return error; in xrep_xattr_flush_stashed()
733 error = xfarray_load(rx->xattr_records, array_cur, &key); in xrep_xattr_flush_stashed()
734 if (error) in xrep_xattr_flush_stashed()
735 return error; in xrep_xattr_flush_stashed()
737 error = xrep_xattr_insert_rec(rx, &key); in xrep_xattr_flush_stashed()
738 if (error) in xrep_xattr_flush_stashed()
739 return error; in xrep_xattr_flush_stashed()
749 error = xchk_trans_alloc(rx->sc, 0); in xrep_xattr_flush_stashed()
750 if (error) in xrep_xattr_flush_stashed()
751 return error; in xrep_xattr_flush_stashed()
808 int error; in xrep_xattr_full_reset() local
834 error = xrep_reap_ifork(sc, sc->tempip, XFS_ATTR_FORK); in xrep_xattr_full_reset()
835 if (error) in xrep_xattr_full_reset()
836 return error; in xrep_xattr_full_reset()
855 error = xrep_roll_trans(sc); in xrep_xattr_full_reset()
856 if (error) in xrep_xattr_full_reset()
857 return error; in xrep_xattr_full_reset()
891 int error; in xrep_xattr_recover() local
902 error = xfs_bmapi_read(sc->ip, offset, XFS_MAX_FILEOFF - offset, in xrep_xattr_recover()
904 if (error) in xrep_xattr_recover()
905 return error; in xrep_xattr_recover()
917 if (xchk_should_terminate(rx->sc, &error)) in xrep_xattr_recover()
918 return error; in xrep_xattr_recover()
922 error = xrep_xattr_recover_block(rx, dabno, in xrep_xattr_recover()
925 if (error) in xrep_xattr_recover()
926 return error; in xrep_xattr_recover()
929 error = xrep_xattr_flush_stashed(rx); in xrep_xattr_recover()
930 if (error) in xrep_xattr_recover()
931 return error; in xrep_xattr_recover()
934 error = xrep_xattr_full_reset(rx); in xrep_xattr_recover()
935 if (error) in xrep_xattr_recover()
936 return error; in xrep_xattr_recover()
1010 int error; in xrep_xattr_reset_fork() local
1016 error = xrep_reap_ifork(sc, sc->ip, XFS_ATTR_FORK); in xrep_xattr_reset_fork()
1017 if (error) in xrep_xattr_reset_fork()
1018 return error; in xrep_xattr_reset_fork()
1021 error = xrep_xattr_fork_remove(sc, sc->ip); in xrep_xattr_reset_fork()
1022 if (error) in xrep_xattr_reset_fork()
1023 return error; in xrep_xattr_reset_fork()
1037 int error; in xrep_xattr_reset_tempfile_fork() local
1046 error = xrep_reap_ifork(sc, sc->tempip, XFS_ATTR_FORK); in xrep_xattr_reset_tempfile_fork()
1047 if (error) in xrep_xattr_reset_tempfile_fork()
1048 return error; in xrep_xattr_reset_tempfile_fork()
1065 int error; in xrep_xattr_salvage_attributes() local
1069 error = xrep_xattr_recover_sf(rx); in xrep_xattr_salvage_attributes()
1070 if (error) in xrep_xattr_salvage_attributes()
1071 return error; in xrep_xattr_salvage_attributes()
1084 error = xfs_trans_roll(&rx->sc->tp); in xrep_xattr_salvage_attributes()
1085 if (error) in xrep_xattr_salvage_attributes()
1086 return error; in xrep_xattr_salvage_attributes()
1088 error = xfs_iread_extents(rx->sc->tp, ip, XFS_ATTR_FORK); in xrep_xattr_salvage_attributes()
1089 if (error) in xrep_xattr_salvage_attributes()
1090 return error; in xrep_xattr_salvage_attributes()
1092 error = xrep_xattr_recover(rx); in xrep_xattr_salvage_attributes()
1093 if (error) in xrep_xattr_salvage_attributes()
1094 return error; in xrep_xattr_salvage_attributes()
1111 int error; in xrep_xattr_replay_pptr_update() local
1119 error = xfs_parent_set(sc->tempip, sc->ip->i_ino, xname, in xrep_xattr_replay_pptr_update()
1121 ASSERT(error != -EEXIST); in xrep_xattr_replay_pptr_update()
1122 return error; in xrep_xattr_replay_pptr_update()
1128 error = xfs_parent_unset(sc->tempip, sc->ip->i_ino, xname, in xrep_xattr_replay_pptr_update()
1130 ASSERT(error != -ENOATTR); in xrep_xattr_replay_pptr_update()
1131 return error; in xrep_xattr_replay_pptr_update()
1151 int error; in xrep_xattr_replay_pptr_updates() local
1157 error = xfarray_load(rx->pptr_recs, array_cur, &pptr); in xrep_xattr_replay_pptr_updates()
1158 if (error) in xrep_xattr_replay_pptr_updates()
1161 error = xfblob_loadname(rx->pptr_names, pptr.name_cookie, in xrep_xattr_replay_pptr_updates()
1163 if (error) in xrep_xattr_replay_pptr_updates()
1167 error = xrep_xattr_replay_pptr_update(rx, &rx->xname, &pptr); in xrep_xattr_replay_pptr_updates()
1168 if (error) in xrep_xattr_replay_pptr_updates()
1169 return error; in xrep_xattr_replay_pptr_updates()
1181 return error; in xrep_xattr_replay_pptr_updates()
1198 int error; in xrep_xattr_stash_parentadd() local
1203 error = xfblob_storename(rx->pptr_names, &pptr.name_cookie, name); in xrep_xattr_stash_parentadd()
1204 if (error) in xrep_xattr_stash_parentadd()
1205 return error; in xrep_xattr_stash_parentadd()
1224 int error; in xrep_xattr_stash_parentremove() local
1229 error = xfblob_storename(rx->pptr_names, &pptr.name_cookie, name); in xrep_xattr_stash_parentremove()
1230 if (error) in xrep_xattr_stash_parentremove()
1231 return error; in xrep_xattr_stash_parentremove()
1249 int error; in xrep_xattr_live_dirent_update() local
1264 error = xrep_xattr_stash_parentadd(rx, p->name, p->dp); in xrep_xattr_live_dirent_update()
1266 error = xrep_xattr_stash_parentremove(rx, p->name, p->dp); in xrep_xattr_live_dirent_update()
1267 if (error) in xrep_xattr_live_dirent_update()
1284 int error; in xrep_xattr_swap_prep() local
1301 error = xfs_attr_shortform_to_leaf(&args); in xrep_xattr_swap_prep()
1302 if (error) in xrep_xattr_swap_prep()
1303 return error; in xrep_xattr_swap_prep()
1309 error = xfs_defer_finish(&sc->tp); in xrep_xattr_swap_prep()
1310 if (error) in xrep_xattr_swap_prep()
1311 return error; in xrep_xattr_swap_prep()
1345 int error = 0; in xrep_xattr_swap() local
1369 error = xrep_xattr_swap_prep(sc, temp_local, ip_local); in xrep_xattr_swap()
1370 if (error) in xrep_xattr_swap()
1371 return error; in xrep_xattr_swap()
1386 int error; in xrep_xattr_finalize_tempfile() local
1398 error = xrep_xattr_replay_pptr_updates(rx); in xrep_xattr_finalize_tempfile()
1399 if (error) in xrep_xattr_finalize_tempfile()
1400 return error; in xrep_xattr_finalize_tempfile()
1402 error = xrep_tempexch_trans_alloc(sc, XFS_ATTR_FORK, &rx->tx); in xrep_xattr_finalize_tempfile()
1403 if (error) in xrep_xattr_finalize_tempfile()
1404 return error; in xrep_xattr_finalize_tempfile()
1411 } while (!xchk_should_terminate(sc, &error)); in xrep_xattr_finalize_tempfile()
1412 return error; in xrep_xattr_finalize_tempfile()
1424 int error; in xrep_xattr_rebuild_tree() local
1432 error = xrep_xattr_reset_fork(sc); in xrep_xattr_rebuild_tree()
1433 if (error) in xrep_xattr_rebuild_tree()
1434 return error; in xrep_xattr_rebuild_tree()
1452 error = xrep_trans_commit(sc); in xrep_xattr_rebuild_tree()
1453 if (error) in xrep_xattr_rebuild_tree()
1454 return error; in xrep_xattr_rebuild_tree()
1463 error = xrep_tempfile_iolock_polled(rx->sc); in xrep_xattr_rebuild_tree()
1464 if (error) in xrep_xattr_rebuild_tree()
1465 return error; in xrep_xattr_rebuild_tree()
1472 error = xrep_xattr_finalize_tempfile(rx); in xrep_xattr_rebuild_tree()
1473 if (error) in xrep_xattr_rebuild_tree()
1474 return error; in xrep_xattr_rebuild_tree()
1481 error = xrep_xattr_swap(sc, &rx->tx); in xrep_xattr_rebuild_tree()
1482 if (error) in xrep_xattr_rebuild_tree()
1483 return error; in xrep_xattr_rebuild_tree()
1485 error = xrep_xattr_reset_tempfile_fork(sc); in xrep_xattr_rebuild_tree()
1486 if (error) in xrep_xattr_rebuild_tree()
1487 return error; in xrep_xattr_rebuild_tree()
1494 error = xfs_trans_roll(&sc->tp); in xrep_xattr_rebuild_tree()
1495 if (error) in xrep_xattr_rebuild_tree()
1496 return error; in xrep_xattr_rebuild_tree()
1534 int error; in xrep_xattr_setup_scan() local
1551 error = xchk_setup_xattr_buf(rx->sc, max_len); in xrep_xattr_setup_scan()
1552 if (error == -ENOMEM) in xrep_xattr_setup_scan()
1553 error = -EDEADLOCK; in xrep_xattr_setup_scan()
1554 if (error) in xrep_xattr_setup_scan()
1559 error = xfarray_create(descr, 0, sizeof(struct xrep_xattr_key), in xrep_xattr_setup_scan()
1562 if (error) in xrep_xattr_setup_scan()
1566 error = xfblob_create(descr, &rx->xattr_blobs); in xrep_xattr_setup_scan()
1568 if (error) in xrep_xattr_setup_scan()
1576 error = xfarray_create(descr, 0, in xrep_xattr_setup_scan()
1580 if (error) in xrep_xattr_setup_scan()
1585 error = xfblob_create(descr, &rx->pptr_names); in xrep_xattr_setup_scan()
1587 if (error) in xrep_xattr_setup_scan()
1591 error = xfs_dir_hook_add(sc->mp, &rx->dhook); in xrep_xattr_setup_scan()
1592 if (error) in xrep_xattr_setup_scan()
1609 return error; in xrep_xattr_setup_scan()
1625 int error; in xrep_xattr() local
1637 error = xrep_xattr_setup_scan(sc, &rx); in xrep_xattr()
1638 if (error) in xrep_xattr()
1639 return error; in xrep_xattr()
1643 error = xrep_xattr_salvage_attributes(rx); in xrep_xattr()
1644 if (error) in xrep_xattr()
1648 error = -EIO; in xrep_xattr()
1653 if (xchk_should_terminate(sc, &error)) in xrep_xattr()
1656 error = xrep_xattr_rebuild_tree(rx); in xrep_xattr()
1657 if (error) in xrep_xattr()
1662 return error; in xrep_xattr()