Example #1
0
int
VOP_RMDIR(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
{
	struct vop_rmdir_args a;
	a.a_dvp = dvp;
	a.a_vp = vp;
	a.a_cnp = cnp;

	ASSERT_VP_ISLOCKED(dvp);
	ASSERT_VP_ISLOCKED(vp);

	if (dvp->v_op->vop_rmdir == NULL)
		return (EOPNOTSUPP);

	return ((dvp->v_op->vop_rmdir)(&a));
}
Example #2
0
int
VOP_INACTIVE(struct vnode *vp)
{
	struct vop_inactive_args a;
	a.a_vp = vp;

	ASSERT_VP_ISLOCKED(vp);

	if (vp->v_op->vop_inactive == NULL)
		return (EOPNOTSUPP);

	return ((vp->v_op->vop_inactive)(&a));
}
Example #3
0
int
VOP_REALLOCBLKS(struct vnode *vp, struct cluster_save *buflist)
{
	struct vop_reallocblks_args a;
	a.a_vp = vp;
	a.a_buflist = buflist;

	ASSERT_VP_ISLOCKED(vp);

	if (vp->v_op->vop_reallocblks == NULL)
		return (EOPNOTSUPP);

	return ((vp->v_op->vop_reallocblks)(&a));
}
Example #4
0
int
VOP_PATHCONF(struct vnode *vp, int name, register_t *retval)
{
	struct vop_pathconf_args a;
	a.a_vp = vp;
	a.a_name = name;
	a.a_retval = retval;

	ASSERT_VP_ISLOCKED(vp);

	if (vp->v_op->vop_pathconf == NULL)
		return (EOPNOTSUPP);

	return ((vp->v_op->vop_pathconf)(&a));
}
Example #5
0
int
VOP_READLINK(struct vnode *vp, struct uio *uio, struct ucred *cred)
{
	struct vop_readlink_args a;
	a.a_vp = vp;
	a.a_uio = uio;
	a.a_cred = cred;

	ASSERT_VP_ISLOCKED(vp);

	if (vp->v_op->vop_readlink == NULL)
		return (EOPNOTSUPP);

	return ((vp->v_op->vop_readlink)(&a));
}
Example #6
0
int
VOP_LINK(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
{
	struct vop_link_args a;
	a.a_dvp = dvp;
	a.a_vp = vp;
	a.a_cnp = cnp;

	ASSERT_VP_ISLOCKED(dvp);

	if (dvp->v_op->vop_link == NULL)
		return (EOPNOTSUPP);

	return ((dvp->v_op->vop_link)(&a));
}
Example #7
0
int
VOP_FSYNC(struct vnode *vp, struct ucred *cred, int waitfor)
{
	struct vop_fsync_args a;
	a.a_vp = vp;
	a.a_cred = cred;
	a.a_waitfor = waitfor;

	ASSERT_VP_ISLOCKED(vp);

	if (vp->v_op->vop_fsync == NULL)
		return (EOPNOTSUPP);

	return ((vp->v_op->vop_fsync)(&a));
}
Example #8
0
int
VOP_SETATTR(struct vnode *vp, struct vattr *vap, struct ucred *cred)
{
	struct vop_setattr_args a;
	a.a_vp = vp;
	a.a_vap = vap;
	a.a_cred = cred;

	ASSERT_VP_ISLOCKED(vp);

	if (vp->v_op->vop_setattr == NULL)
		return (EOPNOTSUPP);

	return ((vp->v_op->vop_setattr)(&a));
}
Example #9
0
int
VOP_ACCESS(struct vnode *vp, int mode, struct ucred *cred)
{
	struct vop_access_args a;
	a.a_vp = vp;
	a.a_mode = mode;
	a.a_cred = cred;

	ASSERT_VP_ISLOCKED(vp);

	if (vp->v_op->vop_access == NULL)
		return (EOPNOTSUPP);

	return ((vp->v_op->vop_access)(&a));
}
Example #10
0
int
VOP_CLOSE(struct vnode *vp, int fflag, struct ucred *cred)
{
	struct vop_close_args a;
	a.a_vp = vp;
	a.a_fflag = fflag;
	a.a_cred = cred;

	ASSERT_VP_ISLOCKED(vp);

	if (vp->v_op->vop_close == NULL)
		return (EOPNOTSUPP);

	return ((vp->v_op->vop_close)(&a));
}
Example #11
0
int
VOP_READ(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
{
	struct vop_read_args a;
	a.a_vp = vp;
	a.a_uio = uio;
	a.a_ioflag = ioflag;
	a.a_cred = cred;

	ASSERT_VP_ISLOCKED(vp);

	if (vp->v_op->vop_read == NULL)
		return (EOPNOTSUPP);

	return ((vp->v_op->vop_read)(&a));
}
Example #12
0
int
VOP_CREATE(struct vnode *dvp, struct vnode **vpp, 
    struct componentname *cnp, struct vattr *vap)
{
	struct vop_create_args a;
	a.a_dvp = dvp;
	a.a_vpp = vpp;
	a.a_cnp = cnp;
	a.a_vap = vap;

	ASSERT_VP_ISLOCKED(dvp);

	if (dvp->v_op->vop_create == NULL)
		return (EOPNOTSUPP);

	return ((dvp->v_op->vop_create)(&a));
}
Example #13
0
int
VOP_BMAP(struct vnode *vp, daddr64_t bn, struct vnode **vpp, 
    daddr64_t *bnp, int *runp)
{
	struct vop_bmap_args a;
	a.a_vp = vp;
	a.a_bn = bn;
	a.a_vpp = vpp;
	a.a_bnp = bnp;
	a.a_runp = runp;

	ASSERT_VP_ISLOCKED(vp);

	if (vp->v_op->vop_bmap == NULL)
		return (EOPNOTSUPP);

	return ((vp->v_op->vop_bmap)(&a));
}
Example #14
0
int
VOP_SYMLINK(struct vnode *dvp, struct vnode **vpp, 
    struct componentname *cnp, struct vattr *vap, char *target)
{
	struct vop_symlink_args a;
	a.a_dvp = dvp;
	a.a_vpp = vpp;
	a.a_cnp = cnp;
	a.a_vap = vap;
	a.a_target = target;

	ASSERT_VP_ISLOCKED(dvp);

	if (dvp->v_op->vop_symlink == NULL)
		return (EOPNOTSUPP);

	return ((dvp->v_op->vop_symlink)(&a));
}
Example #15
0
int
VOP_READDIR(struct vnode *vp, struct uio *uio, struct ucred *cred, 
    int *eofflag, int *ncookies, u_long **cookies)
{
	struct vop_readdir_args a;
	a.a_vp = vp;
	a.a_uio = uio;
	a.a_cred = cred;
	a.a_eofflag = eofflag;
	a.a_ncookies = ncookies;
	a.a_cookies = cookies;

	ASSERT_VP_ISLOCKED(vp);

	if (vp->v_op->vop_readdir == NULL)
		return (EOPNOTSUPP);

	return ((vp->v_op->vop_readdir)(&a));
}
Example #16
0
int
VOP_RENAME(struct vnode *fdvp, struct vnode *fvp, 
    struct componentname *fcnp, struct vnode *tdvp, struct vnode *tvp, 
    struct componentname *tcnp)
{
	struct vop_rename_args a;
	a.a_fdvp = fdvp;
	a.a_fvp = fvp;
	a.a_fcnp = fcnp;
	a.a_tdvp = tdvp;
	a.a_tvp = tvp;
	a.a_tcnp = tcnp;

	ASSERT_VP_ISLOCKED(tdvp);

	if (fdvp->v_op->vop_rename == NULL) 
		return (EOPNOTSUPP);

	return ((fdvp->v_op->vop_rename)(&a));
}