Lines Matching refs:state
61 struct xfs_da_state **state);
62 STATIC int xfs_attr_fillstate(xfs_da_state_t *state);
63 STATIC int xfs_attr_refillstate(xfs_da_state_t *state);
67 struct xfs_da_state *state);
1075 struct xfs_da_state *state; in xfs_attr_node_hasname() local
1078 state = xfs_da_state_alloc(args); in xfs_attr_node_hasname()
1080 *statep = state; in xfs_attr_node_hasname()
1085 error = xfs_da3_node_lookup_int(state, &retval); in xfs_attr_node_hasname()
1090 xfs_da_state_free(state); in xfs_attr_node_hasname()
1163 struct xfs_da_state *state = dac->da_state; in xfs_attr_node_addname() local
1169 blk = &state->path.blk[state->path.active-1]; in xfs_attr_node_addname()
1172 error = xfs_attr3_leaf_add(blk->bp, state->args); in xfs_attr_node_addname()
1174 if (state->path.active == 1) { in xfs_attr_node_addname()
1180 xfs_da_state_free(state); in xfs_attr_node_addname()
1181 state = NULL; in xfs_attr_node_addname()
1205 error = xfs_da3_split(state); in xfs_attr_node_addname()
1213 xfs_da3_fixhashpath(state, &state->path); in xfs_attr_node_addname()
1217 if (state) in xfs_attr_node_addname()
1218 xfs_da_state_free(state); in xfs_attr_node_addname()
1228 struct xfs_da_state *state = NULL; in xfs_attr_node_addname_clear_incomplete() local
1237 state = xfs_da_state_alloc(args); in xfs_attr_node_addname_clear_incomplete()
1238 state->inleaf = 0; in xfs_attr_node_addname_clear_incomplete()
1239 error = xfs_da3_node_lookup_int(state, &retval); in xfs_attr_node_addname_clear_incomplete()
1243 error = xfs_attr_node_removename(args, state); in xfs_attr_node_addname_clear_incomplete()
1248 if (retval && (state->path.active > 1)) { in xfs_attr_node_addname_clear_incomplete()
1249 error = xfs_da3_join(state); in xfs_attr_node_addname_clear_incomplete()
1256 if (state) in xfs_attr_node_addname_clear_incomplete()
1257 xfs_da_state_free(state); in xfs_attr_node_addname_clear_incomplete()
1269 struct xfs_da_state *state) in xfs_attr_node_shrink() argument
1278 ASSERT(state->path.active == 1); in xfs_attr_node_shrink()
1279 ASSERT(state->path.blk[0].bp); in xfs_attr_node_shrink()
1280 state->path.blk[0].bp = NULL; in xfs_attr_node_shrink()
1303 struct xfs_da_state *state) in xfs_attr_leaf_mark_incomplete() argument
1312 error = xfs_attr_fillstate(state); in xfs_attr_leaf_mark_incomplete()
1332 struct xfs_da_state **state = &dac->da_state; in xfs_attr_node_removename_setup() local
1335 error = xfs_attr_node_hasname(args, state); in xfs_attr_node_removename_setup()
1340 ASSERT((*state)->path.blk[(*state)->path.active - 1].bp != NULL); in xfs_attr_node_removename_setup()
1341 ASSERT((*state)->path.blk[(*state)->path.active - 1].magic == in xfs_attr_node_removename_setup()
1345 error = xfs_attr_leaf_mark_incomplete(args, *state); in xfs_attr_node_removename_setup()
1353 xfs_da_state_free(*state); in xfs_attr_node_removename_setup()
1361 struct xfs_da_state *state) in xfs_attr_node_removename() argument
1369 blk = &state->path.blk[state->path.active-1]; in xfs_attr_node_removename()
1372 xfs_da3_fixhashpath(state, &state->path); in xfs_attr_node_removename()
1394 struct xfs_da_state *state = dac->da_state; in xfs_attr_remove_iter() local
1423 state = dac->da_state; in xfs_attr_remove_iter()
1456 error = xfs_attr_refillstate(state); in xfs_attr_remove_iter()
1472 error = xfs_attr_refillstate(state); in xfs_attr_remove_iter()
1477 retval = xfs_attr_node_removename(args, state); in xfs_attr_remove_iter()
1483 if (retval && (state->path.active > 1)) { in xfs_attr_remove_iter()
1484 error = xfs_da3_join(state); in xfs_attr_remove_iter()
1503 error = xfs_attr_node_shrink(args, state); in xfs_attr_remove_iter()
1512 if (state) in xfs_attr_remove_iter()
1513 xfs_da_state_free(state); in xfs_attr_remove_iter()
1524 xfs_attr_fillstate(xfs_da_state_t *state) in xfs_attr_fillstate() argument
1530 trace_xfs_attr_fillstate(state->args); in xfs_attr_fillstate()
1536 path = &state->path; in xfs_attr_fillstate()
1551 path = &state->altpath; in xfs_attr_fillstate()
1572 xfs_attr_refillstate(xfs_da_state_t *state) in xfs_attr_refillstate() argument
1578 trace_xfs_attr_refillstate(state->args); in xfs_attr_refillstate()
1584 path = &state->path; in xfs_attr_refillstate()
1588 error = xfs_da3_node_read_mapped(state->args->trans, in xfs_attr_refillstate()
1589 state->args->dp, blk->disk_blkno, in xfs_attr_refillstate()
1602 path = &state->altpath; in xfs_attr_refillstate()
1606 error = xfs_da3_node_read_mapped(state->args->trans, in xfs_attr_refillstate()
1607 state->args->dp, blk->disk_blkno, in xfs_attr_refillstate()
1632 struct xfs_da_state *state; in xfs_attr_node_get() local
1642 error = xfs_attr_node_hasname(args, &state); in xfs_attr_node_get()
1649 blk = &state->path.blk[state->path.active - 1]; in xfs_attr_node_get()
1656 for (i = 0; state != NULL && i < state->path.active; i++) { in xfs_attr_node_get()
1657 xfs_trans_brelse(args->trans, state->path.blk[i].bp); in xfs_attr_node_get()
1658 state->path.blk[i].bp = NULL; in xfs_attr_node_get()
1661 if (state) in xfs_attr_node_get()
1662 xfs_da_state_free(state); in xfs_attr_node_get()