Lines Matching refs:be16_to_cpu
328 if (be16_to_cpu(oldroot->hdr.info.magic) == XFS_DA_NODE_MAGIC) {
329 size = (int)((char *)&oldroot->btree[be16_to_cpu(oldroot->hdr.count)] -
332 ASSERT(be16_to_cpu(oldroot->hdr.info.magic) == XFS_DIR2_LEAFN_MAGIC);
334 size = (int)((char *)&leaf->ents[be16_to_cpu(leaf->hdr.count)] -
348 be16_to_cpu(node->hdr.level) + 1, &bp, args->whichfork);
359 if (be16_to_cpu(oldroot->hdr.info.magic) == XFS_DIR2_LEAFN_MAGIC) {
391 ASSERT(be16_to_cpu(node->hdr.info.magic) == XFS_DA_NODE_MAGIC);
401 if ((be16_to_cpu(node->hdr.count) + newcount) > state->node_ents) {
438 if (oldblk->index <= be16_to_cpu(node->hdr.count)) {
482 if ((be16_to_cpu(node1->hdr.count) > 0) && (be16_to_cpu(node2->hdr.count) > 0) &&
484 (be32_to_cpu(node2->btree[be16_to_cpu(node2->hdr.count)-1].hashval) <
485 be32_to_cpu(node1->btree[be16_to_cpu(node1->hdr.count)-1].hashval)))) {
490 ASSERT(be16_to_cpu(node1->hdr.info.magic) == XFS_DA_NODE_MAGIC);
491 ASSERT(be16_to_cpu(node2->hdr.info.magic) == XFS_DA_NODE_MAGIC);
492 count = (be16_to_cpu(node1->hdr.count) - be16_to_cpu(node2->hdr.count)) / 2;
503 if ((tmp = be16_to_cpu(node2->hdr.count)) > 0) {
516 btree_s = &node1->btree[be16_to_cpu(node1->hdr.count) - count];
528 btree_d = &node1->btree[be16_to_cpu(node1->hdr.count)];
537 tmp = be16_to_cpu(node2->hdr.count) - count;
553 sizeof(node2->btree[0]) * be16_to_cpu(node2->hdr.count)));
561 blk1->hashval = be32_to_cpu(node1->btree[be16_to_cpu(node1->hdr.count)-1].hashval);
562 blk2->hashval = be32_to_cpu(node2->btree[be16_to_cpu(node2->hdr.count)-1].hashval);
567 if (blk1->index >= be16_to_cpu(node1->hdr.count)) {
568 blk2->index = blk1->index - be16_to_cpu(node1->hdr.count);
569 blk1->index = be16_to_cpu(node1->hdr.count) + 1; /* make it invalid */
587 ASSERT(be16_to_cpu(node->hdr.info.magic) == XFS_DA_NODE_MAGIC);
588 ASSERT((oldblk->index >= 0) && (oldblk->index <= be16_to_cpu(node->hdr.count)));
599 if (oldblk->index < be16_to_cpu(node->hdr.count)) {
600 tmp = (be16_to_cpu(node->hdr.count) - oldblk->index) * (uint)sizeof(*btree);
614 oldblk->hashval = be32_to_cpu(node->btree[be16_to_cpu(node->hdr.count)-1 ].hashval);
723 ASSERT(be16_to_cpu(oldroot->hdr.info.magic) == XFS_DA_NODE_MAGIC);
730 if (be16_to_cpu(oldroot->hdr.count) > 1)
745 if (be16_to_cpu(oldroot->hdr.level) == 1) {
746 ASSERT(be16_to_cpu(blkinfo->magic) == XFS_DIR2_LEAFN_MAGIC ||
747 be16_to_cpu(blkinfo->magic) == XFS_ATTR_LEAF_MAGIC);
749 ASSERT(be16_to_cpu(blkinfo->magic) == XFS_DA_NODE_MAGIC);
785 ASSERT(be16_to_cpu(info->magic) == XFS_DA_NODE_MAGIC);
787 count = be16_to_cpu(node->hdr.count);
843 count -= be16_to_cpu(node->hdr.count);
845 ASSERT(be16_to_cpu(node->hdr.info.magic) == XFS_DA_NODE_MAGIC);
846 count -= be16_to_cpu(node->hdr.count);
920 ASSERT(be16_to_cpu(node->hdr.info.magic) == XFS_DA_NODE_MAGIC);
929 lasthash = be32_to_cpu(node->btree[be16_to_cpu(node->hdr.count)-1].hashval);
944 ASSERT(drop_blk->index < be16_to_cpu(node->hdr.count));
951 if (drop_blk->index < (be16_to_cpu(node->hdr.count)-1)) {
952 tmp = be16_to_cpu(node->hdr.count) - drop_blk->index - 1;
957 btree = &node->btree[be16_to_cpu(node->hdr.count)-1];
988 ASSERT(be16_to_cpu(drop_node->hdr.info.magic) == XFS_DA_NODE_MAGIC);
989 ASSERT(be16_to_cpu(save_node->hdr.info.magic) == XFS_DA_NODE_MAGIC);
997 (be32_to_cpu(drop_node->btree[be16_to_cpu(drop_node->hdr.count)-1].hashval) <
998 be32_to_cpu(save_node->btree[be16_to_cpu(save_node->hdr.count)-1].hashval)))
1000 btree = &save_node->btree[be16_to_cpu(drop_node->hdr.count)];
1001 tmp = be16_to_cpu(save_node->hdr.count) * (uint)sizeof(xfs_da_node_entry_t);
1006 (be16_to_cpu(save_node->hdr.count) + be16_to_cpu(drop_node->hdr.count)) *
1009 btree = &save_node->btree[be16_to_cpu(save_node->hdr.count)];
1012 be16_to_cpu(drop_node->hdr.count) *
1019 tmp = be16_to_cpu(drop_node->hdr.count) * (uint)sizeof(xfs_da_node_entry_t);
1021 be16_add(&save_node->hdr.count, be16_to_cpu(drop_node->hdr.count));
1030 save_blk->hashval = be32_to_cpu(save_node->btree[be16_to_cpu(save_node->hdr.count)-1].hashval);
1082 blk->magic = be16_to_cpu(curr->magic);
1092 max = be16_to_cpu(node->hdr.count);
1209 ASSERT(old_blk->magic == be16_to_cpu(old_info->magic));
1210 ASSERT(new_blk->magic == be16_to_cpu(new_info->magic));
1242 ASSERT(be16_to_cpu(tmp_info->magic) == be16_to_cpu(old_info->magic));
1287 ASSERT((be16_to_cpu(node1->hdr.info.magic) == XFS_DA_NODE_MAGIC) &&
1288 (be16_to_cpu(node2->hdr.info.magic) == XFS_DA_NODE_MAGIC));
1289 if ((be16_to_cpu(node1->hdr.count) > 0) && (be16_to_cpu(node2->hdr.count) > 0) &&
1292 (be32_to_cpu(node2->btree[be16_to_cpu(node2->hdr.count)-1].hashval) <
1293 be32_to_cpu(node1->btree[be16_to_cpu(node1->hdr.count)-1].hashval)))) {
1308 ASSERT(be16_to_cpu(node->hdr.info.magic) == XFS_DA_NODE_MAGIC);
1310 *count = be16_to_cpu(node->hdr.count);
1313 return be32_to_cpu(node->btree[be16_to_cpu(node->hdr.count)-1].hashval);
1338 ASSERT(save_blk->magic == be16_to_cpu(save_info->magic));
1339 ASSERT(drop_blk->magic == be16_to_cpu(drop_info->magic));
1421 ASSERT(be16_to_cpu(node->hdr.info.magic) == XFS_DA_NODE_MAGIC);
1422 if (forward && (blk->index < be16_to_cpu(node->hdr.count)-1)) {
1460 ASSERT(be16_to_cpu(info->magic) == XFS_DA_NODE_MAGIC ||
1461 be16_to_cpu(info->magic) == XFS_DIR2_LEAFN_MAGIC ||
1462 be16_to_cpu(info->magic) == XFS_ATTR_LEAF_MAGIC);
1463 blk->magic = be16_to_cpu(info->magic);
1466 blk->hashval = be32_to_cpu(node->btree[be16_to_cpu(node->hdr.count)-1].hashval);
1470 blk->index = be16_to_cpu(node->hdr.count)-1;
1687 if (be16_to_cpu(dead_info->magic) == XFS_DIR2_LEAFN_MAGIC) {
1690 dead_hash = be32_to_cpu(dead_leaf2->ents[be16_to_cpu(dead_leaf2->hdr.count) - 1].hashval);
1692 ASSERT(be16_to_cpu(dead_info->magic) == XFS_DA_NODE_MAGIC);
1694 dead_level = be16_to_cpu(dead_node->hdr.level);
1695 dead_hash = be32_to_cpu(dead_node->btree[be16_to_cpu(dead_node->hdr.count) - 1].hashval);
1752 be16_to_cpu(par_node->hdr.info.magic) != XFS_DA_NODE_MAGIC ||
1753 (level >= 0 && level != be16_to_cpu(par_node->hdr.level) + 1))) {
1759 level = be16_to_cpu(par_node->hdr.level);
1761 entno < be16_to_cpu(par_node->hdr.count) &&
1765 if (unlikely(entno == be16_to_cpu(par_node->hdr.count))) {
1783 entno < be16_to_cpu(par_node->hdr.count) &&
1787 if (entno < be16_to_cpu(par_node->hdr.count))
1802 be16_to_cpu(par_node->hdr.level) != level ||
1803 be16_to_cpu(par_node->hdr.info.magic) != XFS_DA_NODE_MAGIC)) {
2072 magic = be16_to_cpu(info->magic);