Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/vnode.h
Show First 20 Lines • Show All 660 Lines • ▼ Show 20 Lines | |||||
struct vnode * | struct vnode * | ||||
vn_dir_dd_ino(struct vnode *vp); | vn_dir_dd_ino(struct vnode *vp); | ||||
int vn_commname(struct vnode *vn, char *buf, u_int buflen); | int vn_commname(struct vnode *vn, char *buf, u_int buflen); | ||||
int vn_path_to_global_path(struct thread *td, struct vnode *vp, | int vn_path_to_global_path(struct thread *td, struct vnode *vp, | ||||
char *path, u_int pathlen); | char *path, u_int pathlen); | ||||
int vaccess(enum vtype type, mode_t file_mode, uid_t file_uid, | int vaccess(enum vtype type, mode_t file_mode, uid_t file_uid, | ||||
gid_t file_gid, accmode_t accmode, struct ucred *cred, | gid_t file_gid, accmode_t accmode, struct ucred *cred, | ||||
int *privused); | int *privused); | ||||
int vaccess_vexec_smr(mode_t file_mode, uid_t file_uid, gid_t file_gid, | |||||
struct ucred *cred); | |||||
int vaccess_acl_nfs4(enum vtype type, uid_t file_uid, gid_t file_gid, | int vaccess_acl_nfs4(enum vtype type, uid_t file_uid, gid_t file_gid, | ||||
struct acl *aclp, accmode_t accmode, struct ucred *cred, | struct acl *aclp, accmode_t accmode, struct ucred *cred, | ||||
int *privused); | int *privused); | ||||
int vaccess_acl_posix1e(enum vtype type, uid_t file_uid, | int vaccess_acl_posix1e(enum vtype type, uid_t file_uid, | ||||
gid_t file_gid, struct acl *acl, accmode_t accmode, | gid_t file_gid, struct acl *acl, accmode_t accmode, | ||||
struct ucred *cred, int *privused); | struct ucred *cred, int *privused); | ||||
void vattr_null(struct vattr *vap); | void vattr_null(struct vattr *vap); | ||||
int vcount(struct vnode *vp); | int vcount(struct vnode *vp); | ||||
void vlazy(struct vnode *); | void vlazy(struct vnode *); | ||||
void vdrop(struct vnode *); | void vdrop(struct vnode *); | ||||
void vdropl(struct vnode *); | void vdropl(struct vnode *); | ||||
int vflush(struct mount *mp, int rootrefs, int flags, struct thread *td); | int vflush(struct mount *mp, int rootrefs, int flags, struct thread *td); | ||||
int vget(struct vnode *vp, int flags, struct thread *td); | int vget(struct vnode *vp, int flags, struct thread *td); | ||||
enum vgetstate vget_prep_smr(struct vnode *vp); | enum vgetstate vget_prep_smr(struct vnode *vp); | ||||
enum vgetstate vget_prep(struct vnode *vp); | enum vgetstate vget_prep(struct vnode *vp); | ||||
int vget_finish(struct vnode *vp, int flags, enum vgetstate vs); | int vget_finish(struct vnode *vp, int flags, enum vgetstate vs); | ||||
void vget_finish_ref(struct vnode *vp, enum vgetstate vs); | |||||
void vget_abort(struct vnode *vp, enum vgetstate vs); | |||||
void vgone(struct vnode *vp); | void vgone(struct vnode *vp); | ||||
void vhold(struct vnode *); | void vhold(struct vnode *); | ||||
void vholdl(struct vnode *); | void vholdl(struct vnode *); | ||||
void vholdnz(struct vnode *); | void vholdnz(struct vnode *); | ||||
bool vhold_smr(struct vnode *); | bool vhold_smr(struct vnode *); | ||||
void vinactive(struct vnode *vp); | void vinactive(struct vnode *vp); | ||||
int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo); | int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo); | ||||
int vtruncbuf(struct vnode *vp, off_t length, int blksize); | int vtruncbuf(struct vnode *vp, off_t length, int blksize); | ||||
▲ Show 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | |||||
void vop_setacl_post(void *a, int rc); | void vop_setacl_post(void *a, int rc); | ||||
void vop_setextattr_pre(void *a); | void vop_setextattr_pre(void *a); | ||||
void vop_setextattr_post(void *a, int rc); | void vop_setextattr_post(void *a, int rc); | ||||
void vop_symlink_pre(void *a); | void vop_symlink_pre(void *a); | ||||
void vop_symlink_post(void *a, int rc); | void vop_symlink_post(void *a, int rc); | ||||
int vop_sigdefer(struct vop_vector *vop, struct vop_generic_args *a); | int vop_sigdefer(struct vop_vector *vop, struct vop_generic_args *a); | ||||
#ifdef DEBUG_VFS_LOCKS | #ifdef DEBUG_VFS_LOCKS | ||||
void vop_fplookup_vexec_pre(void *a); | |||||
void vop_fplookup_vexec_post(void *a, int rc); | |||||
void vop_strategy_pre(void *a); | void vop_strategy_pre(void *a); | ||||
void vop_lock_pre(void *a); | void vop_lock_pre(void *a); | ||||
void vop_lock_post(void *a, int rc); | void vop_lock_post(void *a, int rc); | ||||
void vop_unlock_pre(void *a); | void vop_unlock_pre(void *a); | ||||
void vop_need_inactive_pre(void *a); | void vop_need_inactive_pre(void *a); | ||||
void vop_need_inactive_post(void *a, int rc); | void vop_need_inactive_post(void *a, int rc); | ||||
#else | #else | ||||
#define vop_fplookup_vexec_pre(x) do { } while (0) | |||||
#define vop_fplookup_vexec_post(x, y) do { } while (0) | |||||
#define vop_strategy_pre(x) do { } while (0) | #define vop_strategy_pre(x) do { } while (0) | ||||
#define vop_lock_pre(x) do { } while (0) | #define vop_lock_pre(x) do { } while (0) | ||||
#define vop_lock_post(x, y) do { } while (0) | #define vop_lock_post(x, y) do { } while (0) | ||||
#define vop_unlock_pre(x) do { } while (0) | #define vop_unlock_pre(x) do { } while (0) | ||||
#define vop_need_inactive_pre(x) do { } while (0) | #define vop_need_inactive_pre(x) do { } while (0) | ||||
#define vop_need_inactive_post(x, y) do { } while (0) | #define vop_need_inactive_post(x, y) do { } while (0) | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 137 Lines • ▼ Show 20 Lines | SYSINIT(vfs_vector_##vnodeops##_f, SI_SUB_VFS, SI_ORDER_ANY, \ | ||||
vfs_vector_op_register, &vnodeops) | vfs_vector_op_register, &vnodeops) | ||||
#define VFS_SMR_DECLARE \ | #define VFS_SMR_DECLARE \ | ||||
extern smr_t vfs_smr | extern smr_t vfs_smr | ||||
#define VFS_SMR() vfs_smr | #define VFS_SMR() vfs_smr | ||||
#define vfs_smr_enter() smr_enter(VFS_SMR()) | #define vfs_smr_enter() smr_enter(VFS_SMR()) | ||||
#define vfs_smr_exit() smr_exit(VFS_SMR()) | #define vfs_smr_exit() smr_exit(VFS_SMR()) | ||||
#define vfs_smr_entered_load(ptr) smr_entered_load((ptr), VFS_SMR()) | |||||
#define VFS_SMR_ASSERT_ENTERED() SMR_ASSERT_ENTERED(VFS_SMR()) | #define VFS_SMR_ASSERT_ENTERED() SMR_ASSERT_ENTERED(VFS_SMR()) | ||||
#define VFS_SMR_ASSERT_NOT_ENTERED() SMR_ASSERT_NOT_ENTERED(VFS_SMR()) | #define VFS_SMR_ASSERT_NOT_ENTERED() SMR_ASSERT_NOT_ENTERED(VFS_SMR()) | ||||
#define VFS_SMR_ZONE_SET(zone) uma_zone_set_smr((zone), VFS_SMR()) | #define VFS_SMR_ZONE_SET(zone) uma_zone_set_smr((zone), VFS_SMR()) | ||||
#define vn_load_v_data_smr(vp) ({ \ | |||||
struct vnode *_vp = (vp); \ | |||||
\ | |||||
VFS_SMR_ASSERT_ENTERED(); \ | |||||
atomic_load_ptr(&(_vp)->v_data); \ | |||||
}) | |||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* !_SYS_VNODE_H_ */ | #endif /* !_SYS_VNODE_H_ */ |