Lines Matching refs:bnode

22 	fd->bnode = NULL;
48 hfs_bnode_put(fd->bnode);
56 /* Find the record in bnode that best matches key (not greater than...)*/
57 int __hfs_brec_find(struct hfs_bnode *bnode, struct hfs_find_data *fd)
66 e = bnode->num_recs - 1;
70 len = hfs_brec_lenoff(bnode, rec, &off);
71 keylen = hfs_brec_keylen(bnode, rec);
76 hfs_bnode_read(bnode, fd->key, off, keylen);
77 cmpval = bnode->tree->keycmp(fd->key, fd->search_key);
89 len = hfs_brec_lenoff(bnode, e, &off);
90 keylen = hfs_brec_keylen(bnode, e);
95 hfs_bnode_read(bnode, fd->key, off, keylen);
112 struct hfs_bnode *bnode;
118 if (fd->bnode)
119 hfs_bnode_put(fd->bnode);
120 fd->bnode = NULL;
128 bnode = hfs_bnode_find(tree, nidx);
129 if (IS_ERR(bnode)) {
130 res = PTR_ERR(bnode);
131 bnode = NULL;
134 if (bnode->height != height)
136 if (bnode->type != (--height ? HFS_NODE_INDEX : HFS_NODE_LEAF))
138 bnode->parent = parent;
140 res = __hfs_brec_find(bnode, fd);
147 hfs_bnode_read(bnode, &data, fd->entryoffset, 4);
149 hfs_bnode_put(bnode);
151 fd->bnode = bnode;
156 height, bnode->height, bnode->type, nidx, parent);
159 hfs_bnode_put(bnode);
172 hfs_bnode_read(fd->bnode, rec, fd->entryoffset, fd->entrylength);
179 struct hfs_bnode *bnode;
183 bnode = fd->bnode;
184 tree = bnode->tree;
190 fd->record = bnode->num_recs - 1;
191 idx = bnode->prev;
196 hfs_bnode_put(bnode);
197 bnode = hfs_bnode_find(tree, idx);
198 if (IS_ERR(bnode)) {
199 res = PTR_ERR(bnode);
200 bnode = NULL;
206 while (cnt >= bnode->num_recs - fd->record) {
207 cnt -= bnode->num_recs - fd->record;
209 idx = bnode->next;
214 hfs_bnode_put(bnode);
215 bnode = hfs_bnode_find(tree, idx);
216 if (IS_ERR(bnode)) {
217 res = PTR_ERR(bnode);
218 bnode = NULL;
225 len = hfs_brec_lenoff(bnode, fd->record, &off);
226 keylen = hfs_brec_keylen(bnode, fd->record);
235 hfs_bnode_read(bnode, fd->key, off, keylen);
237 fd->bnode = bnode;