Lines Matching refs:state
58 struct xfs_da_state **state);
59 STATIC int xfs_attr_fillstate(xfs_da_state_t *state);
60 STATIC int xfs_attr_refillstate(xfs_da_state_t *state);
874 struct xfs_da_state *state; in xfs_attr_node_hasname() local
877 state = xfs_da_state_alloc(args); in xfs_attr_node_hasname()
879 *statep = state; in xfs_attr_node_hasname()
884 error = xfs_da3_node_lookup_int(state, &retval); in xfs_attr_node_hasname()
889 xfs_da_state_free(state); in xfs_attr_node_hasname()
912 struct xfs_da_state *state; in xfs_attr_node_addname() local
929 retval = xfs_attr_node_hasname(args, &state); in xfs_attr_node_addname()
933 blk = &state->path.blk[ state->path.active-1 ]; in xfs_attr_node_addname()
957 retval = xfs_attr3_leaf_add(blk->bp, state->args); in xfs_attr_node_addname()
959 if (state->path.active == 1) { in xfs_attr_node_addname()
965 xfs_da_state_free(state); in xfs_attr_node_addname()
966 state = NULL; in xfs_attr_node_addname()
991 error = xfs_da3_split(state); in xfs_attr_node_addname()
1001 xfs_da3_fixhashpath(state, &state->path); in xfs_attr_node_addname()
1008 xfs_da_state_free(state); in xfs_attr_node_addname()
1009 state = NULL; in xfs_attr_node_addname()
1081 state = xfs_da_state_alloc(args); in xfs_attr_node_addname()
1082 state->inleaf = 0; in xfs_attr_node_addname()
1083 error = xfs_da3_node_lookup_int(state, &retval); in xfs_attr_node_addname()
1090 blk = &state->path.blk[state->path.active-1]; in xfs_attr_node_addname()
1093 xfs_da3_fixhashpath(state, &state->path); in xfs_attr_node_addname()
1098 if (retval && (state->path.active > 1)) { in xfs_attr_node_addname()
1099 error = xfs_da3_join(state); in xfs_attr_node_addname()
1106 if (state) in xfs_attr_node_addname()
1107 xfs_da_state_free(state); in xfs_attr_node_addname()
1119 struct xfs_da_state *state) in xfs_attr_node_shrink() argument
1128 ASSERT(state->path.active == 1); in xfs_attr_node_shrink()
1129 ASSERT(state->path.blk[0].bp); in xfs_attr_node_shrink()
1130 state->path.blk[0].bp = NULL; in xfs_attr_node_shrink()
1153 struct xfs_da_state *state) in xfs_attr_leaf_mark_incomplete() argument
1162 error = xfs_attr_fillstate(state); in xfs_attr_leaf_mark_incomplete()
1180 struct xfs_da_state **state) in xfs_attr_node_removename_setup() argument
1184 error = xfs_attr_node_hasname(args, state); in xfs_attr_node_removename_setup()
1188 ASSERT((*state)->path.blk[(*state)->path.active - 1].bp != NULL); in xfs_attr_node_removename_setup()
1189 ASSERT((*state)->path.blk[(*state)->path.active - 1].magic == in xfs_attr_node_removename_setup()
1193 error = xfs_attr_leaf_mark_incomplete(args, *state); in xfs_attr_node_removename_setup()
1206 struct xfs_da_state *state) in xfs_attr_node_remove_rmt() argument
1218 return xfs_attr_refillstate(state); in xfs_attr_node_remove_rmt()
1232 struct xfs_da_state *state; in xfs_attr_node_removename() local
1239 error = xfs_attr_node_removename_setup(args, &state); in xfs_attr_node_removename()
1249 error = xfs_attr_node_remove_rmt(args, state); in xfs_attr_node_removename()
1257 blk = &state->path.blk[ state->path.active-1 ]; in xfs_attr_node_removename()
1260 xfs_da3_fixhashpath(state, &state->path); in xfs_attr_node_removename()
1265 if (retval && (state->path.active > 1)) { in xfs_attr_node_removename()
1266 error = xfs_da3_join(state); in xfs_attr_node_removename()
1284 error = xfs_attr_node_shrink(args, state); in xfs_attr_node_removename()
1287 if (state) in xfs_attr_node_removename()
1288 xfs_da_state_free(state); in xfs_attr_node_removename()
1299 xfs_attr_fillstate(xfs_da_state_t *state) in xfs_attr_fillstate() argument
1305 trace_xfs_attr_fillstate(state->args); in xfs_attr_fillstate()
1311 path = &state->path; in xfs_attr_fillstate()
1326 path = &state->altpath; in xfs_attr_fillstate()
1347 xfs_attr_refillstate(xfs_da_state_t *state) in xfs_attr_refillstate() argument
1353 trace_xfs_attr_refillstate(state->args); in xfs_attr_refillstate()
1359 path = &state->path; in xfs_attr_refillstate()
1363 error = xfs_da3_node_read_mapped(state->args->trans, in xfs_attr_refillstate()
1364 state->args->dp, blk->disk_blkno, in xfs_attr_refillstate()
1377 path = &state->altpath; in xfs_attr_refillstate()
1381 error = xfs_da3_node_read_mapped(state->args->trans, in xfs_attr_refillstate()
1382 state->args->dp, blk->disk_blkno, in xfs_attr_refillstate()
1407 struct xfs_da_state *state; in xfs_attr_node_get() local
1417 error = xfs_attr_node_hasname(args, &state); in xfs_attr_node_get()
1424 blk = &state->path.blk[state->path.active - 1]; in xfs_attr_node_get()
1431 for (i = 0; state != NULL && i < state->path.active; i++) { in xfs_attr_node_get()
1432 xfs_trans_brelse(args->trans, state->path.blk[i].bp); in xfs_attr_node_get()
1433 state->path.blk[i].bp = NULL; in xfs_attr_node_get()
1436 if (state) in xfs_attr_node_get()
1437 xfs_da_state_free(state); in xfs_attr_node_get()