• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/fs/xfs/

Lines Matching defs:btree

223 		 * Update the btree to show the new hashval for this child.
329 size = (int)((char *)&oldroot->btree[be16_to_cpu(oldroot->hdr.count)] -
352 node->btree[0].hashval = cpu_to_be32(blk1->hashval);
353 node->btree[0].before = cpu_to_be32(blk1->blkno);
354 node->btree[1].hashval = cpu_to_be32(blk2->hashval);
355 node->btree[1].before = cpu_to_be32(blk2->blkno);
369 XFS_DA_LOGRANGE(node, node->btree,
462 * Balance the btree elements between two intermediate nodes,
483 ((be32_to_cpu(node2->btree[0].hashval) < be32_to_cpu(node1->btree[0].hashval)) ||
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)))) {
505 btree_s = &node2->btree[0];
506 btree_d = &node2->btree[count];
516 btree_s = &node1->btree[be16_to_cpu(node1->hdr.count) - count];
517 btree_d = &node2->btree[0];
527 btree_s = &node2->btree[0];
528 btree_d = &node1->btree[be16_to_cpu(node1->hdr.count)];
539 btree_s = &node2->btree[count];
540 btree_d = &node2->btree[0];
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);
581 xfs_da_node_entry_t *btree;
598 btree = &node->btree[ oldblk->index ];
600 tmp = (be16_to_cpu(node->hdr.count) - oldblk->index) * (uint)sizeof(*btree);
601 memmove(btree + 1, btree, tmp);
603 btree->hashval = cpu_to_be32(newblk->hashval);
604 btree->before = cpu_to_be32(newblk->blkno);
606 XFS_DA_LOGRANGE(node, btree, tmp + sizeof(*btree)));
614 oldblk->hashval = be32_to_cpu(node->btree[be16_to_cpu(node->hdr.count)-1 ].hashval);
737 child = be32_to_cpu(oldroot->btree[0].before);
895 xfs_da_node_entry_t *btree;
921 btree = &node->btree[ blk->index ];
922 if (be32_to_cpu(btree->hashval) == lasthash)
925 btree->hashval = cpu_to_be32(lasthash);
927 XFS_DA_LOGRANGE(node, btree, sizeof(*btree)));
929 lasthash = be32_to_cpu(node->btree[be16_to_cpu(node->hdr.count)-1].hashval);
940 xfs_da_node_entry_t *btree;
950 btree = &node->btree[drop_blk->index];
954 memmove(btree, btree + 1, tmp);
956 XFS_DA_LOGRANGE(node, btree, tmp));
957 btree = &node->btree[be16_to_cpu(node->hdr.count)-1];
959 memset((char *)btree, 0, sizeof(xfs_da_node_entry_t));
961 XFS_DA_LOGRANGE(node, btree, sizeof(*btree)));
969 btree--;
970 drop_blk->hashval = be32_to_cpu(btree->hashval);
974 * Unbalance the btree elements between two intermediate nodes,
982 xfs_da_node_entry_t *btree;
996 if ((be32_to_cpu(drop_node->btree[0].hashval) < be32_to_cpu(save_node->btree[ 0 ].hashval)) ||
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)];
1002 memmove(btree, &save_node->btree[0], tmp);
1003 btree = &save_node->btree[0];
1005 XFS_DA_LOGRANGE(save_node, btree,
1009 btree = &save_node->btree[be16_to_cpu(save_node->hdr.count)];
1011 XFS_DA_LOGRANGE(save_node, btree,
1020 memcpy(btree, &drop_node->btree[0], tmp);
1030 save_blk->hashval = be32_to_cpu(save_node->btree[be16_to_cpu(save_node->hdr.count)-1].hashval);
1054 xfs_da_node_entry_t *btree;
1093 blk->hashval = be32_to_cpu(node->btree[max-1].hashval);
1100 for (btree = &node->btree[probe]; span > 4;
1101 btree = &node->btree[probe]) {
1103 btreehashval = be32_to_cpu(btree->hashval);
1112 ASSERT((span <= 4) || (be32_to_cpu(btree->hashval) == hashval));
1118 while ((probe > 0) && (be32_to_cpu(btree->hashval) >= hashval)) {
1119 btree--;
1122 while ((probe < max) && (be32_to_cpu(btree->hashval) < hashval)) {
1123 btree++;
1132 blkno = be32_to_cpu(node->btree[max-1].before);
1135 blkno = be32_to_cpu(btree->before);
1290 ((be32_to_cpu(node2->btree[0].hashval) <
1291 be32_to_cpu(node1->btree[0].hashval)) ||
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)))) {
1313 return be32_to_cpu(node->btree[be16_to_cpu(node->hdr.count)-1].hashval);
1424 blkno = be32_to_cpu(node->btree[blk->index].before);
1428 blkno = be32_to_cpu(node->btree[blk->index].before);
1466 blk->hashval = be32_to_cpu(node->btree[be16_to_cpu(node->hdr.count)-1].hashval);
1471 blkno = be32_to_cpu(node->btree[blk->index].before);
1534 * Add a block to the btree ahead of the file.
1633 * Ick. We need to always be able to remove a btree block, even
1635 * This is called if xfs_bunmapi on a btree block fails due to ENOSPC.
1638 * a bmap btree split to do that.
1673 * Read the last block in the btree space.
1695 dead_hash = be32_to_cpu(dead_node->btree[be16_to_cpu(dead_node->hdr.count) - 1].hashval);
1762 be32_to_cpu(par_node->btree[entno].hashval) < dead_hash;
1771 par_blkno = be32_to_cpu(par_node->btree[entno].before);
1784 be32_to_cpu(par_node->btree[entno].before) != last_blkno;
1814 par_node->btree[entno].before = cpu_to_be32(dead_blkno);
1816 XFS_DA_LOGRANGE(par_node, &par_node->btree[entno].before,
1817 sizeof(par_node->btree[entno].before)));
1833 * Remove a btree block from a directory or attribute.
1875 * See if the mapping(s) for this btree block are valid, i.e.