Lines Matching refs:bnode
15 void hfsplus_find_rec(hfsplus_bnode *bnode, struct hfsplus_find_data *fd) in hfsplus_find_rec() argument
23 e = bnode->num_recs - 1; in hfsplus_find_rec()
26 len = hfsplus_brec_lenoff(bnode, rec, &off); in hfsplus_find_rec()
27 keylen = hfsplus_brec_keylen(bnode, rec); in hfsplus_find_rec()
28 hfsplus_bnode_readbytes(bnode, fd->key, off, keylen); in hfsplus_find_rec()
29 cmpval = bnode->tree->keycmp(fd->key, fd->search_key); in hfsplus_find_rec()
42 len = hfsplus_brec_lenoff(bnode, e, &off); in hfsplus_find_rec()
43 keylen = hfsplus_brec_keylen(bnode, e); in hfsplus_find_rec()
44 hfsplus_bnode_readbytes(bnode, fd->key, off, keylen); in hfsplus_find_rec()
58 hfsplus_bnode *bnode; in hfsplus_btree_find() local
63 if (fd->bnode) in hfsplus_btree_find()
64 hfsplus_put_bnode(fd->bnode); in hfsplus_btree_find()
65 fd->bnode = NULL; in hfsplus_btree_find()
74 bnode = hfsplus_find_bnode(tree, nidx); in hfsplus_btree_find()
75 if (!bnode) { in hfsplus_btree_find()
79 if (bnode->height != height) in hfsplus_btree_find()
81 if (bnode->kind != (--height ? HFSPLUS_NODE_NDX : HFSPLUS_NODE_LEAF)) in hfsplus_btree_find()
83 bnode->parent = parent; in hfsplus_btree_find()
85 hfsplus_find_rec(bnode, fd); in hfsplus_btree_find()
97 hfsplus_bnode_readbytes(bnode, &data, fd->entryoffset, 4); in hfsplus_btree_find()
99 hfsplus_put_bnode(bnode); in hfsplus_btree_find()
101 fd->bnode = bnode; in hfsplus_btree_find()
108 hfsplus_put_bnode(bnode); in hfsplus_btree_find()
122 hfsplus_bnode_readbytes(fd->bnode, entry, fd->entryoffset, fd->entrylength); in hfsplus_btree_find_entry()
129 hfsplus_bnode *bnode; in hfsplus_btree_move() local
133 bnode = fd->bnode; in hfsplus_btree_move()
134 tree = bnode->tree; in hfsplus_btree_move()
143 fd->record = bnode->num_recs - 1; in hfsplus_btree_move()
144 idx = bnode->prev; in hfsplus_btree_move()
149 hfsplus_put_bnode(bnode); in hfsplus_btree_move()
150 bnode = hfsplus_find_bnode(tree, idx); in hfsplus_btree_move()
151 if (!bnode) { in hfsplus_btree_move()
158 while (cnt >= bnode->num_recs - fd->record) { in hfsplus_btree_move()
159 cnt -= bnode->num_recs - fd->record; in hfsplus_btree_move()
161 idx = bnode->next; in hfsplus_btree_move()
166 hfsplus_put_bnode(bnode); in hfsplus_btree_move()
167 bnode = hfsplus_find_bnode(tree, idx); in hfsplus_btree_move()
168 if (!bnode) { in hfsplus_btree_move()
176 len = hfsplus_brec_lenoff(bnode, fd->record, &off); in hfsplus_btree_move()
177 keylen = hfsplus_brec_keylen(bnode, fd->record); in hfsplus_btree_move()
182 hfsplus_bnode_readbytes(bnode, fd->key, off, keylen); in hfsplus_btree_move()
184 fd->bnode = bnode; in hfsplus_btree_move()
191 fd->bnode = NULL; in hfsplus_find_init()
207 hfsplus_put_bnode(fd->bnode); in hfsplus_find_exit()