Lines Matching refs:blk
105 state->altpath.blk[i].bp = NULL; in xfs_da_state_kill_altpath()
579 ASSERT(state->path.blk[max].magic == XFS_ATTR_LEAF_MAGIC || in xfs_da3_split()
580 state->path.blk[max].magic == XFS_DIR2_LEAFN_MAGIC); in xfs_da3_split()
582 addblk = &state->path.blk[max]; /* initial dummy value */ in xfs_da3_split()
584 oldblk = &state->path.blk[i]; in xfs_da3_split()
585 newblk = &state->altpath.blk[i]; in xfs_da3_split()
661 state->path.blk[max].magic == XFS_DIR2_LEAFN_MAGIC); in xfs_da3_split()
667 oldblk = &state->path.blk[0]; in xfs_da3_split()
1138 drop_blk = &state->path.blk[ state->path.active-1 ]; in xfs_da3_join()
1139 save_blk = &state->altpath.blk[ state->path.active-1 ]; in xfs_da3_join()
1140 ASSERT(state->path.blk[0].magic == XFS_DA_NODE_MAGIC); in xfs_da3_join()
1206 error = xfs_da3_root_join(state, &state->path.blk[0]); in xfs_da3_join()
1312 struct xfs_da_state_blk *blk; in xfs_da3_node_toosmall() local
1332 blk = &state->path.blk[ state->path.active-1 ]; in xfs_da3_node_toosmall()
1333 info = blk->bp->b_addr; in xfs_da3_node_toosmall()
1416 if (blkno < blk->blkno) { in xfs_da3_node_toosmall()
1461 struct xfs_da_state_blk *blk; in xfs_da3_fixhashpath() local
1472 blk = &path->blk[ level ]; in xfs_da3_fixhashpath()
1473 switch (blk->magic) { in xfs_da3_fixhashpath()
1475 lasthash = xfs_attr_leaf_lasthash(blk->bp, &count); in xfs_da3_fixhashpath()
1480 lasthash = xfs_dir2_leaf_lasthash(dp, blk->bp, &count); in xfs_da3_fixhashpath()
1485 lasthash = xfs_da3_node_lasthash(dp, blk->bp, &count); in xfs_da3_fixhashpath()
1490 for (blk--, level--; level >= 0; blk--, level--) { in xfs_da3_fixhashpath()
1493 node = blk->bp->b_addr; in xfs_da3_fixhashpath()
1496 if (be32_to_cpu(btree[blk->index].hashval) == lasthash) in xfs_da3_fixhashpath()
1498 blk->hashval = lasthash; in xfs_da3_fixhashpath()
1499 btree[blk->index].hashval = cpu_to_be32(lasthash); in xfs_da3_fixhashpath()
1500 xfs_trans_log_buf(state->args->trans, blk->bp, in xfs_da3_fixhashpath()
1501 XFS_DA_LOGRANGE(node, &btree[blk->index], in xfs_da3_fixhashpath()
1650 struct xfs_da_state_blk *blk; in xfs_da3_node_lookup_int() local
1676 for (blk = &state->path.blk[0], state->path.active = 1; in xfs_da3_node_lookup_int()
1678 blk++, state->path.active++) { in xfs_da3_node_lookup_int()
1682 blk->blkno = blkno; in xfs_da3_node_lookup_int()
1684 &blk->bp, args->whichfork); in xfs_da3_node_lookup_int()
1686 blk->blkno = 0; in xfs_da3_node_lookup_int()
1690 curr = blk->bp->b_addr; in xfs_da3_node_lookup_int()
1695 fa = xfs_attr3_leaf_header_check(blk->bp, args->owner); in xfs_da3_node_lookup_int()
1697 __xfs_buf_mark_corrupt(blk->bp, fa); in xfs_da3_node_lookup_int()
1701 blk->magic = XFS_ATTR_LEAF_MAGIC; in xfs_da3_node_lookup_int()
1702 blk->hashval = xfs_attr_leaf_lasthash(blk->bp, NULL); in xfs_da3_node_lookup_int()
1708 fa = xfs_dir3_leaf_header_check(blk->bp, args->owner); in xfs_da3_node_lookup_int()
1710 __xfs_buf_mark_corrupt(blk->bp, fa); in xfs_da3_node_lookup_int()
1714 blk->magic = XFS_DIR2_LEAFN_MAGIC; in xfs_da3_node_lookup_int()
1715 blk->hashval = xfs_dir2_leaf_lasthash(args->dp, in xfs_da3_node_lookup_int()
1716 blk->bp, NULL); in xfs_da3_node_lookup_int()
1721 xfs_buf_mark_corrupt(blk->bp); in xfs_da3_node_lookup_int()
1726 fa = xfs_da3_node_header_check(blk->bp, args->owner); in xfs_da3_node_lookup_int()
1728 __xfs_buf_mark_corrupt(blk->bp, fa); in xfs_da3_node_lookup_int()
1733 blk->magic = XFS_DA_NODE_MAGIC; in xfs_da3_node_lookup_int()
1738 node = blk->bp->b_addr; in xfs_da3_node_lookup_int()
1744 xfs_buf_mark_corrupt(blk->bp); in xfs_da3_node_lookup_int()
1753 xfs_buf_mark_corrupt(blk->bp); in xfs_da3_node_lookup_int()
1760 blk->hashval = be32_to_cpu(btree[max - 1].hashval); in xfs_da3_node_lookup_int()
1798 blk->index = max - 1; in xfs_da3_node_lookup_int()
1801 blk->index = probe; in xfs_da3_node_lookup_int()
1824 if (blk->magic == XFS_DIR2_LEAFN_MAGIC) { in xfs_da3_node_lookup_int()
1825 retval = xfs_dir2_leafn_lookup_int(blk->bp, args, in xfs_da3_node_lookup_int()
1826 &blk->index, state); in xfs_da3_node_lookup_int()
1827 } else if (blk->magic == XFS_ATTR_LEAF_MAGIC) { in xfs_da3_node_lookup_int()
1828 retval = xfs_attr3_leaf_lookup_int(blk->bp, args); in xfs_da3_node_lookup_int()
1829 blk->index = args->index; in xfs_da3_node_lookup_int()
1830 args->blkno = blk->blkno; in xfs_da3_node_lookup_int()
1837 (blk->hashval == args->hashval)) { in xfs_da3_node_lookup_int()
1844 } else if (blk->magic == XFS_ATTR_LEAF_MAGIC) { in xfs_da3_node_lookup_int()
2105 struct xfs_da_state_blk *blk; in xfs_da3_path_shift() local
2130 blk = &path->blk[level]; in xfs_da3_path_shift()
2132 blk->bp->b_addr); in xfs_da3_path_shift()
2134 if (forward && (blk->index < nodehdr.count - 1)) { in xfs_da3_path_shift()
2135 blk->index++; in xfs_da3_path_shift()
2136 blkno = be32_to_cpu(nodehdr.btree[blk->index].before); in xfs_da3_path_shift()
2138 } else if (!forward && (blk->index > 0)) { in xfs_da3_path_shift()
2139 blk->index--; in xfs_da3_path_shift()
2140 blkno = be32_to_cpu(nodehdr.btree[blk->index].before); in xfs_da3_path_shift()
2154 for (blk++, level++; level < path->active; blk++, level++) { in xfs_da3_path_shift()
2170 xfs_trans_brelse(args->trans, blk->bp); in xfs_da3_path_shift()
2171 blk->blkno = blkno; in xfs_da3_path_shift()
2172 blk->bp = bp; in xfs_da3_path_shift()
2174 info = blk->bp->b_addr; in xfs_da3_path_shift()
2190 fa = xfs_da3_node_header_check(blk->bp, args->owner); in xfs_da3_path_shift()
2192 __xfs_buf_mark_corrupt(blk->bp, fa); in xfs_da3_path_shift()
2196 blk->magic = XFS_DA_NODE_MAGIC; in xfs_da3_path_shift()
2200 blk->hashval = be32_to_cpu(btree[nodehdr.count - 1].hashval); in xfs_da3_path_shift()
2202 blk->index = 0; in xfs_da3_path_shift()
2204 blk->index = nodehdr.count - 1; in xfs_da3_path_shift()
2205 blkno = be32_to_cpu(btree[blk->index].before); in xfs_da3_path_shift()
2209 fa = xfs_attr3_leaf_header_check(blk->bp, args->owner); in xfs_da3_path_shift()
2211 __xfs_buf_mark_corrupt(blk->bp, fa); in xfs_da3_path_shift()
2215 blk->magic = XFS_ATTR_LEAF_MAGIC; in xfs_da3_path_shift()
2217 blk->index = 0; in xfs_da3_path_shift()
2218 blk->hashval = xfs_attr_leaf_lasthash(blk->bp, NULL); in xfs_da3_path_shift()
2222 fa = xfs_dir3_leaf_header_check(blk->bp, args->owner); in xfs_da3_path_shift()
2224 __xfs_buf_mark_corrupt(blk->bp, fa); in xfs_da3_path_shift()
2228 blk->magic = XFS_DIR2_LEAFN_MAGIC; in xfs_da3_path_shift()
2230 blk->index = 0; in xfs_da3_path_shift()
2231 blk->hashval = xfs_dir2_leaf_lasthash(args->dp, in xfs_da3_path_shift()
2232 blk->bp, NULL); in xfs_da3_path_shift()