int tmpfs_spec_write(void *v) { struct vop_write_args /* { struct vnode *a_vp; struct uio *a_uio; int a_ioflag; kauth_cred_t a_cred; } */ *ap = v; vnode_t *vp = ap->a_vp; tmpfs_update(vp, TMPFS_UPDATE_MTIME); return VOCALL(spec_vnodeop_p, VOFFSET(vop_write), v); }
int tmpfs_fifo_write(void *v) { struct vop_write_args /* { struct vnode *a_vp; struct uio *a_uio; int a_ioflag; kauth_cred_t a_cred; } */ *ap = v; vnode_t *vp = ap->a_vp; VP_TO_TMPFS_NODE(vp)->tn_status |= TMPFS_NODE_MODIFIED; return VOCALL(fifo_vnodeop_p, VOFFSET(vop_write), v); }
static int devfsspec_read(struct vnop_read_args *ap) /* struct vnop_read_args { struct vnode *a_vp; struct uio *a_uio; int a_ioflag; kauth_cred_t a_cred; } */ { register devnode_t * dnp = VTODN(ap->a_vp); dnp->dn_access = 1; return (VOCALL (spec_vnodeop_p, VOFFSET(vnop_read), ap)); }
/* * Close wrapper for fifo's. * * Update the times on the inode then do device close. */ int ufsfifo_close(void *v) { struct vop_close_args /* { struct vnode *a_vp; int a_fflag; kauth_cred_t a_cred; } */ *ap = v; struct vnode *vp; vp = ap->a_vp; if (ap->a_vp->v_usecount > 1) UFS_ITIMES(vp, NULL, NULL, NULL); return (VOCALL (fifo_vnodeop_p, VOFFSET(vop_close), ap)); }
/* ARGSUSED */ int mfs_inactive(void *v) { struct vop_inactive_args /* { struct vnode *a_vp; } */ *ap = v; struct vnode *vp = ap->a_vp; struct mfsnode *mfsp = VTOMFS(vp); if (bufq_peek(mfsp->mfs_buflist) != NULL) panic("mfs_inactive: not inactive (mfs_buflist %p)", bufq_peek(mfsp->mfs_buflist)); return VOCALL(spec_vnodeop_p, VOFFSET(vop_inactive), ap); }
static int devfsspec_write(struct vnop_write_args *ap) /* struct vnop_write_args { struct vnode *a_vp; struct uio *a_uio; int a_ioflag; vfs_context_t a_context; } */ { register devnode_t * dnp = VTODN(ap->a_vp); dnp->dn_change = 1; dnp->dn_update = 1; return (VOCALL (spec_vnodeop_p, VOFFSET(vnop_write), ap)); }
/* * Write wrapper for fifo's. */ int ufsfifo_write(void *v) { struct vop_write_args /* { struct vnode *a_vp; struct uio *a_uio; int a_ioflag; kauth_cred_t a_cred; } */ *ap = v; /* * Set update and change flags. */ VTOI(ap->a_vp)->i_flag |= IN_MODIFY; return (VOCALL (fifo_vnodeop_p, VOFFSET(vop_write), ap)); }
/* * Read wrapper for fifo's */ int ufsfifo_read(void *v) { struct vop_read_args /* { struct vnode *a_vp; struct uio *a_uio; int a_ioflag; kauth_cred_t a_cred; } */ *ap = v; /* * Set access flag. */ VTOI(ap->a_vp)->i_flag |= IN_ACCESS; return (VOCALL (fifo_vnodeop_p, VOFFSET(vop_read), ap)); }
/* * Write wrapper for special devices. */ int ufsspec_write(void *v) { struct vop_write_args /* { struct vnode *a_vp; struct uio *a_uio; int a_ioflag; kauth_cred_t a_cred; } */ *ap = v; /* * Set update and change flags. */ if ((ap->a_vp->v_mount->mnt_flag & MNT_NODEVMTIME) == 0) VTOI(ap->a_vp)->i_flag |= IN_MODIFY; return (VOCALL (spec_vnodeop_p, VOFFSET(vop_write), ap)); }
/* * Read wrapper for special devices. */ int ufsspec_read(void *v) { struct vop_read_args /* { struct vnode *a_vp; struct uio *a_uio; int a_ioflag; kauth_cred_t a_cred; } */ *ap = v; /* * Set access flag. */ if ((ap->a_vp->v_mount->mnt_flag & MNT_NODEVMTIME) == 0) VTOI(ap->a_vp)->i_flag |= IN_ACCESS; return (VOCALL (spec_vnodeop_p, VOFFSET(vop_read), ap)); }
static int devfsspec_close(struct vnop_close_args *ap) /* struct vnop_close_args { struct vnode *a_vp; int a_fflag; vfs_context_t a_context; } */ { struct vnode * vp = ap->a_vp; register devnode_t * dnp; struct timeval now; if (vnode_isinuse(vp, 1)) { DEVFS_LOCK(); microtime(&now); dnp = VTODN(vp); dn_times(dnp, &now, &now, &now); DEVFS_UNLOCK(); } return (VOCALL (spec_vnodeop_p, VOFFSET(vnop_close), ap)); }
/* * Reclaim a memory filesystem devvp so that it can be reused. */ int mfs_reclaim(void *v) { struct vop_reclaim_args /* { struct vnode *a_vp; } */ *ap = v; struct vnode *vp = ap->a_vp; struct mfsnode *mfsp = VTOMFS(vp); int refcnt; mutex_enter(&mfs_lock); vp->v_data = NULL; refcnt = --mfsp->mfs_refcnt; mutex_exit(&mfs_lock); if (refcnt == 0) { bufq_free(mfsp->mfs_buflist); cv_destroy(&mfsp->mfs_cv); kmem_free(mfsp, sizeof(*mfsp)); } return VOCALL(spec_vnodeop_p, VOFFSET(vop_reclaim), ap); }
int vop_defaultop(struct vop_generic_args *ap) { return (VOCALL(&default_vnode_vops, ap)); }