Lines Matching refs:vp

112 #define	DCHASH(vp) (((uintptr_t)(vp) >> DCSHFT) & (DCTABLESIZE - 1))  argument
114 #define DCHASH(vp) (((uintptr_t)(vp) >> DCSHFT) % DTABLESIZEC) argument
254 dc_close(struct vnode *vp, int flag, int count, offset_t off, in dc_close() argument
257 (void) cleanlocks(vp, ttoproc(curthread)->p_pid, 0); in dc_close()
258 cleanshares(vp, ttoproc(curthread)->p_pid); in dc_close()
264 dc_read(struct vnode *vp, struct uio *uiop, int ioflag, struct cred *cr, in dc_read() argument
267 struct dcnode *dp = VTODC(vp); in dc_read()
290 base = segmap_getmapflt(segkmap, vp, uiop->uio_loffset, n, 1, in dc_read()
309 dc_getattr(struct vnode *vp, struct vattr *vap, int flags, in dc_getattr() argument
312 struct dcnode *dp = VTODC(vp); in dc_getattr()
324 dc_setattr(struct vnode *vp, struct vattr *vap, int flags, cred_t *cred, in dc_setattr() argument
327 struct dcnode *dp = VTODC(vp); in dc_setattr()
334 dc_access(struct vnode *vp, int mode, int flags, in dc_access() argument
337 struct dcnode *dp = VTODC(vp); in dc_access()
345 dc_fsync(vnode_t *vp, int syncflag, cred_t *cred, caller_context_t *ctp) in dc_fsync() argument
352 dc_inactive(struct vnode *vp, cred_t *cr, caller_context_t *ctp) in dc_inactive() argument
354 struct dcnode *dp = VTODC(vp); in dc_inactive()
357 mutex_enter(&vp->v_lock); in dc_inactive()
358 ASSERT(vp->v_count >= 1); in dc_inactive()
359 VN_RELE_LOCKED(vp); in dc_inactive()
360 if (vp->v_count != 0) { in dc_inactive()
365 mutex_exit(&vp->v_lock); in dc_inactive()
369 mutex_exit(&vp->v_lock); in dc_inactive()
377 dc_fid(struct vnode *vp, struct fid *fidp, caller_context_t *ctp) in dc_fid() argument
379 struct dcnode *dp = VTODC(vp); in dc_fid()
386 dc_seek(struct vnode *vp, offset_t oof, offset_t *noffp, caller_context_t *ctp) in dc_seek() argument
388 struct dcnode *dp = VTODC(vp); in dc_seek()
395 dc_frlock(struct vnode *vp, int cmd, struct flock64 *bfp, int flag, in dc_frlock() argument
399 struct dcnode *dp = VTODC(vp); in dc_frlock()
409 if (dp->dc_mapcnt > 0 && MANDLOCK(vp, vattr.va_mode)) in dc_frlock()
412 return (fs_frlock(vp, cmd, bfp, flag, offset, flk_cbp, cr, ctp)); in dc_frlock()
417 dc_getblock_miss(struct vnode *vp, offset_t off, size_t len, struct page **ppp, in dc_getblock_miss() argument
420 struct dcnode *dp = VTODC(vp); in dc_getblock_miss()
434 pp = page_create_va(vp, off, len, PG_WAIT, seg, addr); in dc_getblock_miss()
435 bp = pageio_setup(pp, len, vp, B_READ); in dc_getblock_miss()
482 dc_getblock(struct vnode *vp, offset_t off, size_t len, struct page **ppp, in dc_getblock() argument
500 pp = page_lookup(vp, pgoff, SE_EXCL); in dc_getblock()
520 return (dc_getblock_miss(vp, off, len, ppp, seg, addr, rw, cr)); in dc_getblock()
524 dc_realvp(vnode_t *vp, vnode_t **vpp, caller_context_t *ct) in dc_realvp() argument
528 vp = VTODC(vp)->dc_subvp; in dc_realvp()
529 if (VOP_REALVP(vp, &rvp, ct) == 0) in dc_realvp()
530 vp = rvp; in dc_realvp()
531 *vpp = vp; in dc_realvp()
537 dc_getpage(struct vnode *vp, offset_t off, size_t len, uint_t *protp, in dc_getpage() argument
541 struct dcnode *dp = VTODC(vp); in dc_getpage()
574 error = dc_getblock(vp, vp_boff, bsize, &pp, seg, vp_baddr, in dc_getpage()
593 dc_putapage(struct vnode *vp, struct page *pp, u_offset_t *offp, size_t *lenp, in dc_putapage() argument
617 dc_putpage(struct vnode *vp, offset_t off, size_t len, int flags, in dc_putpage() argument
622 if (vp->v_count == 0) { in dc_putpage()
627 if (vp->v_flag & VNOMAP) in dc_putpage()
630 if (!vn_has_cached_data(vp)) /* no pages mapped */ in dc_putpage()
634 error = pvn_vplist_dirty(vp, off, dc_putapage, flags, cr); in dc_putpage()
648 pp = page_lookup(vp, io_off, se); in dc_putpage()
650 pp = page_lookup_nowait(vp, io_off, se); in dc_putpage()
675 dc_map(struct vnode *vp, offset_t off, struct as *as, caddr_t *addrp, in dc_map() argument
683 if (vp->v_flag & VNOMAP) in dc_map()
692 if (error = VOP_GETATTR(VTODC(vp)->dc_subvp, &vattr, 0, cred, ctp)) in dc_map()
694 if (vn_has_mandatory_locks(vp, vattr.va_mode)) in dc_map()
712 vn_a.vp = vp; in dc_map()
730 dc_addmap(struct vnode *vp, offset_t off, struct as *as, caddr_t addr, in dc_addmap() argument
736 if (vp->v_flag & VNOMAP) in dc_addmap()
739 dp = VTODC(vp); in dc_addmap()
748 dc_delmap(struct vnode *vp, offset_t off, struct as *as, caddr_t addr, in dc_delmap() argument
754 if (vp->v_flag & VNOMAP) in dc_delmap()
757 dp = VTODC(vp); in dc_delmap()
773 struct vnode *vp; in dcnode_constructor() local
775 vp = dp->dc_vp = vn_alloc(kmflags); in dcnode_constructor()
776 if (vp == NULL) { in dcnode_constructor()
779 vp->v_data = dp; in dcnode_constructor()
780 vp->v_type = VREG; in dcnode_constructor()
781 vp->v_flag = VNOSWAP; in dcnode_constructor()
782 vp->v_vfsp = &dc_vfs; in dcnode_constructor()
783 vn_setops(vp, dc_vnodeops); in dcnode_constructor()
784 vn_exists(vp); in dcnode_constructor()
799 struct vnode *vp = DCTOV(dp); in dcnode_destructor() local
805 vn_invalid(vp); in dcnode_destructor()
806 vn_free(vp); in dcnode_destructor()
836 struct vnode *vp = DCTOV(dp); in dcnode_free() local
843 if (!vn_has_cached_data(vp)) { in dcnode_free()
866 struct vnode *vp; in dcnode_recycle() local
868 vp = DCTOV(dp); in dcnode_recycle()
872 (void) pvn_vplist_dirty(vp, 0, dc_putapage, B_INVAL, NULL); in dcnode_recycle()
878 vn_reinit(vp); in dcnode_recycle()
879 vp->v_type = VREG; in dcnode_recycle()
880 vp->v_flag = VNOSWAP; in dcnode_recycle()
881 vp->v_vfsp = &dc_vfs; in dcnode_recycle()
925 decompvp(struct vnode *vp, cred_t *cred, caller_context_t *ctp) in decompvp() argument
939 dp = dcfind(vp); in decompvp()
948 error = vn_rdwr(UIO_READ, vp, (caddr_t)hdr, sizeof (struct comphdr), 0, in decompvp()
957 if (VOP_GETATTR(vp, &vattr, 0, cred, ctp) != 0) in decompvp()
965 error = vn_rdwr(UIO_READ, vp, (caddr_t)hdr, hdrsize, 0, UIO_SYSSPACE, in decompvp()
980 ndp->dc_subvp = vp; in decompvp()
981 VN_HOLD(vp); in decompvp()
1002 dp = dcfind(vp); in decompvp()
1065 dcfind(struct vnode *vp) in dcfind() argument
1070 for (dp = dctable[DCHASH(vp)]; dp != NULL; dp = dp->dc_hash) in dcfind()
1071 if (dp->dc_subvp == vp) { in dcfind()