Lines Matching defs:vp

213 #define	VN_KNLIST_EMPTY(vp) ((vp)->v_pollinfo == NULL ||	\
214 KNLIST_EMPTY(&(vp)->v_pollinfo->vpi_selinfo.si_note))
216 #define VN_KNOTE(vp, b, a) \
218 if (!VN_KNLIST_EMPTY(vp)) \
219 KNOTE(&vp->v_pollinfo->vpi_selinfo.si_note, (b), \
222 #define VN_KNOTE_LOCKED(vp, b) VN_KNOTE(vp, b, KNF_LISTLOCKED)
223 #define VN_KNOTE_UNLOCKED(vp, b) VN_KNOTE(vp, b, 0)
399 #define VREF(vp) vref(vp)
418 #define VI_LOCK(vp) mtx_lock(&(vp)->v_interlock)
419 #define VI_LOCK_FLAGS(vp, flags) mtx_lock_flags(&(vp)->v_interlock, (flags))
420 #define VI_TRYLOCK(vp) mtx_trylock(&(vp)->v_interlock)
421 #define VI_UNLOCK(vp) mtx_unlock(&(vp)->v_interlock)
422 #define VI_MTX(vp) (&(vp)->v_interlock)
424 #define VN_LOCK_AREC(vp) lockallowrecurse((vp)->v_vnlock)
425 #define VN_LOCK_ASHARE(vp) lockallowshare((vp)->v_vnlock)
437 /* Low order 16 flag bits are reserved for willrele flags for vp arguments. */
502 void assert_vi_locked(struct vnode *vp, const char *str);
503 void assert_vi_unlocked(struct vnode *vp, const char *str);
504 void assert_vop_elocked(struct vnode *vp, const char *str);
506 void assert_vop_elocked_other(struct vnode *vp, const char *str);
508 void assert_vop_locked(struct vnode *vp, const char *str);
510 voi0 assert_vop_slocked(struct vnode *vp, const char *str);
512 void assert_vop_unlocked(struct vnode *vp, const char *str);
514 #define ASSERT_VI_LOCKED(vp, str) assert_vi_locked((vp), (str))
515 #define ASSERT_VI_UNLOCKED(vp, str) assert_vi_unlocked((vp), (str))
516 #define ASSERT_VOP_ELOCKED(vp, str) assert_vop_elocked((vp), (str))
518 #define ASSERT_VOP_ELOCKED_OTHER(vp, str) assert_vop_locked_other((vp), (str))
520 #define ASSERT_VOP_LOCKED(vp, str) assert_vop_locked((vp), (str))
522 #define ASSERT_VOP_SLOCKED(vp, str) assert_vop_slocked((vp), (str))
524 #define ASSERT_VOP_UNLOCKED(vp, str) assert_vop_unlocked((vp), (str))
528 #define ASSERT_VI_LOCKED(vp, str) ((void)0)
529 #define ASSERT_VI_UNLOCKED(vp, str) ((void)0)
530 #define ASSERT_VOP_ELOCKED(vp, str) ((void)0)
532 #define ASSERT_VOP_ELOCKED_OTHER(vp, str)
534 #define ASSERT_VOP_LOCKED(vp, str) ((void)0)
536 #define ASSERT_VOP_SLOCKED(vp, str)
538 #define ASSERT_VOP_UNLOCKED(vp, str) ((void)0)
547 #define DOINGASYNC(vp) \
548 (((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC) != 0 && \
558 vn_canvmio(struct vnode *vp)
560 if (vp && (vp->v_type == VREG || (vmiodirenable && vp->v_type == VDIR)))
591 #define cache_enter(dvp, vp, cnp) \
592 cache_enter_time(dvp, vp, cnp, NULL, NULL)
593 void cache_enter_time(struct vnode *dvp, struct vnode *vp,
600 void cache_purge(struct vnode *vp);
601 void cache_purge_negative(struct vnode *vp);
603 int change_dir(struct vnode *vp, struct thread *td);
604 int change_root(struct vnode *vp, struct thread *td);
611 int insmntque1(struct vnode *vp, struct mount *mp,
613 int insmntque(struct vnode *vp, struct mount *mp);
616 int vn_vptocnp(struct vnode **vp, struct ucred *cred, char *buf,
625 vn_dir_dd_ino(struct vnode *vp);
627 int vn_path_to_global_path(struct thread *td, struct vnode *vp,
639 int vcount(struct vnode *vp);
643 int vget(struct vnode *vp, int lockflag, struct thread *td);
644 void vgone(struct vnode *vp);
648 int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo);
649 int vtruncbuf(struct vnode *vp, struct ucred *cred, struct thread *td,
652 void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3);
653 #define vprint(label, vp) vn_printf((vp), "%s\n", (label))
654 int vrecycle(struct vnode *vp, struct thread *td);
655 int vn_bmap_seekhole(struct vnode *vp, u_long cmd, off_t *off,
657 int vn_close(struct vnode *vp,
661 int vn_isdisk(struct vnode *vp, int *errp);
662 int _vn_lock(struct vnode *vp, int flags, char *file, int line);
663 #define vn_lock(vp, flags) _vn_lock(vp, flags, __FILE__, __LINE__)
667 void vn_pages_remove(struct vnode *vp, vm_pindex_t start, vm_pindex_t end);
668 int vn_pollrecord(struct vnode *vp, struct thread *p, int events);
669 int vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base,
673 int vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base,
679 int vn_stat(struct vnode *vp, struct stat *sb, struct ucred *active_cred,
681 int vn_start_write(struct vnode *vp, struct mount **mpp, int flags);
682 int vn_start_secondary_write(struct vnode *vp, struct mount **mpp,
684 int vn_writechk(struct vnode *vp);
685 int vn_extattr_get(struct vnode *vp, int ioflg, int attrnamespace,
687 int vn_extattr_set(struct vnode *vp, int ioflg, int attrnamespace,
689 int vn_extattr_rm(struct vnode *vp, int ioflg, int attrnamespace,
691 int vn_vget_ino(struct vnode *vp, ino_t ino, int lkflags,
698 #define vn_rangelock_unlock(vp, cookie) \
699 rangelock_unlock(&(vp)->v_rl, (cookie), VI_MTX(vp))
700 #define vn_rangelock_unlock_range(vp, cookie, start, end) \
701 rangelock_unlock_range(&(vp)->v_rl, (cookie), (start), (end), \
702 VI_MTX(vp))
703 #define vn_rangelock_rlock(vp, start, end) \
704 rangelock_rlock(&(vp)->v_rl, (start), (end), VI_MTX(vp))
705 #define vn_rangelock_wlock(vp, start, end) \
706 rangelock_wlock(&(vp)->v_rl, (start), (end), VI_MTX(vp))
790 #define VOP_LOCK(vp, flags) VOP_LOCK1(vp, flags, __FILE__, __LINE__)
793 void vput(struct vnode *vp);
794 void vrele(struct vnode *vp);
795 void vref(struct vnode *vp);
796 int vrefcnt(struct vnode *vp);
797 void v_addpollinfo(struct vnode *vp);
799 int vnode_create_vobject(struct vnode *vp, off_t size, struct thread *td);
800 void vnode_destroy_vobject(struct vnode *vp);
815 typedef int vfs_hash_cmp_t(struct vnode *vp, void *arg);
818 u_int vfs_hash_index(struct vnode *vp);
819 int vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg);
820 void vfs_hash_rehash(struct vnode *vp, u_int hash);
821 void vfs_hash_remove(struct vnode *vp);
824 void vfs_mark_atime(struct vnode *vp, struct ucred *cred);
830 void vfs_unp_reclaim(struct vnode *vp);
832 int setfmode(struct thread *td, struct ucred *cred, struct vnode *vp, int mode);
833 int setfown(struct thread *td, struct ucred *cred, struct vnode *vp, uid_t uid,