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

Lines Matching refs:tree

46 	struct hfs_btree *tree;
49 tree = node->tree;
51 tree->attributes & HFS_TREE_VARIDXKEYS)
54 key_len = tree->max_key_len + 1;
99 struct hfs_btree *tree;
105 tree = src_node->tree;
146 off = node->tree->node_size - 2;
153 if (node->tree->attributes & HFS_TREE_VARIDXKEYS)
156 tmp = node->tree->max_key_len + 1;
172 struct hfs_btree *tree;
176 tree = node->tree;
178 tmp = hfs_bnode_find(tree, node->prev);
186 tree->leaf_head = node->next;
189 tmp = hfs_bnode_find(tree, node->next);
197 tree->leaf_tail = node->prev;
204 tree->root = 0;
205 tree->depth = 0;
217 struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid)
221 if (cnid >= tree->node_count) {
226 for (node = tree->node_hash[hfs_bnode_hash(cnid)];
235 static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
244 if (cnid >= tree->node_count) {
249 sb = tree->inode->i_sb;
250 size = sizeof(struct hfs_bnode) + tree->pages_per_bnode *
255 node->tree = tree;
260 node->tree->cnid, node->this);
262 spin_lock(&tree->hash_lock);
263 node2 = hfs_bnode_findhash(tree, cnid);
266 node->next_hash = tree->node_hash[hash];
267 tree->node_hash[hash] = node;
268 tree->node_hash_cnt++;
270 spin_unlock(&tree->hash_lock);
275 spin_unlock(&tree->hash_lock);
277 mapping = tree->inode->i_mapping;
278 off = (loff_t)cnid * tree->node_size;
281 for (i = 0; i < tree->pages_per_bnode; i++) {
304 node->tree->cnid, node->this, atomic_read(&node->refcnt));
305 for (p = &node->tree->node_hash[hfs_bnode_hash(node->this)];
310 node->tree->node_hash_cnt--;
313 /* Load a particular node out of a tree */
314 struct hfs_bnode *hfs_bnode_find(struct hfs_btree *tree, u32 num)
321 spin_lock(&tree->hash_lock);
322 node = hfs_bnode_findhash(tree, num);
325 spin_unlock(&tree->hash_lock);
331 spin_unlock(&tree->hash_lock);
332 node = __hfs_bnode_create(tree, num);
359 if (node->height <= 1 || node->height > tree->depth)
366 rec_off = tree->node_size - 2;
374 next_off > tree->node_size ||
401 //for (i = 0; i < node->tree->pages_per_bnode; i++)
407 struct hfs_bnode *hfs_bnode_create(struct hfs_btree *tree, u32 num)
413 spin_lock(&tree->hash_lock);
414 node = hfs_bnode_findhash(tree, num);
415 spin_unlock(&tree->hash_lock);
417 node = __hfs_bnode_create(tree, num);
427 min((int)PAGE_CACHE_SIZE, (int)tree->node_size));
430 for (i = 1; i < tree->pages_per_bnode; i++) {
446 node->tree->cnid, node->this, atomic_read(&node->refcnt));
454 struct hfs_btree *tree = node->tree;
458 node->tree->cnid, node->this, atomic_read(&node->refcnt));
460 if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock))
462 for (i = 0; i < tree->pages_per_bnode; i++) {
470 spin_unlock(&tree->hash_lock);
475 spin_unlock(&tree->hash_lock);