Lines Matching defs: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);
311 * and transaction in the same state (inode locked and joined,
638 /* save the attribute state for later removal*/
643 * clear the remote attr state now that it is saved so that the
644 * values reflect the state of the attribute we are about to
866 * statep: If not null is set to point at the found state. Caller will
867 * be responsible for freeing the state in this case.
874 struct xfs_da_state *state;
877 state = xfs_da_state_alloc(args);
879 *statep = state;
884 error = xfs_da3_node_lookup_int(state, &retval);
889 xfs_da_state_free(state);
912 struct xfs_da_state *state;
929 retval = xfs_attr_node_hasname(args, &state);
933 blk = &state->path.blk[ state->path.active-1 ];
943 /* save the attribute state for later removal*/
948 * clear the remote attr state now that it is saved so that the
949 * values reflect the state of the attribute we are about to
957 retval = xfs_attr3_leaf_add(blk->bp, state->args);
959 if (state->path.active == 1) {
965 xfs_da_state_free(state);
966 state = NULL;
991 error = xfs_da3_split(state);
1001 xfs_da3_fixhashpath(state, &state->path);
1005 * Kill the state structure, we're done with it and need to
1008 xfs_da_state_free(state);
1009 state = NULL;
1081 state = xfs_da_state_alloc(args);
1082 state->inleaf = 0;
1083 error = xfs_da3_node_lookup_int(state, &retval);
1090 blk = &state->path.blk[state->path.active-1];
1093 xfs_da3_fixhashpath(state, &state->path);
1098 if (retval && (state->path.active > 1)) {
1099 error = xfs_da3_join(state);
1106 if (state)
1107 xfs_da_state_free(state);
1119 struct xfs_da_state *state)
1126 * Have to get rid of the copy of this dabuf in the state.
1128 ASSERT(state->path.active == 1);
1129 ASSERT(state->path.blk[0].bp);
1130 state->path.blk[0].bp = NULL;
1153 struct xfs_da_state *state)
1158 * Fill in disk block numbers in the state structure
1162 error = xfs_attr_fillstate(state);
1180 struct xfs_da_state **state)
1184 error = xfs_attr_node_hasname(args, state);
1188 ASSERT((*state)->path.blk[(*state)->path.active - 1].bp != NULL);
1189 ASSERT((*state)->path.blk[(*state)->path.active - 1].magic ==
1193 error = xfs_attr_leaf_mark_incomplete(args, *state);
1206 struct xfs_da_state *state)
1215 * Refill the state structure with buffers, the prior calls released our
1218 return xfs_attr_refillstate(state);
1232 struct xfs_da_state *state;
1239 error = xfs_attr_node_removename_setup(args, &state);
1249 error = xfs_attr_node_remove_rmt(args, state);
1257 blk = &state->path.blk[ state->path.active-1 ];
1260 xfs_da3_fixhashpath(state, &state->path);
1265 if (retval && (state->path.active > 1)) {
1266 error = xfs_da3_join(state);
1284 error = xfs_attr_node_shrink(args, state);
1287 if (state)
1288 xfs_da_state_free(state);
1293 * Fill in the disk block numbers in the state structure for the buffers
1294 * that are attached to the state structure.
1299 xfs_attr_fillstate(xfs_da_state_t *state)
1305 trace_xfs_attr_fillstate(state->args);
1308 * Roll down the "path" in the state structure, storing the on-disk
1311 path = &state->path;
1323 * Roll down the "altpath" in the state structure, storing the on-disk
1326 path = &state->altpath;
1341 * Reattach the buffers to the state structure based on the disk block
1342 * numbers stored in the state structure.
1347 xfs_attr_refillstate(xfs_da_state_t *state)
1353 trace_xfs_attr_refillstate(state->args);
1356 * Roll down the "path" in the state structure, storing the on-disk
1359 path = &state->path;
1363 error = xfs_da3_node_read_mapped(state->args->trans,
1364 state->args->dp, blk->disk_blkno,
1374 * Roll down the "altpath" in the state structure, storing the on-disk
1377 path = &state->altpath;
1381 error = xfs_da3_node_read_mapped(state->args->trans,
1382 state->args->dp, blk->disk_blkno,
1407 struct xfs_da_state *state;
1417 error = xfs_attr_node_hasname(args, &state);
1424 blk = &state->path.blk[state->path.active - 1];
1431 for (i = 0; state != NULL && i < state->path.active; i++) {
1432 xfs_trans_brelse(args->trans, state->path.blk[i].bp);
1433 state->path.blk[i].bp = NULL;
1436 if (state)
1437 xfs_da_state_free(state);