• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/hfsplus_journal/

Lines Matching refs:tree

60 	struct hfs_btree *tree;
63 tree = node->tree;
65 tree->attributes & HFS_TREE_VARIDXKEYS)
68 key_len = tree->max_key_len + 2;
128 struct hfs_btree *tree;
135 tree = src_node->tree;
306 off = node->tree->node_size - 2;
313 if (node->tree->attributes & HFS_TREE_VARIDXKEYS)
316 tmp = node->tree->max_key_len + 2;
332 struct hfs_btree *tree;
336 tree = node->tree;
338 tmp = hfs_bnode_find(hfsplus_handle, tree, node->prev);
346 tree->leaf_head = node->next;
349 tmp = hfs_bnode_find(hfsplus_handle, tree, node->next);
357 tree->leaf_tail = node->prev;
364 tree->root = 0;
365 tree->depth = 0;
377 struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid)
381 if (cnid >= tree->node_count) {
386 for (node = tree->node_hash[hfs_bnode_hash(cnid)];
395 static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
404 if (cnid >= tree->node_count) {
409 sb = tree->inode->i_sb;
410 size = sizeof(struct hfs_bnode) + tree->pages_per_bnode *
415 node->tree = tree;
420 node->tree->cnid, node->this);
422 spin_lock(&tree->hash_lock);
423 node2 = hfs_bnode_findhash(tree, cnid);
426 node->next_hash = tree->node_hash[hash];
427 tree->node_hash[hash] = node;
428 tree->node_hash_cnt++;
430 spin_unlock(&tree->hash_lock);
435 spin_unlock(&tree->hash_lock);
437 mapping = tree->inode->i_mapping;
438 off = (loff_t)cnid << tree->node_size_shift;
441 for (i = 0; i < tree->pages_per_bnode; block++, i++) {
464 node->tree->cnid, node->this, atomic_read(&node->refcnt));
465 for (p = &node->tree->node_hash[hfs_bnode_hash(node->this)];
470 node->tree->node_hash_cnt--;
473 /* Load a particular node out of a tree */
474 struct hfs_bnode *hfs_bnode_find(hfsplus_handle_t *hfsplus_handle, struct hfs_btree *tree, u32 num)
481 spin_lock(&tree->hash_lock);
482 node = hfs_bnode_findhash(tree, num);
485 spin_unlock(&tree->hash_lock);
491 spin_unlock(&tree->hash_lock);
492 node = __hfs_bnode_create(tree, num);
519 if (node->height <= 1 || node->height > tree->depth)
526 rec_off = tree->node_size - 2;
534 next_off > tree->node_size ||
561 //for (i = 0; i < node->tree->pages_per_bnode; i++)
567 struct hfs_bnode *hfs_bnode_create(hfsplus_handle_t *hfsplus_handle, struct hfs_btree *tree, u32 num)
573 spin_lock(&tree->hash_lock);
574 node = hfs_bnode_findhash(tree, num);
575 spin_unlock(&tree->hash_lock);
581 node = __hfs_bnode_create(tree, num);
591 min((int)PAGE_CACHE_SIZE, (int)tree->node_size));
594 for (i = 1; i < tree->pages_per_bnode; i++) {
610 node->tree->cnid, node->this, atomic_read(&node->refcnt));
618 struct hfs_btree *tree = node->tree;
622 node->tree->cnid, node->this, atomic_read(&node->refcnt));
624 if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock))
626 for (i = 0; i < tree->pages_per_bnode; i++) {
634 spin_unlock(&tree->hash_lock);
639 spin_unlock(&tree->hash_lock);