Lines Matching defs:vp

88 	struct vnode	*vp;
91 vp = specvp(realvp, dev, vtyp, cr);
92 ASSERT(vp);
95 spec_assoc_vp_with_devi(vp, dip);
96 return (vp);
113 struct vnode *vp,
126 if (vp == NULL)
128 if (vp->v_type == VFIFO)
129 return (fifovp(vp, cr));
131 ASSERT(vp->v_type == type);
132 ASSERT(vp->v_rdev == dev);
146 rc = VOP_GETATTR(vp, &va, 0, cr, NULL); /* XXX may block! */
149 if ((sp = sfind(dev, type, vp)) == NULL) {
155 sp->s_realvp = vp;
156 VN_HOLD(vp);
183 svp->v_flag = (vp->v_flag & VROOT);
184 svp->v_vfsp = vp->v_vfsp;
188 (void) vn_copypath(vp, svp);
281 spec_assoc_fence(dev_info_t *ndip, vnode_t *vp)
286 ASSERT(vp);
287 ASSERT(vn_matchops(vp, spec_getvnodeops()));
297 csp = VTOCS(vp);
341 spec_assoc_vp_with_devi(struct vnode *vp, dev_info_t *dip)
346 ASSERT(vp);
357 if ((dip == NULL) && (getmajor(vp->v_rdev) == clone_major))
364 csp = VTOS(VTOS(vp)->s_commonvp);
375 spec_assoc_fence(dip, vp);
386 spec_hold_devi_by_vp(struct vnode *vp)
391 ASSERT(vn_matchops(vp, spec_getvnodeops()));
393 csp = VTOS(VTOS(vp)->s_commonvp);
480 struct vnode *vp;
485 vp = STOV(sp);
493 if (sp->s_commonvp != vp || (dip = sp->s_dip) == NULL)
512 common_specvp(struct vnode *vp)
516 if ((vp->v_type != VBLK) && (vp->v_type != VCHR) ||
517 !vn_matchops(vp, spec_getvnodeops()))
518 return (vp);
519 sp = VTOS(vp);
670 * Lookup an snode by <dev, type, vp>.
674 * If vp is NULL, only return commonvp. Otherwise return
675 * shadow vp with both shadow and common vp's VN_HELD.
681 struct vnode *vp)
691 VN_CMP(st->s_realvp, vp) &&
692 (vp != NULL || st->s_commonvp == svp) &&
693 (vp == NULL || st->s_realvp->v_vfsp == vp->v_vfsp)) {
739 spec_maxoffset(struct vnode *vp)
741 struct snode *sp = VTOS(vp);
744 if (vp->v_stream)
760 struct vnode *vp;
762 vp = sp->s_vnode = vn_alloc(kmflags);
763 if (vp == NULL) {
766 vn_setops(vp, spec_getvnodeops());
767 vp->v_data = sp;
779 struct vnode *vp = STOV(sp);
784 vn_free(vp);
837 device_close(struct vnode *vp, int flag, struct cred *cr)
839 struct snode *sp = VTOS(vp);
840 enum vtype type = vp->v_type;
851 if (vp->v_stream) {
854 vp->v_stream = NULL;
882 vnode_t *vp;
884 if (vp = makespecvp(ovp->v_rdev, VCHR)) {
889 sp = VTOS(vp);
897 return (vp);
920 spec_is_clone(vnode_t *vp)
924 if (vn_matchops(vp, spec_getvnodeops())) {
925 sp = VTOS(vp);
933 spec_is_selfclone(vnode_t *vp)
937 if (vn_matchops(vp, spec_getvnodeops())) {
938 sp = VTOS(vp);
946 * We may be invoked with a NULL vp in which case we fence off
950 spec_fence_snode(dev_info_t *dip, struct vnode *vp)
974 if (vp != NULL) {
975 ASSERT(vn_matchops(vp, spec_getvnodeops()));
976 csp = VTOCS(vp);