Lines Matching refs:bnode
113 void hfs_bnode_read(struct hfs_bnode *bnode, struct hfs_btree *tree, in hfs_bnode_read() argument
121 memset(bnode, 0, sizeof(*bnode)); in hfs_bnode_read()
122 bnode->magic = HFS_BNODE_MAGIC; in hfs_bnode_read()
123 bnode->tree = tree; in hfs_bnode_read()
124 bnode->node = node; in hfs_bnode_read()
125 bnode->sticky = sticky; in hfs_bnode_read()
126 hfs_init_waitqueue(&bnode->rqueue); in hfs_bnode_read()
127 hfs_init_waitqueue(&bnode->wqueue); in hfs_bnode_read()
131 if ((bnode->next = bhash(tree, node))) { in hfs_bnode_read()
132 bnode->next->prev = bnode; in hfs_bnode_read()
134 bhash(tree, node) = bnode; in hfs_bnode_read()
140 bnode->count = bnode->resrv = bnode->lock = 1; in hfs_bnode_read()
152 } else if (hfs_buffer_ok(bnode->buf = in hfs_bnode_read()
155 nd = (struct NodeDescriptor *)hfs_buffer_data(bnode->buf); in hfs_bnode_read()
156 bnode->ndFLink = hfs_get_hl(nd->ndFLink); in hfs_bnode_read()
157 bnode->ndBLink = hfs_get_hl(nd->ndBLink); in hfs_bnode_read()
158 bnode->ndType = nd->ndType; in hfs_bnode_read()
159 bnode->ndNHeight = nd->ndNHeight; in hfs_bnode_read()
160 bnode->ndNRecs = hfs_get_hs(nd->ndNRecs); in hfs_bnode_read()
164 limit = HFS_SECTOR_SIZE - sizeof(hfs_u16)*(bnode->ndNRecs + 1); in hfs_bnode_read()
165 for (lcv=1; lcv <= (bnode->ndNRecs + 1); ++lcv) { in hfs_bnode_read()
166 curr = hfs_get_hs(RECTBL(bnode, lcv)); in hfs_bnode_read()
170 hfs_buffer_put(bnode->buf); in hfs_bnode_read()
171 bnode->buf = NULL; in hfs_bnode_read()
180 --bnode->count; in hfs_bnode_read()
181 bnode->resrv = bnode->lock = 0; in hfs_bnode_read()
182 hfs_wake_up(&bnode->rqueue); in hfs_bnode_read()