• Home
  • Raw
  • Download

Lines Matching refs:state

54 STATIC void xfs_attr3_leaf_rebalance(xfs_da_state_t *state,
57 STATIC int xfs_attr3_leaf_figure_balance(xfs_da_state_t *state,
1300 struct xfs_da_state *state, in xfs_attr3_leaf_split() argument
1307 trace_xfs_attr_leaf_split(state->args); in xfs_attr3_leaf_split()
1313 error = xfs_da_grow_inode(state->args, &blkno); in xfs_attr3_leaf_split()
1316 error = xfs_attr3_leaf_create(state->args, blkno, &newblk->bp); in xfs_attr3_leaf_split()
1326 xfs_attr3_leaf_rebalance(state, oldblk, newblk); in xfs_attr3_leaf_split()
1327 error = xfs_da3_blk_link(state, oldblk, newblk); in xfs_attr3_leaf_split()
1338 if (state->inleaf) { in xfs_attr3_leaf_split()
1339 trace_xfs_attr_leaf_add_old(state->args); in xfs_attr3_leaf_split()
1340 error = xfs_attr3_leaf_add(oldblk->bp, state->args); in xfs_attr3_leaf_split()
1342 trace_xfs_attr_leaf_add_new(state->args); in xfs_attr3_leaf_split()
1343 error = xfs_attr3_leaf_add(newblk->bp, state->args); in xfs_attr3_leaf_split()
1668 struct xfs_da_state *state, in xfs_attr3_leaf_rebalance() argument
1692 xfs_attr3_leaf_hdr_from_disk(state->args->geo, &ichdr1, leaf1); in xfs_attr3_leaf_rebalance()
1693 xfs_attr3_leaf_hdr_from_disk(state->args->geo, &ichdr2, leaf2); in xfs_attr3_leaf_rebalance()
1695 args = state->args; in xfs_attr3_leaf_rebalance()
1725 state->inleaf = xfs_attr3_leaf_figure_balance(state, blk1, &ichdr1, in xfs_attr3_leaf_rebalance()
1729 state->inleaf = !state->inleaf; in xfs_attr3_leaf_rebalance()
1787 xfs_attr3_leaf_hdr_to_disk(state->args->geo, leaf1, &ichdr1); in xfs_attr3_leaf_rebalance()
1788 xfs_attr3_leaf_hdr_to_disk(state->args->geo, leaf2, &ichdr2); in xfs_attr3_leaf_rebalance()
1813 ASSERT(state->inleaf == 0); in xfs_attr3_leaf_rebalance()
1818 if (state->inleaf) { in xfs_attr3_leaf_rebalance()
1832 if (!state->extravalid) { in xfs_attr3_leaf_rebalance()
1843 ASSERT(state->inleaf == 1); in xfs_attr3_leaf_rebalance()
1858 struct xfs_da_state *state, in xfs_attr3_leaf_figure_balance() argument
1885 xfs_attr_leaf_newentsize(state->args, NULL); in xfs_attr3_leaf_figure_balance()
1887 lastdelta = state->args->geo->blksize; in xfs_attr3_leaf_figure_balance()
1897 xfs_attr_leaf_newentsize(state->args, NULL); in xfs_attr3_leaf_figure_balance()
1933 xfs_attr_leaf_newentsize(state->args, NULL); in xfs_attr3_leaf_figure_balance()
1958 struct xfs_da_state *state, in xfs_attr3_leaf_toosmall() argument
1972 trace_xfs_attr_leaf_toosmall(state->args); in xfs_attr3_leaf_toosmall()
1979 blk = &state->path.blk[ state->path.active-1 ]; in xfs_attr3_leaf_toosmall()
1981 xfs_attr3_leaf_hdr_from_disk(state->args->geo, &ichdr, leaf); in xfs_attr3_leaf_toosmall()
1985 if (bytes > (state->args->geo->blksize >> 1)) { in xfs_attr3_leaf_toosmall()
2002 memcpy(&state->altpath, &state->path, sizeof(state->path)); in xfs_attr3_leaf_toosmall()
2003 error = xfs_da3_path_shift(state, &state->altpath, forward, in xfs_attr3_leaf_toosmall()
2032 error = xfs_attr3_leaf_read(state->args->trans, state->args->dp, in xfs_attr3_leaf_toosmall()
2037 xfs_attr3_leaf_hdr_from_disk(state->args->geo, &ichdr2, bp->b_addr); in xfs_attr3_leaf_toosmall()
2039 bytes = state->args->geo->blksize - in xfs_attr3_leaf_toosmall()
2040 (state->args->geo->blksize >> 2) - in xfs_attr3_leaf_toosmall()
2046 xfs_trans_brelse(state->args->trans, bp); in xfs_attr3_leaf_toosmall()
2059 memcpy(&state->altpath, &state->path, sizeof(state->path)); in xfs_attr3_leaf_toosmall()
2061 error = xfs_da3_path_shift(state, &state->altpath, forward, in xfs_attr3_leaf_toosmall()
2064 error = xfs_da3_path_shift(state, &state->path, forward, in xfs_attr3_leaf_toosmall()
2239 struct xfs_da_state *state, in xfs_attr3_leaf_unbalance() argument
2249 trace_xfs_attr_leaf_unbalance(state->args); in xfs_attr3_leaf_unbalance()
2253 xfs_attr3_leaf_hdr_from_disk(state->args->geo, &drophdr, drop_leaf); in xfs_attr3_leaf_unbalance()
2254 xfs_attr3_leaf_hdr_from_disk(state->args->geo, &savehdr, save_leaf); in xfs_attr3_leaf_unbalance()
2274 xfs_attr3_leaf_moveents(state->args, in xfs_attr3_leaf_unbalance()
2279 xfs_attr3_leaf_moveents(state->args, in xfs_attr3_leaf_unbalance()
2292 tmp_leaf = kmem_zalloc(state->args->geo->blksize, 0); in xfs_attr3_leaf_unbalance()
2305 tmphdr.firstused = state->args->geo->blksize; in xfs_attr3_leaf_unbalance()
2308 xfs_attr3_leaf_hdr_to_disk(state->args->geo, tmp_leaf, &tmphdr); in xfs_attr3_leaf_unbalance()
2312 xfs_attr3_leaf_moveents(state->args, in xfs_attr3_leaf_unbalance()
2316 xfs_attr3_leaf_moveents(state->args, in xfs_attr3_leaf_unbalance()
2321 xfs_attr3_leaf_moveents(state->args, in xfs_attr3_leaf_unbalance()
2325 xfs_attr3_leaf_moveents(state->args, in xfs_attr3_leaf_unbalance()
2330 memcpy(save_leaf, tmp_leaf, state->args->geo->blksize); in xfs_attr3_leaf_unbalance()
2335 xfs_attr3_leaf_hdr_to_disk(state->args->geo, save_leaf, &savehdr); in xfs_attr3_leaf_unbalance()
2336 xfs_trans_log_buf(state->args->trans, save_blk->bp, 0, in xfs_attr3_leaf_unbalance()
2337 state->args->geo->blksize - 1); in xfs_attr3_leaf_unbalance()