Lines Matching refs:bnode

20 	fd->bnode = NULL;  in hfs_find_init()
46 hfs_bnode_put(fd->bnode); in hfs_find_exit()
54 int hfs_find_1st_rec_by_cnid(struct hfs_bnode *bnode, in hfs_find_1st_rec_by_cnid() argument
63 if (bnode->tree->cnid == HFSPLUS_EXT_CNID) { in hfs_find_1st_rec_by_cnid()
66 } else if (bnode->tree->cnid == HFSPLUS_CAT_CNID) { in hfs_find_1st_rec_by_cnid()
69 } else if (bnode->tree->cnid == HFSPLUS_ATTR_CNID) { in hfs_find_1st_rec_by_cnid()
92 int hfs_find_rec_by_key(struct hfs_bnode *bnode, in hfs_find_rec_by_key() argument
100 cmpval = bnode->tree->keycmp(fd->key, fd->search_key); in hfs_find_rec_by_key()
114 int __hfs_brec_find(struct hfs_bnode *bnode, struct hfs_find_data *fd, in __hfs_brec_find() argument
124 e = bnode->num_recs - 1; in __hfs_brec_find()
128 len = hfs_brec_lenoff(bnode, rec, &off); in __hfs_brec_find()
129 keylen = hfs_brec_keylen(bnode, rec); in __hfs_brec_find()
134 hfs_bnode_read(bnode, fd->key, off, keylen); in __hfs_brec_find()
135 if (rec_found(bnode, fd, &b, &e, &rec)) { in __hfs_brec_find()
142 len = hfs_brec_lenoff(bnode, e, &off); in __hfs_brec_find()
143 keylen = hfs_brec_keylen(bnode, e); in __hfs_brec_find()
148 hfs_bnode_read(bnode, fd->key, off, keylen); in __hfs_brec_find()
167 struct hfs_bnode *bnode; in hfs_brec_find() local
173 if (fd->bnode) in hfs_brec_find()
174 hfs_bnode_put(fd->bnode); in hfs_brec_find()
175 fd->bnode = NULL; in hfs_brec_find()
183 bnode = hfs_bnode_find(tree, nidx); in hfs_brec_find()
184 if (IS_ERR(bnode)) { in hfs_brec_find()
185 res = PTR_ERR(bnode); in hfs_brec_find()
186 bnode = NULL; in hfs_brec_find()
189 if (bnode->height != height) in hfs_brec_find()
191 if (bnode->type != (--height ? HFS_NODE_INDEX : HFS_NODE_LEAF)) in hfs_brec_find()
193 bnode->parent = parent; in hfs_brec_find()
195 res = __hfs_brec_find(bnode, fd, do_key_compare); in hfs_brec_find()
202 hfs_bnode_read(bnode, &data, fd->entryoffset, 4); in hfs_brec_find()
204 hfs_bnode_put(bnode); in hfs_brec_find()
206 fd->bnode = bnode; in hfs_brec_find()
211 height, bnode->height, bnode->type, nidx, parent); in hfs_brec_find()
214 hfs_bnode_put(bnode); in hfs_brec_find()
227 hfs_bnode_read(fd->bnode, rec, fd->entryoffset, fd->entrylength); in hfs_brec_read()
234 struct hfs_bnode *bnode; in hfs_brec_goto() local
238 bnode = fd->bnode; in hfs_brec_goto()
239 tree = bnode->tree; in hfs_brec_goto()
245 fd->record = bnode->num_recs - 1; in hfs_brec_goto()
246 idx = bnode->prev; in hfs_brec_goto()
251 hfs_bnode_put(bnode); in hfs_brec_goto()
252 bnode = hfs_bnode_find(tree, idx); in hfs_brec_goto()
253 if (IS_ERR(bnode)) { in hfs_brec_goto()
254 res = PTR_ERR(bnode); in hfs_brec_goto()
255 bnode = NULL; in hfs_brec_goto()
261 while (cnt >= bnode->num_recs - fd->record) { in hfs_brec_goto()
262 cnt -= bnode->num_recs - fd->record; in hfs_brec_goto()
264 idx = bnode->next; in hfs_brec_goto()
269 hfs_bnode_put(bnode); in hfs_brec_goto()
270 bnode = hfs_bnode_find(tree, idx); in hfs_brec_goto()
271 if (IS_ERR(bnode)) { in hfs_brec_goto()
272 res = PTR_ERR(bnode); in hfs_brec_goto()
273 bnode = NULL; in hfs_brec_goto()
280 len = hfs_brec_lenoff(bnode, fd->record, &off); in hfs_brec_goto()
281 keylen = hfs_brec_keylen(bnode, fd->record); in hfs_brec_goto()
290 hfs_bnode_read(bnode, fd->key, off, keylen); in hfs_brec_goto()
292 fd->bnode = bnode; in hfs_brec_goto()