Lines Matching refs:vp

224 #define	VN_KNLIST_EMPTY(vp) ((vp)->v_pollinfo == NULL ||	\  argument
225 KNLIST_EMPTY(&(vp)->v_pollinfo->vpi_selinfo.si_note))
227 #define VN_KNOTE(vp, b, a) \ argument
229 if (!VN_KNLIST_EMPTY(vp)) \
230 KNOTE(&vp->v_pollinfo->vpi_selinfo.si_note, (b), \
233 #define VN_KNOTE_LOCKED(vp, b) VN_KNOTE(vp, b, KNF_LISTLOCKED) argument
234 #define VN_KNOTE_UNLOCKED(vp, b) VN_KNOTE(vp, b, 0) argument
436 #define VREF(vp) vref(vp) argument
457 #define VI_LOCK(vp) mtx_lock(&(vp)->v_interlock) argument
458 #define VI_LOCK_FLAGS(vp, flags) mtx_lock_flags(&(vp)->v_interlock, (flags)) argument
459 #define VI_TRYLOCK(vp) mtx_trylock(&(vp)->v_interlock) argument
460 #define VI_UNLOCK(vp) mtx_unlock(&(vp)->v_interlock) argument
461 #define VI_MTX(vp) (&(vp)->v_interlock) argument
463 #define VN_LOCK_AREC(vp) lockallowrecurse((vp)->v_vnlock) argument
464 #define VN_LOCK_ASHARE(vp) lockallowshare((vp)->v_vnlock) argument
465 #define VN_LOCK_DSHARE(vp) lockdisableshare((vp)->v_vnlock) argument
542 void assert_vi_locked(struct vnode *vp, const char *str);
543 void assert_vi_unlocked(struct vnode *vp, const char *str);
544 void assert_vop_elocked(struct vnode *vp, const char *str);
545 void assert_vop_locked(struct vnode *vp, const char *str);
546 void assert_vop_unlocked(struct vnode *vp, const char *str);
548 #define ASSERT_VI_LOCKED(vp, str) assert_vi_locked((vp), (str)) argument
549 #define ASSERT_VI_UNLOCKED(vp, str) assert_vi_unlocked((vp), (str)) argument
550 #define ASSERT_VOP_ELOCKED(vp, str) assert_vop_elocked((vp), (str)) argument
551 #define ASSERT_VOP_LOCKED(vp, str) assert_vop_locked((vp), (str)) argument
552 #define ASSERT_VOP_UNLOCKED(vp, str) assert_vop_unlocked((vp), (str)) argument
554 #define ASSERT_VOP_IN_SEQC(vp) do { \ argument
555 struct vnode *_vp = (vp); \
560 #define ASSERT_VOP_NOT_IN_SEQC(vp) do { \ argument
561 struct vnode *_vp = (vp); \
568 #define ASSERT_VI_LOCKED(vp, str) ((void)0) argument
569 #define ASSERT_VI_UNLOCKED(vp, str) ((void)0) argument
570 #define ASSERT_VOP_ELOCKED(vp, str) ((void)0) argument
571 #define ASSERT_VOP_LOCKED(vp, str) ((void)0) argument
572 #define ASSERT_VOP_UNLOCKED(vp, str) ((void)0) argument
574 #define ASSERT_VOP_IN_SEQC(vp) ((void)0) argument
575 #define ASSERT_VOP_NOT_IN_SEQC(vp) ((void)0) argument
584 #define DOINGASYNC(vp) \ argument
585 (((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC) != 0 && \
595 vn_canvmio(struct vnode *vp) in vn_canvmio() argument
597 if (vp && (vp->v_type == VREG || (vmiodirenable && vp->v_type == VDIR))) in vn_canvmio()
639 #define cache_enter(dvp, vp, cnp) \ argument
640 cache_enter_time(dvp, vp, cnp, NULL, NULL)
641 void cache_enter_time(struct vnode *dvp, struct vnode *vp,
646 void cache_vnode_init(struct vnode *vp);
647 void cache_purge(struct vnode *vp);
648 void cache_purge_vgone(struct vnode *vp);
649 void cache_purge_negative(struct vnode *vp);
657 void cache_vop_rmdir(struct vnode *dvp, struct vnode *vp);
659 void cache_validate(struct vnode *dvp, struct vnode *vp,
663 cache_validate(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) in cache_validate() argument
668 int change_dir(struct vnode *vp, struct thread *td);
676 int insmntque1(struct vnode *vp, struct mount *mp,
678 int insmntque(struct vnode *vp, struct mount *mp);
681 int vn_vptocnp(struct vnode **vp, char *buf, size_t *buflen);
683 int vn_fullpath(struct vnode *vp, char **retbuf, char **freebuf);
684 int vn_fullpath_global(struct vnode *vp, char **retbuf, char **freebuf);
686 vn_dir_dd_ino(struct vnode *vp);
688 int vn_path_to_global_path(struct thread *td, struct vnode *vp,
704 int vget(struct vnode *vp, int flags);
705 enum vgetstate vget_prep_smr(struct vnode *vp);
706 enum vgetstate vget_prep(struct vnode *vp);
707 int vget_finish(struct vnode *vp, int flags, enum vgetstate vs);
708 void vget_finish_ref(struct vnode *vp, enum vgetstate vs);
709 void vget_abort(struct vnode *vp, enum vgetstate vs);
710 void vgone(struct vnode *vp);
714 int vinactive(struct vnode *vp);
715 int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo);
716 int vtruncbuf(struct vnode *vp, off_t length, int blksize);
717 void v_inval_buf_range(struct vnode *vp, daddr_t startlbn, daddr_t endlbn,
720 void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3);
721 int vrecycle(struct vnode *vp);
722 int vrecyclel(struct vnode *vp);
723 int vn_bmap_seekhole(struct vnode *vp, u_long cmd, off_t *off,
725 int vn_close(struct vnode *vp,
733 int vn_fsync_buf(struct vnode *vp, int waitfor);
738 int vn_need_pageq_flush(struct vnode *vp);
739 bool vn_isdisk_error(struct vnode *vp, int *errp);
740 bool vn_isdisk(struct vnode *vp);
741 int _vn_lock(struct vnode *vp, int flags, const char *file, int line);
742 #define vn_lock(vp, flags) _vn_lock(vp, flags, __FILE__, __LINE__) argument
748 int vn_open_vnode(struct vnode *vp, int fmode, struct ucred *cred,
750 void vn_pages_remove(struct vnode *vp, vm_pindex_t start, vm_pindex_t end);
751 int vn_pollrecord(struct vnode *vp, struct thread *p, int events);
752 int vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base,
756 int vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base,
760 int vn_read_from_obj(struct vnode *vp, struct uio *uio);
761 int vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio,
763 int vn_start_write(struct vnode *vp, struct mount **mpp, int flags);
764 int vn_start_secondary_write(struct vnode *vp, struct mount **mpp,
766 int vn_truncate_locked(struct vnode *vp, off_t length, bool sync,
768 int vn_writechk(struct vnode *vp);
769 int vn_extattr_get(struct vnode *vp, int ioflg, int attrnamespace,
771 int vn_extattr_set(struct vnode *vp, int ioflg, int attrnamespace,
773 int vn_extattr_rm(struct vnode *vp, int ioflg, int attrnamespace,
775 int vn_vget_ino(struct vnode *vp, ino_t ino, int lkflags,
777 int vn_vget_ino_gen(struct vnode *vp, vn_get_ino_t alloc,
779 int vn_utimes_perm(struct vnode *vp, struct vattr *vap,
786 void vn_seqc_write_begin_unheld_locked(struct vnode *vp);
787 void vn_seqc_write_begin_unheld(struct vnode *vp);
788 void vn_seqc_write_begin_locked(struct vnode *vp);
789 void vn_seqc_write_begin(struct vnode *vp);
790 void vn_seqc_write_end_locked(struct vnode *vp);
791 void vn_seqc_write_end(struct vnode *vp);
792 #define vn_seqc_read_any(vp) seqc_read_any(&(vp)->v_seqc) argument
793 #define vn_seqc_read_notmodify(vp) seqc_read_notmodify(&(vp)->v_seqc) argument
794 #define vn_seqc_consistent(vp, seq) seqc_consistent(&(vp)->v_seqc, seq) argument
796 #define vn_rangelock_unlock(vp, cookie) \ argument
797 rangelock_unlock(&(vp)->v_rl, (cookie), VI_MTX(vp))
798 #define vn_rangelock_unlock_range(vp, cookie, start, end) \ argument
799 rangelock_unlock_range(&(vp)->v_rl, (cookie), (start), (end), \
800 VI_MTX(vp))
801 #define vn_rangelock_rlock(vp, start, end) \ argument
802 rangelock_rlock(&(vp)->v_rl, (start), (end), VI_MTX(vp))
803 #define vn_rangelock_tryrlock(vp, start, end) \ argument
804 rangelock_tryrlock(&(vp)->v_rl, (start), (end), VI_MTX(vp))
805 #define vn_rangelock_wlock(vp, start, end) \ argument
806 rangelock_wlock(&(vp)->v_rl, (start), (end), VI_MTX(vp))
807 #define vn_rangelock_trywlock(vp, start, end) \ argument
808 rangelock_trywlock(&(vp)->v_rl, (start), (end), VI_MTX(vp))
810 #define vn_irflag_read(vp) atomic_load_short(&(vp)->v_irflag) argument
811 void vn_irflag_set_locked(struct vnode *vp, short toset);
812 void vn_irflag_set(struct vnode *vp, short toset);
813 void vn_irflag_set_cond_locked(struct vnode *vp, short toset);
814 void vn_irflag_set_cond(struct vnode *vp, short toset);
815 void vn_irflag_unset_locked(struct vnode *vp, short tounset);
816 void vn_irflag_unset(struct vnode *vp, short tounset);
974 #define VOP_LOCK(vp, flags) VOP_LOCK1(vp, flags, __FILE__, __LINE__) argument
977 #define VOP_ADD_WRITECOUNT_CHECKED(vp, cnt) \ argument
981 error_ = VOP_ADD_WRITECOUNT((vp), (cnt)); \
982 VNASSERT(error_ == 0, (vp), ("VOP_ADD_WRITECOUNT returned %d", \
985 #define VOP_SET_TEXT_CHECKED(vp) \ argument
989 error_ = VOP_SET_TEXT((vp)); \
990 VNASSERT(error_ == 0, (vp), ("VOP_SET_TEXT returned %d", \
993 #define VOP_UNSET_TEXT_CHECKED(vp) \ argument
997 error_ = VOP_UNSET_TEXT((vp)); \
998 VNASSERT(error_ == 0, (vp), ("VOP_UNSET_TEXT returned %d", \
1002 #define VOP_ADD_WRITECOUNT_CHECKED(vp, cnt) VOP_ADD_WRITECOUNT((vp), (cnt)) argument
1003 #define VOP_SET_TEXT_CHECKED(vp) VOP_SET_TEXT((vp)) argument
1004 #define VOP_UNSET_TEXT_CHECKED(vp) VOP_UNSET_TEXT((vp)) argument
1007 #define VN_IS_DOOMED(vp) __predict_false((vn_irflag_read(vp) & VIRF_DOOMED) != 0) argument
1009 void vput(struct vnode *vp);
1010 void vrele(struct vnode *vp);
1011 void vref(struct vnode *vp);
1012 void vrefact(struct vnode *vp);
1013 void v_addpollinfo(struct vnode *vp);
1015 vrefcnt(struct vnode *vp) in vrefcnt() argument
1018 return (vp->v_usecount); in vrefcnt()
1021 #define vholdl(vp) do { \ argument
1022 ASSERT_VI_LOCKED(vp, __func__); \
1023 vhold(vp); \
1026 #define vrefl(vp) do { \ argument
1027 ASSERT_VI_LOCKED(vp, __func__); \
1028 vref(vp); \
1031 int vnode_create_vobject(struct vnode *vp, off_t size, struct thread *td);
1032 void vnode_destroy_vobject(struct vnode *vp);
1051 typedef int vfs_hash_cmp_t(struct vnode *vp, void *arg);
1056 u_int vfs_hash_index(struct vnode *vp);
1057 int vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct thread *td,
1061 void vfs_hash_rehash(struct vnode *vp, u_int hash);
1062 void vfs_hash_remove(struct vnode *vp);
1067 int vfs_emptydir(struct vnode *vp);
1071 void vfs_unp_reclaim(struct vnode *vp);
1073 int setfmode(struct thread *td, struct ucred *cred, struct vnode *vp, int mode);
1074 int setfown(struct thread *td, struct ucred *cred, struct vnode *vp, uid_t uid,
1081 void vn_fsid(struct vnode *vp, struct vattr *va);
1083 int vn_dir_check_exec(struct vnode *vp, struct componentname *cnp);
1085 #define VOP_UNLOCK_FLAGS(vp, flags) ({ \ argument
1086 struct vnode *_vp = (vp); \
1115 #define vn_load_v_data_smr(vp) ({ \ argument
1116 struct vnode *_vp = (vp); \