int VOP_STRATEGY(struct buf *bp) { struct vop_strategy_args a; a.a_desc = VDESC(vop_strategy); a.a_bp = bp; return (VCALL(bp->b_vp, VOFFSET(vop_strategy), &a)); }
int VOP_PRINT(struct vnode *vp) { struct vop_print_args a; a.a_desc = VDESC(vop_print); a.a_vp = vp; return (VCALL(vp, VOFFSET(vop_print), &a)); }
int VOP_BWRITE(struct buf *bp) { struct vop_bwrite_args a; a.a_desc = VDESC(vop_bwrite); a.a_bp = bp; return (VCALL(bp->b_vp, VOFFSET(vop_bwrite), &a)); }
int VOP_GETPAGES(struct vnode *vp, voff_t offset, struct vm_page **m, int *count, int centeridx, vm_prot_t access_type, int advice, int flags) { int error; bool mpsafe; struct vop_getpages_args a; a.a_desc = VDESC(vop_getpages); a.a_vp = vp; a.a_offset = offset; a.a_m = m; a.a_count = count; a.a_centeridx = centeridx; a.a_access_type = access_type; a.a_advice = advice; a.a_flags = flags; mpsafe = (vp->v_vflag & VV_MPSAFE); if (!mpsafe) { KERNEL_LOCK(1, curlwp); } error = (VCALL(vp, VOFFSET(vop_getpages), &a)); if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); } return error; }
int VOP_SYMLINK(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap, char *target) { int error; bool mpsafe; struct vop_symlink_v3_args a; a.a_desc = VDESC(vop_symlink); a.a_dvp = dvp; a.a_vpp = vpp; a.a_cnp = cnp; a.a_vap = vap; a.a_target = target; mpsafe = (dvp->v_vflag & VV_MPSAFE); if (!mpsafe) { KERNEL_LOCK(1, curlwp); } error = (VCALL(dvp, VOFFSET(vop_symlink), &a)); if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); } #ifdef DIAGNOSTIC if (error == 0) KASSERT((*vpp)->v_size != VSIZENOTSET && (*vpp)->v_writesize != VSIZENOTSET); #endif /* DIAGNOSTIC */ return error; }
int VOP_ISLOCKED(struct vnode *vp) { struct vop_islocked_args a; a.a_desc = VDESC(vop_islocked); a.a_vp = vp; return (VCALL(vp, VOFFSET(vop_islocked), &a)); }
int VOP_RECLAIM(struct vnode *vp, struct proc *p) { struct vop_reclaim_args a; a.a_desc = VDESC(vop_reclaim); a.a_vp = vp; a.a_p = p; return (VCALL(vp, VOFFSET(vop_reclaim), &a)); }
int VOP_REVOKE(struct vnode *vp, int flags) { struct vop_revoke_args a; a.a_desc = VDESC(vop_revoke); a.a_vp = vp; a.a_flags = flags; return (VCALL(vp, VOFFSET(vop_revoke), &a)); }
int VOP_KQFILTER(struct vnode *vp, struct knote *kn) { struct vop_kqfilter_args a; a.a_desc = VDESC(vop_kqfilter); a.a_vp = vp; a.a_kn = kn; return (VCALL(vp, VOFFSET(vop_kqfilter), &a)); }
int VOP_ABORTOP(struct vnode *dvp, struct componentname *cnp) { struct vop_abortop_args a; a.a_desc = VDESC(vop_abortop); a.a_dvp = dvp; a.a_cnp = cnp; return (VCALL(dvp, VOFFSET(vop_abortop), &a)); }
int VOP_UNLOCK(struct vnode *vp, int flags, struct proc *p) { struct vop_unlock_args a; a.a_desc = VDESC(vop_unlock); a.a_vp = vp; a.a_flags = flags; a.a_p = p; return (VCALL(vp, VOFFSET(vop_unlock), &a)); }
int VOP_POLL(struct vnode *vp, int events, struct proc *p) { struct vop_poll_args a; a.a_desc = VDESC(vop_poll); a.a_vp = vp; a.a_events = events; a.a_p = p; return (VCALL(vp, VOFFSET(vop_poll), &a)); }
int VOP_OPEN(struct vnode *vp, int mode, struct ucred *cred, struct proc *p) { struct vop_open_args a; a.a_desc = VDESC(vop_open); a.a_vp = vp; a.a_mode = mode; a.a_cred = cred; a.a_p = p; return (VCALL(vp, VOFFSET(vop_open), &a)); }
int VOP_LOOKUP(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) { struct vop_lookup_args a; a.a_desc = VDESC(vop_lookup); a.a_dvp = dvp; a.a_vpp = vpp; a.a_cnp = cnp; return (VCALL(dvp, VOFFSET(vop_lookup), &a)); }
int VOP_ADVLOCK(struct vnode *vp, void *id, int op, struct flock *fl, int flags) { struct vop_advlock_args a; a.a_desc = VDESC(vop_advlock); a.a_vp = vp; a.a_id = id; a.a_op = op; a.a_fl = fl; a.a_flags = flags; return (VCALL(vp, VOFFSET(vop_advlock), &a)); }
int VOP_GETATTR(struct vnode *vp, struct vattr *vap, struct ucred *cred, struct proc *p) { struct vop_getattr_args a; a.a_desc = VDESC(vop_getattr); a.a_vp = vp; a.a_vap = vap; a.a_cred = cred; a.a_p = p; return (VCALL(vp, VOFFSET(vop_getattr), &a)); }
int VOP_REALLOCBLKS(struct vnode *vp, struct cluster_save *buflist) { struct vop_reallocblks_args a; a.a_desc = VDESC(vop_reallocblks); a.a_vp = vp; #ifdef VFSDEBUG if ((vp->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp)) panic("vop_reallocblks: vp"); #endif a.a_buflist = buflist; return (VCALL(vp, VOFFSET(vop_reallocblks), &a)); }
int VOP_INACTIVE(struct vnode *vp, struct proc *p) { struct vop_inactive_args a; a.a_desc = VDESC(vop_inactive); a.a_vp = vp; #ifdef VFSDEBUG if ((vp->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp)) panic("vop_inactive: vp"); #endif a.a_p = p; return (VCALL(vp, VOFFSET(vop_inactive), &a)); }
int VOP_LINK(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) { struct vop_link_args a; a.a_desc = VDESC(vop_link); a.a_dvp = dvp; #ifdef VFSDEBUG if ((dvp->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(dvp)) panic("vop_link: dvp"); #endif a.a_vp = vp; a.a_cnp = cnp; return (VCALL(dvp, VOFFSET(vop_link), &a)); }
int VOP_PATHCONF(struct vnode *vp, int name, register_t *retval) { struct vop_pathconf_args a; a.a_desc = VDESC(vop_pathconf); a.a_vp = vp; #ifdef VFSDEBUG if ((vp->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp)) panic("vop_pathconf: vp"); #endif a.a_name = name; a.a_retval = retval; return (VCALL(vp, VOFFSET(vop_pathconf), &a)); }
int VOP_IOCTL(struct vnode *vp, u_long command, void *data, int fflag, struct ucred *cred, struct proc *p) { struct vop_ioctl_args a; a.a_desc = VDESC(vop_ioctl); a.a_vp = vp; a.a_command = command; a.a_data = data; a.a_fflag = fflag; a.a_cred = cred; a.a_p = p; return (VCALL(vp, VOFFSET(vop_ioctl), &a)); }
int VOP_CLOSE(struct vnode *vp, int fflag, struct ucred *cred, struct proc *p) { struct vop_close_args a; a.a_desc = VDESC(vop_close); a.a_vp = vp; #ifdef VFSDEBUG if ((vp->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp)) panic("vop_close: vp"); #endif a.a_fflag = fflag; a.a_cred = cred; a.a_p = p; return (VCALL(vp, VOFFSET(vop_close), &a)); }
int lfs_bwrite_log(struct buf *bp, const char *file, int line) { struct vop_bwrite_args a; a.a_desc = VDESC(vop_bwrite); a.a_bp = bp; if (!(bp->b_flags & B_GATHERED) && !(bp->b_oflags & BO_DELWRI)) { LFS_ENTER_LOG("write", file, line, bp->b_lblkno, bp->b_flags, curproc->p_pid); } return (VCALL(bp->b_vp, VOFFSET(vop_bwrite), &a)); }
int VOP_ACCESS(struct vnode *vp, int mode, struct ucred *cred, struct proc *p) { struct vop_access_args a; a.a_desc = VDESC(vop_access); a.a_vp = vp; #ifdef VFSDEBUG if ((vp->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp)) panic("vop_access: vp"); #endif a.a_mode = mode; a.a_cred = cred; a.a_p = p; return (VCALL(vp, VOFFSET(vop_access), &a)); }
int VOP_READ(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) { struct vop_read_args a; a.a_desc = VDESC(vop_read); a.a_vp = vp; #ifdef VFSDEBUG if ((vp->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp)) panic("vop_read: vp"); #endif a.a_uio = uio; a.a_ioflag = ioflag; a.a_cred = cred; return (VCALL(vp, VOFFSET(vop_read), &a)); }
int VOP_ISLOCKED(struct vnode *vp) { int error; bool mpsafe; struct vop_islocked_args a; a.a_desc = VDESC(vop_islocked); a.a_vp = vp; mpsafe = (vp->v_vflag & VV_MPSAFE); if (!mpsafe) { KERNEL_LOCK(1, curlwp); } error = (VCALL(vp, VOFFSET(vop_islocked), &a)); if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); } return error; }
int VOP_FSYNC(struct vnode *vp, struct ucred *cred, int waitfor, struct proc *p) { struct vop_fsync_args a; a.a_desc = VDESC(vop_fsync); a.a_vp = vp; #ifdef VFSDEBUG if ((vp->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp)) panic("vop_fsync: vp"); #endif a.a_cred = cred; a.a_waitfor = waitfor; a.a_p = p; return (VCALL(vp, VOFFSET(vop_fsync), &a)); }
int VOP_CREATE(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap) { struct vop_create_args a; a.a_desc = VDESC(vop_create); a.a_dvp = dvp; #ifdef VFSDEBUG if ((dvp->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(dvp)) panic("vop_create: dvp"); #endif a.a_vpp = vpp; a.a_cnp = cnp; a.a_vap = vap; return (VCALL(dvp, VOFFSET(vop_create), &a)); }
int VOP_SETATTR(struct vnode *vp, struct vattr *vap, struct ucred *cred, struct proc *p) { struct vop_setattr_args a; a.a_desc = VDESC(vop_setattr); a.a_vp = vp; #ifdef VFSDEBUG if ((vp->v_flag & VLOCKSWORK) && !VOP_ISLOCKED(vp)) panic("vop_setattr: vp"); #endif a.a_vap = vap; a.a_cred = cred; a.a_p = p; return (VCALL(vp, VOFFSET(vop_setattr), &a)); }
int VOP_BWRITE(struct vnode *vp, struct buf *bp) { int error; bool mpsafe; struct vop_bwrite_args a; a.a_desc = VDESC(vop_bwrite); a.a_vp = vp; a.a_bp = bp; mpsafe = (vp->v_vflag & VV_MPSAFE); if (!mpsafe) { KERNEL_LOCK(1, curlwp); } error = (VCALL(vp, VOFFSET(vop_bwrite), &a)); if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); } return error; }