Lines Matching defs:i_lnode

188 struct i_lnode;
199 struct i_lnode *src_lnode; /* src i_lnode */
200 struct i_lnode *tgt_lnode; /* tgt i_lnode */
201 struct i_link *src_link_next; /* next src i_link /w same i_lnode */
202 struct i_link *tgt_link_next; /* next tgt i_link /w same i_lnode */
205 typedef struct i_lnode {
207 * If a di_lnode struct representing this i_lnode struct makes it
225 * i_link ptr to links coming into this i_lnode node
226 * (this i_lnode is the target of these i_links)
231 * i_link ptr to links going out of this i_lnode node
232 * (this i_lnode is the source of these i_links)
2085 i_lnode_t *i_lnode;
2087 i_lnode = kmem_zalloc(sizeof (i_lnode_t), KM_SLEEP);
2090 i_lnode->modid = modid;
2092 return (i_lnode);
2096 i_lnode_free(i_lnode_t *i_lnode)
2098 kmem_free(i_lnode, sizeof (i_lnode_t));
2102 i_lnode_check_free(i_lnode_t *i_lnode)
2105 ASSERT(i_lnode->self > 0);
2106 ASSERT(i_lnode->di_node->self > 0);
2109 ASSERT(i_lnode->link_in || i_lnode->link_out);
2111 i_lnode_free(i_lnode);
2142 i_lnode_t *i_lnode = (i_lnode_t *)key;
2146 dev = i_lnode->devt;
2148 return (i_lnode->modid + getminor(dev) + getmajor(dev));
2150 ptr = i_lnode->di_node;
2158 return (i_lnode->modid);
2190 i_lnode_t *src_lnode, *tgt_lnode, *i_lnode;
2220 * allocate an i_lnode and add it to the lnode hash
2226 i_lnode = i_lnode_alloc(ldi_usage->src_modid);
2227 i_lnode->di_node = DI_NODE(di_mem_addr(st, soff));
2228 i_lnode->devt = ldi_usage->src_devt;
2230 res = mod_hash_find(st->lnode_hash, i_lnode, &nodep);
2233 * new i_lnode
2236 res = mod_hash_insert(st->lnode_hash, i_lnode, i_lnode);
2239 src_lnode = i_lnode;
2241 /* this i_lnode already exists in the lnode_hash */
2242 i_lnode_free(i_lnode);
2247 * allocate a tgt i_lnode and add it to the lnode hash
2249 i_lnode = i_lnode_alloc(ldi_usage->tgt_modid);
2250 i_lnode->di_node = DI_NODE(di_mem_addr(st, toff));
2251 i_lnode->devt = ldi_usage->tgt_devt;
2253 res = mod_hash_find(st->lnode_hash, i_lnode, &nodep);
2256 * new i_lnode
2259 res = mod_hash_insert(st->lnode_hash, i_lnode, i_lnode);
2262 tgt_lnode = i_lnode;
2264 /* this i_lnode already exists in the lnode_hash */
2265 i_lnode_free(i_lnode);
2395 i_lnode_t *i_lnode = (i_lnode_t *)key;
2400 ASSERT(i_lnode->self == 0);
2402 i_lnode->self = data->lnode_off +
2411 me = DI_LNODE(di_mem_addr(data->st, i_lnode->self));
2412 me->self = i_lnode->self;
2414 if (i_lnode->devt == DDI_DEV_T_NONE) {
2418 me->dev_major = getmajor(i_lnode->devt);
2419 me->dev_minor = getminor(i_lnode->devt);
2427 ASSERT(i_lnode->di_node && i_lnode->di_node->self > 0);
2428 me->node = i_lnode->di_node->self;
2435 ASSERT((i_lnode->link_in != NULL) || (i_lnode->link_out != NULL));
2444 medinode = i_lnode->di_node;