• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/hfsplus_journal/

Lines Matching refs:tree

85 	struct hfs_btree *tree;
88 tree = node->tree;
90 tree->attributes & HFS_TREE_VARIDXKEYS ||
91 node->tree->cnid == HFSPLUS_ATTR_CNID)
94 key_len = tree->max_key_len + 2;
158 struct hfs_btree *tree;
165 tree = src_node->tree;
336 off = node->tree->node_size - 2;
343 if (node->tree->attributes & HFS_TREE_VARIDXKEYS)
346 tmp = node->tree->max_key_len + 2;
362 struct hfs_btree *tree;
366 tree = node->tree;
368 tmp = hfs_bnode_find(hfsplus_handle, tree, node->prev);
376 tree->leaf_head = node->next;
379 tmp = hfs_bnode_find(hfsplus_handle, tree, node->next);
387 tree->leaf_tail = node->prev;
394 tree->root = 0;
395 tree->depth = 0;
407 struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid)
411 if (cnid >= tree->node_count) {
416 for (node = tree->node_hash[hfs_bnode_hash(cnid)];
425 static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
434 if (cnid >= tree->node_count) {
439 sb = tree->inode->i_sb;
440 size = sizeof(struct hfs_bnode) + tree->pages_per_bnode *
445 node->tree = tree;
450 node->tree->cnid, node->this);
452 spin_lock(&tree->hash_lock);
453 node2 = hfs_bnode_findhash(tree, cnid);
456 node->next_hash = tree->node_hash[hash];
457 tree->node_hash[hash] = node;
458 tree->node_hash_cnt++;
460 spin_unlock(&tree->hash_lock);
465 spin_unlock(&tree->hash_lock);
467 mapping = tree->inode->i_mapping;
468 off = (loff_t)cnid << tree->node_size_shift;
471 for (i = 0; i < tree->pages_per_bnode; block++, i++) {
494 node->tree->cnid, node->this, atomic_read(&node->refcnt));
495 for (p = &node->tree->node_hash[hfs_bnode_hash(node->this)];
500 node->tree->node_hash_cnt--;
503 /* Load a particular node out of a tree */
504 struct hfs_bnode *hfs_bnode_find(hfsplus_handle_t *hfsplus_handle, struct hfs_btree *tree, u32 num)
511 spin_lock(&tree->hash_lock);
512 node = hfs_bnode_findhash(tree, num);
515 spin_unlock(&tree->hash_lock);
521 spin_unlock(&tree->hash_lock);
522 node = __hfs_bnode_create(tree, num);
549 if (node->height <= 1 || node->height > tree->depth)
556 rec_off = tree->node_size - 2;
564 next_off > tree->node_size ||
591 //for (i = 0; i < node->tree->pages_per_bnode; i++)
597 struct hfs_bnode *hfs_bnode_create(hfsplus_handle_t *hfsplus_handle, struct hfs_btree *tree, u32 num)
603 spin_lock(&tree->hash_lock);
604 node = hfs_bnode_findhash(tree, num);
605 spin_unlock(&tree->hash_lock);
611 node = __hfs_bnode_create(tree, num);
621 min((int)PAGE_CACHE_SIZE, (int)tree->node_size));
624 for (i = 1; i < tree->pages_per_bnode; i++) {
640 node->tree->cnid, node->this, atomic_read(&node->refcnt));
648 struct hfs_btree *tree = node->tree;
652 node->tree->cnid, node->this, atomic_read(&node->refcnt));
654 if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock))
656 for (i = 0; i < tree->pages_per_bnode; i++) {
664 spin_unlock(&tree->hash_lock);
669 spin_unlock(&tree->hash_lock);