Lines Matching full:blk
103 state->altpath.blk[i].bp = NULL; in xfs_da_state_kill_altpath()
508 ASSERT(state->path.blk[max].magic == XFS_ATTR_LEAF_MAGIC || in xfs_da3_split()
509 state->path.blk[max].magic == XFS_DIR2_LEAFN_MAGIC); in xfs_da3_split()
511 addblk = &state->path.blk[max]; /* initial dummy value */ in xfs_da3_split()
513 oldblk = &state->path.blk[i]; in xfs_da3_split()
514 newblk = &state->altpath.blk[i]; in xfs_da3_split()
589 state->path.blk[max].magic == XFS_DIR2_LEAFN_MAGIC); in xfs_da3_split()
595 oldblk = &state->path.blk[0]; in xfs_da3_split()
1084 drop_blk = &state->path.blk[ state->path.active-1 ]; in xfs_da3_join()
1085 save_blk = &state->altpath.blk[ state->path.active-1 ]; in xfs_da3_join()
1086 ASSERT(state->path.blk[0].magic == XFS_DA_NODE_MAGIC); in xfs_da3_join()
1152 error = xfs_da3_root_join(state, &state->path.blk[0]); in xfs_da3_join()
1257 struct xfs_da_state_blk *blk; in xfs_da3_node_toosmall() local
1276 blk = &state->path.blk[ state->path.active-1 ]; in xfs_da3_node_toosmall()
1277 info = blk->bp->b_addr; in xfs_da3_node_toosmall()
1281 *action = 0; /* blk over 50%, don't try to join */ in xfs_da3_node_toosmall()
1282 return 0; /* blk over 50%, don't try to join */ in xfs_da3_node_toosmall()
1321 /* start with smaller blk num */ in xfs_da3_node_toosmall()
1353 if (blkno < blk->blkno) { in xfs_da3_node_toosmall()
1398 struct xfs_da_state_blk *blk; in xfs_da3_fixhashpath() local
1409 blk = &path->blk[ level ]; in xfs_da3_fixhashpath()
1410 switch (blk->magic) { in xfs_da3_fixhashpath()
1412 lasthash = xfs_attr_leaf_lasthash(blk->bp, &count); in xfs_da3_fixhashpath()
1417 lasthash = xfs_dir2_leaf_lasthash(dp, blk->bp, &count); in xfs_da3_fixhashpath()
1422 lasthash = xfs_da3_node_lasthash(dp, blk->bp, &count); in xfs_da3_fixhashpath()
1427 for (blk--, level--; level >= 0; blk--, level--) { in xfs_da3_fixhashpath()
1430 node = blk->bp->b_addr; in xfs_da3_fixhashpath()
1433 if (be32_to_cpu(btree[blk->index].hashval) == lasthash) in xfs_da3_fixhashpath()
1435 blk->hashval = lasthash; in xfs_da3_fixhashpath()
1436 btree[blk->index].hashval = cpu_to_be32(lasthash); in xfs_da3_fixhashpath()
1437 xfs_trans_log_buf(state->args->trans, blk->bp, in xfs_da3_fixhashpath()
1438 XFS_DA_LOGRANGE(node, &btree[blk->index], in xfs_da3_fixhashpath()
1587 struct xfs_da_state_blk *blk; in xfs_da3_node_lookup_int() local
1612 for (blk = &state->path.blk[0], state->path.active = 1; in xfs_da3_node_lookup_int()
1614 blk++, state->path.active++) { in xfs_da3_node_lookup_int()
1618 blk->blkno = blkno; in xfs_da3_node_lookup_int()
1620 &blk->bp, args->whichfork); in xfs_da3_node_lookup_int()
1622 blk->blkno = 0; in xfs_da3_node_lookup_int()
1626 curr = blk->bp->b_addr; in xfs_da3_node_lookup_int()
1631 blk->magic = XFS_ATTR_LEAF_MAGIC; in xfs_da3_node_lookup_int()
1632 blk->hashval = xfs_attr_leaf_lasthash(blk->bp, NULL); in xfs_da3_node_lookup_int()
1638 blk->magic = XFS_DIR2_LEAFN_MAGIC; in xfs_da3_node_lookup_int()
1639 blk->hashval = xfs_dir2_leaf_lasthash(args->dp, in xfs_da3_node_lookup_int()
1640 blk->bp, NULL); in xfs_da3_node_lookup_int()
1645 xfs_buf_mark_corrupt(blk->bp); in xfs_da3_node_lookup_int()
1649 blk->magic = XFS_DA_NODE_MAGIC; in xfs_da3_node_lookup_int()
1654 node = blk->bp->b_addr; in xfs_da3_node_lookup_int()
1660 xfs_buf_mark_corrupt(blk->bp); in xfs_da3_node_lookup_int()
1668 xfs_buf_mark_corrupt(blk->bp); in xfs_da3_node_lookup_int()
1674 blk->hashval = be32_to_cpu(btree[max - 1].hashval); in xfs_da3_node_lookup_int()
1712 blk->index = max - 1; in xfs_da3_node_lookup_int()
1715 blk->index = probe; in xfs_da3_node_lookup_int()
1734 if (blk->magic == XFS_DIR2_LEAFN_MAGIC) { in xfs_da3_node_lookup_int()
1735 retval = xfs_dir2_leafn_lookup_int(blk->bp, args, in xfs_da3_node_lookup_int()
1736 &blk->index, state); in xfs_da3_node_lookup_int()
1737 } else if (blk->magic == XFS_ATTR_LEAF_MAGIC) { in xfs_da3_node_lookup_int()
1738 retval = xfs_attr3_leaf_lookup_int(blk->bp, args); in xfs_da3_node_lookup_int()
1739 blk->index = args->index; in xfs_da3_node_lookup_int()
1740 args->blkno = blk->blkno; in xfs_da3_node_lookup_int()
1746 (blk->hashval == args->hashval)) { in xfs_da3_node_lookup_int()
1753 } else if (blk->magic == XFS_ATTR_LEAF_MAGIC) { in xfs_da3_node_lookup_int()
1984 struct xfs_da_state_blk *blk; in xfs_da3_path_shift() local
2008 blk = &path->blk[level]; in xfs_da3_path_shift()
2010 blk->bp->b_addr); in xfs_da3_path_shift()
2012 if (forward && (blk->index < nodehdr.count - 1)) { in xfs_da3_path_shift()
2013 blk->index++; in xfs_da3_path_shift()
2014 blkno = be32_to_cpu(nodehdr.btree[blk->index].before); in xfs_da3_path_shift()
2016 } else if (!forward && (blk->index > 0)) { in xfs_da3_path_shift()
2017 blk->index--; in xfs_da3_path_shift()
2018 blkno = be32_to_cpu(nodehdr.btree[blk->index].before); in xfs_da3_path_shift()
2032 for (blk++, level++; level < path->active; blk++, level++) { in xfs_da3_path_shift()
2048 xfs_trans_brelse(args->trans, blk->bp); in xfs_da3_path_shift()
2049 blk->blkno = blkno; in xfs_da3_path_shift()
2050 blk->bp = bp; in xfs_da3_path_shift()
2052 info = blk->bp->b_addr; in xfs_da3_path_shift()
2068 blk->magic = XFS_DA_NODE_MAGIC; in xfs_da3_path_shift()
2072 blk->hashval = be32_to_cpu(btree[nodehdr.count - 1].hashval); in xfs_da3_path_shift()
2074 blk->index = 0; in xfs_da3_path_shift()
2076 blk->index = nodehdr.count - 1; in xfs_da3_path_shift()
2077 blkno = be32_to_cpu(btree[blk->index].before); in xfs_da3_path_shift()
2081 blk->magic = XFS_ATTR_LEAF_MAGIC; in xfs_da3_path_shift()
2083 blk->index = 0; in xfs_da3_path_shift()
2084 blk->hashval = xfs_attr_leaf_lasthash(blk->bp, NULL); in xfs_da3_path_shift()
2088 blk->magic = XFS_DIR2_LEAFN_MAGIC; in xfs_da3_path_shift()
2090 blk->index = 0; in xfs_da3_path_shift()
2091 blk->hashval = xfs_dir2_leaf_lasthash(args->dp, in xfs_da3_path_shift()
2092 blk->bp, NULL); in xfs_da3_path_shift()