Lines Matching refs:snode
55 #include <sys/fs/snode.h>
76 static struct snode *sfind(dev_t, vtype_t, struct vnode *);
77 static struct vnode *get_cvp(dev_t, vtype_t, struct snode *, int *);
78 static void sinsert(struct snode *);
94 /* associate a dip hold with the common snode's s_dip pointer */
101 * If no snode exists for this dev create one and put it
102 * in a table hashed by <dev, realvp>. If the snode for
104 * incremented by sfind). The snode will be flushed from the
118 struct snode *sp;
119 struct snode *nsp;
120 struct snode *csp;
143 * been required if the snode is in the cache.
152 sp = nsp; /* Use pre-allocated snode */
167 * Set times in snode to those in the vnode.
199 /* Didn't use pre-allocated snode so free it */
204 /* free unused snode memory */
213 * for it to shadow. Always create a new snode and put it in the
214 * table hashed by <dev, NULL>. The snode will be flushed from the
220 * else is creating a snode for (dev, type) at this time.
225 struct snode *sp;
267 * associates a "new" dip with a common snode, releasing (any) old dip
269 * and determines whether the snode should be fenced of or not. As the table
272 * old-dip new-dip common-snode
284 struct snode *csp;
300 /* SFENCED flag only set on common snode */
308 FENDBG((CE_NOTE, "%sfenced common snode (%p) for new dip=%p",
313 * Associate the common snode with a devinfo node. This is called from:
331 * spec_assoc_vp_with_devi or until the common snode is destroyed by
343 struct snode *csp;
383 * Return the held dip associated with the specified snode.
388 struct snode *csp;
409 struct snode *st;
430 * Loop through the snode cache looking for snodes referencing dip.
446 struct snode *sp;
449 /* if no hold then there can't be an snode with s_dip == dip */
467 * Given an snode, returns the open count and the dip
468 * associated with that snode
470 * to prevent snode and/or dip from going away.
476 spec_devi_open_count(struct snode *sp, dev_info_t **dipp)
514 struct snode *sp;
528 * may use a pre-allocated snode provided by caller.
534 struct snode *nsp, /* pre-allocated snode */
537 struct snode *sp;
542 sp = nsp; /* Use pre-allocated snode */
581 struct snode *sp, *nsp;
584 /* Pre-allocate snode in case we might block */
589 sp = nsp; /* Use pre-alloced snode */
617 /* Didn't need the pre-allocated snode */
626 * that the snode for an dev can be found if it already exists.
628 struct snode *stable[STABLESIZE];
633 * Put a snode in the table.
636 sinsert(struct snode *sp)
644 * Remove an snode from the hash table.
649 sdelete(struct snode *sp)
651 struct snode *st;
652 struct snode *stprev = NULL;
670 * Lookup an snode by <dev, type, vp>.
677 static struct snode *
683 struct snode *st;
703 * Mark the accessed, updated, or changed times in an snode
707 smark(struct snode *sp, int flag)
741 struct snode *sp = VTOS(vp);
742 struct snode *csp = VTOS(sp->s_commonvp);
759 struct snode *sp = buf;
778 struct snode *sp = buf;
821 * Create snode cache
823 snode_cache = kmem_cache_create("snode_cache", sizeof (struct snode),
839 struct snode *sp = VTOS(vp);
885 struct snode *sp;
886 struct snode *csp;
901 spec_snode_walk(int (*callback)(struct snode *sp, void *arg), void *arg)
903 struct snode *sp;
922 struct snode *sp;
935 struct snode *sp;
952 struct snode *sp;
953 struct snode *csp;
981 FENDBG((CE_NOTE, "fenced off snode(%p) for dip: %s",
994 /* fence off the common snode */
1017 struct snode *sp;
1018 struct snode *csp;
1036 /* unfence the common snode */
1059 struct snode *csp;