Lines Matching refs:error
169 int level, error;
181 error = xfs_da3_node_read_mapped(state->args->trans,
184 if (error)
185 return error;
199 error = xfs_da3_node_read_mapped(state->args->trans,
202 if (error)
203 return error;
260 int error; in xfs_attr_get() local
275 error = xfs_attr_get_ilocked(args); in xfs_attr_get()
278 return error; in xfs_attr_get()
350 int error; in xfs_attr_try_sf_addname() local
358 error = xfs_attr_shortform_addname(args); in xfs_attr_try_sf_addname()
359 if (error == -ENOSPC) in xfs_attr_try_sf_addname()
360 return error; in xfs_attr_try_sf_addname()
366 if (!error && !(args->op_flags & XFS_DA_OP_NOTIME)) in xfs_attr_try_sf_addname()
372 return error; in xfs_attr_try_sf_addname()
381 int error = 0; in xfs_attr_sf_addname() local
383 error = xfs_attr_try_sf_addname(dp, args); in xfs_attr_sf_addname()
384 if (error != -ENOSPC) { in xfs_attr_sf_addname()
385 ASSERT(!error || error == -EEXIST); in xfs_attr_sf_addname()
394 error = xfs_attr_shortform_to_leaf(args); in xfs_attr_sf_addname()
395 if (error) in xfs_attr_sf_addname()
396 return error; in xfs_attr_sf_addname()
401 return error; in xfs_attr_sf_addname()
436 int error; in xfs_attr_leaf_addname() local
444 error = xfs_attr_leaf_try_add(args); in xfs_attr_leaf_addname()
446 if (error == -ENOSPC) { in xfs_attr_leaf_addname()
447 error = xfs_attr3_leaf_to_node(args); in xfs_attr_leaf_addname()
448 if (error) in xfs_attr_leaf_addname()
449 return error; in xfs_attr_leaf_addname()
458 if (error) in xfs_attr_leaf_addname()
459 return error; in xfs_attr_leaf_addname()
473 return error; in xfs_attr_leaf_addname()
488 int error; in xfs_attr_node_addname() local
490 error = xfs_attr_node_addname_find_attr(attr); in xfs_attr_node_addname()
491 if (error) in xfs_attr_node_addname()
492 return error; in xfs_attr_node_addname()
494 error = xfs_attr_node_try_addname(attr); in xfs_attr_node_addname()
495 if (error == -ENOSPC) { in xfs_attr_node_addname()
496 error = xfs_attr3_leaf_to_node(args); in xfs_attr_node_addname()
497 if (error) in xfs_attr_node_addname()
498 return error; in xfs_attr_node_addname()
505 if (error) in xfs_attr_node_addname()
506 return error; in xfs_attr_node_addname()
515 return error; in xfs_attr_node_addname()
523 int error = 0; in xfs_attr_rmtval_alloc() local
532 error = xfs_attr_rmtval_set_blk(attr); in xfs_attr_rmtval_alloc()
533 if (error) in xfs_attr_rmtval_alloc()
534 return error; in xfs_attr_rmtval_alloc()
540 error = xfs_attr_rmtval_set_value(args); in xfs_attr_rmtval_alloc()
541 if (error) in xfs_attr_rmtval_alloc()
542 return error; in xfs_attr_rmtval_alloc()
552 error = xfs_attr3_leaf_clearflag(args); in xfs_attr_rmtval_alloc()
555 return error; in xfs_attr_rmtval_alloc()
567 int error; in xfs_attr_leaf_mark_incomplete() local
574 error = xfs_attr_fillstate(state); in xfs_attr_leaf_mark_incomplete()
575 if (error) in xfs_attr_leaf_mark_incomplete()
576 return error; in xfs_attr_leaf_mark_incomplete()
608 int error; in xfs_attr_node_removename_setup() local
611 error = xfs_attr_node_lookup(args, attr->xattri_da_state); in xfs_attr_node_removename_setup()
612 if (error != -EEXIST) in xfs_attr_node_removename_setup()
614 error = 0; in xfs_attr_node_removename_setup()
621 error = xfs_attr_leaf_mark_incomplete(args, state); in xfs_attr_node_removename_setup()
622 if (error) in xfs_attr_node_removename_setup()
625 error = xfs_attr_rmtval_invalidate(args); in xfs_attr_node_removename_setup()
627 if (error) { in xfs_attr_node_removename_setup()
632 return error; in xfs_attr_node_removename_setup()
648 int error; in xfs_attr_leaf_remove_attr() local
650 error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, in xfs_attr_leaf_remove_attr()
652 if (error) in xfs_attr_leaf_remove_attr()
653 return error; in xfs_attr_leaf_remove_attr()
659 error = xfs_attr3_leaf_to_shortform(bp, args, forkoff); in xfs_attr_leaf_remove_attr()
662 return error; in xfs_attr_leaf_remove_attr()
677 int error; in xfs_attr_leaf_shrink() local
682 error = xfs_attr3_leaf_read(args->trans, args->dp, 0, &bp); in xfs_attr_leaf_shrink()
683 if (error) in xfs_attr_leaf_shrink()
684 return error; in xfs_attr_leaf_shrink()
688 error = xfs_attr3_leaf_to_shortform(bp, args, forkoff); in xfs_attr_leaf_shrink()
694 return error; in xfs_attr_leaf_shrink()
710 int error = 0; in xfs_attr_set_iter() local
726 error = xfs_attr_sf_removename(args); in xfs_attr_set_iter()
731 error = xfs_attr_leaf_removename(args); in xfs_attr_set_iter()
736 error = xfs_attr_node_removename_setup(attr); in xfs_attr_set_iter()
737 if (error == -ENOATTR && in xfs_attr_set_iter()
741 error = 0; in xfs_attr_set_iter()
744 if (error) in xfs_attr_set_iter()
745 return error; in xfs_attr_set_iter()
753 error = xfs_attr_rmtval_find_space(attr); in xfs_attr_set_iter()
754 if (error) in xfs_attr_set_iter()
755 return error; in xfs_attr_set_iter()
761 error = xfs_attr_rmtval_alloc(attr); in xfs_attr_set_iter()
762 if (error) in xfs_attr_set_iter()
763 return error; in xfs_attr_set_iter()
775 error = xfs_attr3_leaf_flipflags(args); in xfs_attr_set_iter()
776 if (error) in xfs_attr_set_iter()
777 return error; in xfs_attr_set_iter()
796 error = xfs_attr_rmtval_invalidate(args); in xfs_attr_set_iter()
797 if (error) in xfs_attr_set_iter()
798 return error; in xfs_attr_set_iter()
808 error = xfs_attr_rmtval_remove(attr); in xfs_attr_set_iter()
809 if (error == -EAGAIN) { in xfs_attr_set_iter()
810 error = 0; in xfs_attr_set_iter()
813 if (error) in xfs_attr_set_iter()
814 return error; in xfs_attr_set_iter()
828 error = xfs_attr_leaf_remove_attr(attr); in xfs_attr_set_iter()
834 error = xfs_attr_node_remove_attr(attr); in xfs_attr_set_iter()
835 if (!error) in xfs_attr_set_iter()
836 error = xfs_attr_leaf_shrink(args); in xfs_attr_set_iter()
846 return error; in xfs_attr_set_iter()
860 int error; in xfs_attr_lookup() local
869 error = xfs_attr_leaf_hasname(args, &bp); in xfs_attr_lookup()
874 return error; in xfs_attr_lookup()
878 error = xfs_attr_node_lookup(args, state); in xfs_attr_lookup()
880 return error; in xfs_attr_lookup()
906 int error = 0; in xfs_attr_defer_add() local
908 error = xfs_attr_intent_init(args, XFS_ATTRI_OP_FLAGS_SET, &new); in xfs_attr_defer_add()
909 if (error) in xfs_attr_defer_add()
910 return error; in xfs_attr_defer_add()
925 int error = 0; in xfs_attr_defer_replace() local
927 error = xfs_attr_intent_init(args, XFS_ATTRI_OP_FLAGS_REPLACE, &new); in xfs_attr_defer_replace()
928 if (error) in xfs_attr_defer_replace()
929 return error; in xfs_attr_defer_replace()
945 int error; in xfs_attr_defer_remove() local
947 error = xfs_attr_intent_init(args, XFS_ATTRI_OP_FLAGS_REMOVE, &new); in xfs_attr_defer_remove()
948 if (error) in xfs_attr_defer_remove()
949 return error; in xfs_attr_defer_remove()
970 int error, local; in xfs_attr_set() local
977 error = xfs_qm_dqattach(dp); in xfs_attr_set()
978 if (error) in xfs_attr_set()
979 return error; in xfs_attr_set()
1007 error = xfs_bmap_add_attrfork(dp, sf_size, rsvd); in xfs_attr_set()
1008 if (error) in xfs_attr_set()
1009 return error; in xfs_attr_set()
1024 error = xfs_trans_alloc_inode(dp, &tres, total, 0, rsvd, &args->trans); in xfs_attr_set()
1025 if (error) in xfs_attr_set()
1026 return error; in xfs_attr_set()
1029 error = xfs_iext_count_may_overflow(dp, XFS_ATTR_FORK, in xfs_attr_set()
1031 if (error == -EFBIG) in xfs_attr_set()
1032 error = xfs_iext_count_upgrade(args->trans, dp, in xfs_attr_set()
1034 if (error) in xfs_attr_set()
1038 error = xfs_attr_lookup(args); in xfs_attr_set()
1039 switch (error) { in xfs_attr_set()
1043 error = xfs_attr_defer_remove(args); in xfs_attr_set()
1050 error = xfs_attr_defer_replace(args); in xfs_attr_set()
1061 error = xfs_attr_defer_add(args); in xfs_attr_set()
1066 if (error) in xfs_attr_set()
1083 error = xfs_trans_commit(args->trans); in xfs_attr_set()
1086 return error; in xfs_attr_set()
1115 int error; in xfs_attr_shortform_addname() local
1119 error = xfs_attr_shortform_lookup(args); in xfs_attr_shortform_addname()
1120 switch (error) { in xfs_attr_shortform_addname()
1123 return error; in xfs_attr_shortform_addname()
1127 return error; in xfs_attr_shortform_addname()
1129 error = xfs_attr_sf_removename(args); in xfs_attr_shortform_addname()
1130 if (error) in xfs_attr_shortform_addname()
1131 return error; in xfs_attr_shortform_addname()
1144 return error; in xfs_attr_shortform_addname()
1209 int error; in xfs_attr_leaf_try_add() local
1211 error = xfs_attr3_leaf_read(args->trans, args->dp, 0, &bp); in xfs_attr_leaf_try_add()
1212 if (error) in xfs_attr_leaf_try_add()
1213 return error; in xfs_attr_leaf_try_add()
1218 error = xfs_attr3_leaf_lookup_int(bp, args); in xfs_attr_leaf_try_add()
1219 switch (error) { in xfs_attr_leaf_try_add()
1246 return error; in xfs_attr_leaf_try_add()
1257 int error = 0; in xfs_attr_leaf_hasname() local
1259 error = xfs_attr3_leaf_read(args->trans, args->dp, 0, bp); in xfs_attr_leaf_hasname()
1260 if (error) in xfs_attr_leaf_hasname()
1261 return error; in xfs_attr_leaf_hasname()
1263 error = xfs_attr3_leaf_lookup_int(*bp, args); in xfs_attr_leaf_hasname()
1264 if (error != -ENOATTR && error != -EEXIST) in xfs_attr_leaf_hasname()
1267 return error; in xfs_attr_leaf_hasname()
1282 int error, forkoff; in xfs_attr_leaf_removename() local
1291 error = xfs_attr_leaf_hasname(args, &bp); in xfs_attr_leaf_removename()
1292 if (error == -ENOATTR) { in xfs_attr_leaf_removename()
1296 return error; in xfs_attr_leaf_removename()
1297 } else if (error != -EEXIST) in xfs_attr_leaf_removename()
1298 return error; in xfs_attr_leaf_removename()
1325 int error; in xfs_attr_leaf_get() local
1329 error = xfs_attr_leaf_hasname(args, &bp); in xfs_attr_leaf_get()
1331 if (error == -ENOATTR) { in xfs_attr_leaf_get()
1333 return error; in xfs_attr_leaf_get()
1334 } else if (error != -EEXIST) in xfs_attr_leaf_get()
1335 return error; in xfs_attr_leaf_get()
1338 error = xfs_attr3_leaf_getvalue(bp, args); in xfs_attr_leaf_get()
1340 return error; in xfs_attr_leaf_get()
1349 int retval, error; in xfs_attr_node_lookup() local
1354 error = xfs_da3_node_lookup_int(state, &retval); in xfs_attr_node_lookup()
1355 if (error) in xfs_attr_node_lookup()
1356 return error; in xfs_attr_node_lookup()
1370 int error; in xfs_attr_node_addname_find_attr() local
1377 error = xfs_attr_node_lookup(args, attr->xattri_da_state); in xfs_attr_node_addname_find_attr()
1378 switch (error) { in xfs_attr_node_addname_find_attr()
1381 goto error; in xfs_attr_node_addname_find_attr()
1385 goto error; in xfs_attr_node_addname_find_attr()
1399 goto error; in xfs_attr_node_addname_find_attr()
1403 error: in xfs_attr_node_addname_find_attr()
1408 return error; in xfs_attr_node_addname_find_attr()
1424 int error; in xfs_attr_node_try_addname() local
1431 error = xfs_attr3_leaf_add(blk->bp, state->args); in xfs_attr_node_try_addname()
1432 if (error == -ENOSPC) { in xfs_attr_node_try_addname()
1448 error = xfs_da3_split(state); in xfs_attr_node_try_addname()
1449 if (error) in xfs_attr_node_try_addname()
1461 return error; in xfs_attr_node_try_addname()
1490 int error = 0; in xfs_attr_node_remove_attr() local
1498 error = xfs_da3_node_lookup_int(state, &retval); in xfs_attr_node_remove_attr()
1499 if (error) in xfs_attr_node_remove_attr()
1502 error = xfs_attr_node_removename(args, state); in xfs_attr_node_remove_attr()
1508 error = xfs_da3_join(state); in xfs_attr_node_remove_attr()
1509 if (error) in xfs_attr_node_remove_attr()
1512 retval = error = 0; in xfs_attr_node_remove_attr()
1516 if (error) in xfs_attr_node_remove_attr()
1517 return error; in xfs_attr_node_remove_attr()
1537 int error; in xfs_attr_node_get() local
1545 error = xfs_attr_node_lookup(args, state); in xfs_attr_node_get()
1546 if (error != -EEXIST) in xfs_attr_node_get()
1553 error = xfs_attr3_leaf_getvalue(blk->bp, args); in xfs_attr_node_get()
1565 return error; in xfs_attr_node_get()