xref: /csrg-svn/sys/miscfs/fdesc/fdesc_vnops.c (revision 54049)
153838Spendry /*
253838Spendry  * Copyright (c) 1992 The Regents of the University of California
353838Spendry  * Copyright (c) 1990, 1992 Jan-Simon Pendry
453838Spendry  * All rights reserved.
553838Spendry  *
653838Spendry  * This code is derived from software donated to Berkeley by
753838Spendry  * Jan-Simon Pendry.
853838Spendry  *
953838Spendry  * %sccs.include.redist.c%
1053838Spendry  *
11*54049Spendry  *	@(#)fdesc_vnops.c	1.2 (Berkeley) 06/18/92
1253838Spendry  *
1353838Spendry  * $Id: fdesc_vnops.c,v 1.7 1992/05/30 10:05:34 jsp Exp jsp $
1453838Spendry  */
1553838Spendry 
1653838Spendry /*
1753838Spendry  * /dev/fd Filesystem
1853838Spendry  */
1953838Spendry 
2053838Spendry #include <sys/param.h>
2153838Spendry #include <sys/systm.h>
2253838Spendry #include <sys/types.h>
2353838Spendry #include <sys/time.h>
2453838Spendry #include <sys/proc.h>
2553838Spendry #include <sys/resourcevar.h>
2653838Spendry #include <sys/filedesc.h>
2753838Spendry #include <sys/vnode.h>
2853838Spendry #include <sys/malloc.h>
2953838Spendry #include <sys/file.h>
3053838Spendry #include <sys/stat.h>
3153838Spendry #include <sys/mount.h>
3253838Spendry #include <sys/namei.h>
3353838Spendry #include <sys/buf.h>
3453838Spendry #include <fdesc/fdesc.h>
3553838Spendry 
3653838Spendry /*
3753838Spendry  * vp is the current namei directory
3853838Spendry  * ndp is the name to locate in that directory...
3953838Spendry  */
4053838Spendry fdesc_lookup (ap)
4153838Spendry 	struct vop_lookup_args *ap;
4253838Spendry {
4353838Spendry 	/*USES_VOP_LOCK;*/
44*54049Spendry 	struct vnode **vpp = ap->a_vpp;
45*54049Spendry 	struct vnode *dvp = ap->a_dvp;
4653838Spendry 	char *pname;
4753838Spendry 	struct proc *p;
4853838Spendry 	int nfiles;
4953838Spendry 	unsigned fd;
5053838Spendry 	int error;
5153838Spendry 	struct vnode *fvp;
5253838Spendry 
5353838Spendry #ifdef FDESC_DIAGNOSTIC
5453838Spendry 	printf("fdesc_lookup(%x)\n", ap);
55*54049Spendry 	printf("fdesc_lookup(dp = %x, vpp = %x, cnp = %x)\n", dvp, vpp, ap->a_cnp);
5653838Spendry #endif
5753838Spendry 	pname = ap->a_cnp->cn_nameptr;
5853838Spendry #ifdef FDESC_DIAGNOSTIC
5953838Spendry 	printf("fdesc_lookup(%s)\n", pname);
6053838Spendry #endif
6153838Spendry 	if (ap->a_cnp->cn_namelen == 1 && *pname == '.') {
62*54049Spendry 		*vpp = dvp;
63*54049Spendry 		VREF(dvp);
64*54049Spendry 		/*VOP_LOCK(dvp);*/
6553838Spendry 		return (0);
6653838Spendry 	}
6753838Spendry 
6853838Spendry 	p = ap->a_cnp->cn_proc;
6953838Spendry 	nfiles = p->p_fd->fd_nfiles;
7053838Spendry 
7153838Spendry 	fd = 0;
7253838Spendry 	while (*pname >= '0' && *pname <= '9') {
7353838Spendry 		fd = 10 * fd + *pname++ - '0';
7453838Spendry 		if (fd >= nfiles)
7553838Spendry 			break;
7653838Spendry 	}
7753838Spendry 
7853838Spendry #ifdef FDESC_DIAGNOSTIC
7953838Spendry 	printf("fdesc_lookup: fd = %d, *pname = %x\n", fd, *pname);
8053838Spendry #endif
8153838Spendry 	if (*pname != '\0') {
8253838Spendry 		error = ENOENT;
8353838Spendry 		goto bad;
8453838Spendry 	}
8553838Spendry 
8653838Spendry 	if (fd >= nfiles || p->p_fd->fd_ofiles[fd] == NULL) {
8753838Spendry 		error = EBADF;
8853838Spendry 		goto bad;
8953838Spendry 	}
9053838Spendry 
9153838Spendry #ifdef FDESC_DIAGNOSTIC
9253838Spendry 	printf("fdesc_lookup: allocate new vnode\n");
9353838Spendry #endif
94*54049Spendry 	error = getnewvnode(VT_UFS, dvp->v_mount, fdesc_vnodeop_p, &fvp);
9553838Spendry 	if (error)
9653838Spendry 		goto bad;
9753838Spendry 	MALLOC(fvp->v_data, void *, sizeof(struct fdescnode), M_TEMP, M_WAITOK);
9853838Spendry 	VTOFDESC(fvp)->f_fd = fd;
9953838Spendry 	/*VTOFDESC(fvp)->f_isroot = 0;*/
100*54049Spendry 	*vpp = fvp;
10153838Spendry #ifdef FDESC_DIAGNOSTIC
10253838Spendry 	printf("fdesc_lookup: newvp = %x\n", fvp);
10353838Spendry #endif
10453838Spendry 	return (0);
10553838Spendry 
10653838Spendry bad:;
107*54049Spendry 	*vpp = NULL;
10853838Spendry #ifdef FDESC_DIAGNOSTIC
10953838Spendry 	printf("fdesc_lookup: error = %d\n", error);
11053838Spendry #endif
11153838Spendry 	return (error);
11253838Spendry }
11353838Spendry 
11453838Spendry fdesc_open (ap)
11553838Spendry 	struct vop_open_args *ap;
11653838Spendry {
117*54049Spendry 	struct vnode *vp = ap->a_vp;
118*54049Spendry 
11953838Spendry 	/*
12053838Spendry 	 * Can always open the root (modulo perms)
12153838Spendry 	 */
122*54049Spendry 	if (vp->v_flag & VROOT)
12353838Spendry 		return (0);
12453838Spendry 
12553838Spendry 	/*
12653838Spendry 	 * XXX Kludge: set ap->a_p->p_dupfd to contain the value of the
12753838Spendry 	 * the file descriptor being sought for duplication. The error
12853838Spendry 	 * return ensures that the vnode for this device will be released
12953838Spendry 	 * by vn_open. Open will detect this special error and take the
13053838Spendry 	 * actions in dupfdopen.  Other callers of vn_open or VOP_OPEN
13153838Spendry 	 * will simply report the error.
13253838Spendry 	 */
133*54049Spendry 	ap->a_p->p_dupfd = VTOFDESC(vp)->f_fd;	/* XXX */
13453838Spendry 	return (ENODEV);
13553838Spendry }
13653838Spendry 
13753838Spendry static int
13853838Spendry fdesc_attr(fd, vap, cred, p)
13953838Spendry 	int fd;
14053838Spendry 	struct vattr *vap;
14153838Spendry 	struct ucred *cred;
14253838Spendry 	struct proc *p;
14353838Spendry {
14453838Spendry 	USES_VOP_GETATTR;
14553838Spendry 	struct filedesc *fdp = p->p_fd;
14653838Spendry 	struct file *fp;
14753838Spendry 	int error;
14853838Spendry 
14953838Spendry #ifdef FDESC_DIAGNOSTIC
15053838Spendry 	printf("fdesc_attr: fd = %d, nfiles = %d\n", fd, fdp->fd_nfiles);
15153838Spendry #endif
15253838Spendry 	if (fd >= fdp->fd_nfiles || (fp = fdp->fd_ofiles[fd]) == NULL) {
15353838Spendry #ifdef FDESC_DIAGNOSTIC
15453838Spendry 		printf("fdesc_attr: fp = %x (EBADF)\n", fp);
15553838Spendry #endif
15653838Spendry 		return (EBADF);
15753838Spendry 	}
15853838Spendry 
15953838Spendry 	/*
16053838Spendry 	 * Can stat the underlying vnode, but not sockets because
16153838Spendry 	 * they don't use struct vattrs.  Well, we could convert from
16253838Spendry 	 * a struct stat back to a struct vattr, later...
16353838Spendry 	 */
16453838Spendry 	switch (fp->f_type) {
16553838Spendry 	case DTYPE_VNODE:
16653838Spendry 		error = VOP_GETATTR((struct vnode *) fp->f_data, vap, cred, p);
16753838Spendry 		break;
16853838Spendry 
16953838Spendry 	case DTYPE_SOCKET:
17053838Spendry 		error = EOPNOTSUPP;
17153838Spendry 		break;
17253838Spendry 
17353838Spendry 	default:
17453838Spendry 		panic("fdesc attr");
17553838Spendry 		break;
17653838Spendry 	}
17753838Spendry 
17853838Spendry #ifdef FDESC_DIAGNOSTIC
17953838Spendry 	printf("fdesc_attr: returns error %d\n", error);
18053838Spendry #endif
18153838Spendry 	return (error);
18253838Spendry }
18353838Spendry 
18453838Spendry fdesc_getattr (ap)
18553838Spendry 	struct vop_getattr_args *ap;
18653838Spendry {
187*54049Spendry 	struct vnode *vp = ap->a_vp;
188*54049Spendry 	struct vattr *vap = ap->a_vap;
18953838Spendry 	unsigned fd;
19053838Spendry 	int error;
19153838Spendry 
192*54049Spendry 	if (vp->v_flag & VROOT) {
19353838Spendry #ifdef FDESC_DIAGNOSTIC
19453838Spendry 		printf("fdesc_getattr: stat rootdir\n");
19553838Spendry #endif
196*54049Spendry 		bzero((caddr_t) vap, sizeof(*vap));
197*54049Spendry 		vattr_null(vap);
198*54049Spendry 		vap->va_type = VDIR;
199*54049Spendry 		vap->va_mode = S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH;
200*54049Spendry 		vap->va_nlink = 2;
201*54049Spendry 		vap->va_uid = 0;
202*54049Spendry 		vap->va_gid = 0;
203*54049Spendry 		vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0];
204*54049Spendry 		vap->va_fileid = 2;
205*54049Spendry 		/* vap->va_qsize = 0; */
206*54049Spendry 		vap->va_size = DEV_BSIZE;
207*54049Spendry 		vap->va_blocksize = DEV_BSIZE;
208*54049Spendry 		microtime(&vap->va_atime);
209*54049Spendry 		vap->va_mtime = vap->va_atime;
210*54049Spendry 		vap->va_ctime = vap->va_ctime;
211*54049Spendry 		vap->va_gen = 0;
212*54049Spendry 		vap->va_flags = 0;
213*54049Spendry 		vap->va_rdev = 0;
214*54049Spendry 		/* vap->va_qbytes = 0; */
215*54049Spendry 		vap->va_bytes = 0;
21653838Spendry 		return (0);
21753838Spendry 	}
21853838Spendry 
219*54049Spendry 	fd = VTOFDESC(vp)->f_fd;
220*54049Spendry 	error = fdesc_attr(fd, vap, ap->a_cred, ap->a_p);
22153838Spendry 	if (error == 0)
222*54049Spendry 		vp->v_type = vap->va_type;
22353838Spendry 	return (error);
22453838Spendry }
22553838Spendry 
22653838Spendry fdesc_setattr (ap)
22753838Spendry 	struct vop_setattr_args *ap;
22853838Spendry {
22953838Spendry 	USES_VOP_SETATTR;
23053838Spendry 	struct filedesc *fdp = ap->a_p->p_fd;
23153838Spendry 	struct file *fp;
23253838Spendry 	unsigned fd;
23353838Spendry 	int error;
23453838Spendry 
23553838Spendry 	/*
23653838Spendry 	 * Can't mess with the root vnode
23753838Spendry 	 */
23853838Spendry 	if (ap->a_vp->v_flag & VROOT)
23953838Spendry 		return (EACCES);
24053838Spendry 
24153838Spendry 	fd = VTOFDESC(ap->a_vp)->f_fd;
24253838Spendry #ifdef FDESC_DIAGNOSTIC
24353838Spendry 	printf("fdesc_setattr: fd = %d, nfiles = %d\n", fd, fdp->fd_nfiles);
24453838Spendry #endif
24553838Spendry 	if (fd >= fdp->fd_nfiles || (fp = fdp->fd_ofiles[fd]) == NULL) {
24653838Spendry #ifdef FDESC_DIAGNOSTIC
24753838Spendry 		printf("fdesc_setattr: fp = %x (EBADF)\n", fp);
24853838Spendry #endif
24953838Spendry 		return (EBADF);
25053838Spendry 	}
25153838Spendry 
25253838Spendry 	/*
25353838Spendry 	 * Can setattr the underlying vnode, but not sockets!
25453838Spendry 	 */
25553838Spendry 	switch (fp->f_type) {
25653838Spendry 	case DTYPE_VNODE:
25753838Spendry 		error = VOP_SETATTR((struct vnode *) fp->f_data, ap->a_vap, ap->a_cred, ap->a_p);
25853838Spendry 		break;
25953838Spendry 
26053838Spendry 	case DTYPE_SOCKET:
26153838Spendry 		error = EOPNOTSUPP;
26253838Spendry 		break;
26353838Spendry 
26453838Spendry 	default:
26553838Spendry 		panic("fdesc setattr");
26653838Spendry 		break;
26753838Spendry 	}
26853838Spendry 
26953838Spendry #ifdef FDESC_DIAGNOSTIC
27053838Spendry 	printf("fdesc_setattr: returns error %d\n", error);
27153838Spendry #endif
27253838Spendry 	return (error);
27353838Spendry }
27453838Spendry 
27553838Spendry fdesc_readdir (ap)
27653838Spendry 	struct vop_readdir_args *ap;
27753838Spendry {
278*54049Spendry 	struct uio *uio = ap->a_uio;
27953838Spendry 	struct filedesc *fdp;
28053838Spendry 	int i;
28153838Spendry 	int error;
28253838Spendry 
28353838Spendry #define UIO_MX 16
28453838Spendry 
285*54049Spendry 	fdp = uio->uio_procp->p_fd;
286*54049Spendry 	i = uio->uio_offset / UIO_MX;
28753838Spendry 	error = 0;
288*54049Spendry 	while (uio->uio_resid > 0) {
28953838Spendry 		if (i >= fdp->fd_nfiles) {
29053838Spendry 			*ap->a_eofflagp = 1;
29153838Spendry 			break;
29253838Spendry 		}
29353838Spendry 		if (fdp->fd_ofiles[i] != NULL) {
29453838Spendry 			struct readdir d;
29553838Spendry 			struct readdir *dp = &d;
29653838Spendry 			char *cp = dp->d_name;
29753838Spendry #ifdef FDESC_FILEID
29853838Spendry 			struct vattr va;
29953838Spendry #endif
30053838Spendry 			bzero((caddr_t) dp, UIO_MX);
30153838Spendry 
30253838Spendry 			dp->d_namlen = sprintf(dp->d_name, "%d", i);
30353838Spendry 			/*
30453838Spendry 			 * Fill in the remaining fields
30553838Spendry 			 */
30653838Spendry 			dp->d_reclen = UIO_MX;
30753838Spendry 			dp->d_ino = i + 3;
30853838Spendry #ifdef FDESC_FILEID
30953838Spendry 			/*
31053838Spendry 			 * If we want the file ids to match the
31153838Spendry 			 * we must call getattr on the underlying file.
31253838Spendry 			 * fdesc_attr may return an error, in which case
31353838Spendry 			 * we ignore the returned file id.
31453838Spendry 			 */
31553838Spendry 			error = fdesc_attr(i, &va, ap->a_cred, p);
31653838Spendry 			if (error == 0)
31753838Spendry 				dp->d_ino = va.va_fileid;
31853838Spendry #endif
31953838Spendry 			/*
32053838Spendry 			 * And ship to userland
32153838Spendry 			 */
322*54049Spendry 			error = uiomove((caddr_t) dp, UIO_MX, uio);
32353838Spendry 			if (error)
32453838Spendry 				break;
32553838Spendry 		}
32653838Spendry 		i++;
32753838Spendry 	}
32853838Spendry 
329*54049Spendry 	uio->uio_offset = i * UIO_MX;
33053838Spendry 	return (error);
33153838Spendry }
33253838Spendry 
33353838Spendry fdesc_inactive (ap)
33453838Spendry 	struct vop_inactive_args *ap;
33553838Spendry {
336*54049Spendry 	struct vnode *vp = ap->a_vp;
337*54049Spendry 
33853838Spendry 	/*
33953838Spendry 	 * Clear out the v_type field to avoid
34053838Spendry 	 * nasty things happening in vgone().
34153838Spendry 	 */
342*54049Spendry 	vp->v_type = VNON;
34353838Spendry #ifdef FDESC_DIAGNOSTIC
344*54049Spendry 	printf("fdesc_inactive(%x)\n", vp);
34553838Spendry #endif
34653838Spendry 	return (0);
34753838Spendry }
34853838Spendry 
34953838Spendry fdesc_reclaim (ap)
35053838Spendry 	struct  vop_reclaim_args *ap;
35153838Spendry {
35253838Spendry 	struct vnode *vp = ap->a_vp;
35353838Spendry 	printf("fdesc_reclaim(%x)\n", vp);
35453838Spendry 	if (vp->v_data) {
35553838Spendry 		FREE(vp->v_data, M_TEMP);
35653838Spendry 		vp->v_data = 0;
35753838Spendry 	}
35853838Spendry 	return (0);
35953838Spendry }
36053838Spendry 
36153838Spendry /*
36253838Spendry  * Print out the contents of a /dev/fd vnode.
36353838Spendry  */
36453838Spendry /* ARGSUSED */
36553838Spendry fdesc_print (ap)
36653838Spendry 	struct vop_print_args *ap;
36753838Spendry {
36853838Spendry 	printf("tag VT_NON, fdesc vnode\n");
36953838Spendry }
37053838Spendry 
37153838Spendry /*void*/
37253838Spendry fdesc_vfree (ap)
37353838Spendry 	struct vop_vfree_args *ap;
37453838Spendry {
37553838Spendry 
37653838Spendry 	return;
37753838Spendry }
37853838Spendry 
37953838Spendry /*
38053838Spendry  * /dev/fd vnode unsupported operation
38153838Spendry  */
38253838Spendry fdesc_enotsupp()
38353838Spendry {
38453838Spendry 	return (EOPNOTSUPP);
38553838Spendry }
38653838Spendry 
38753838Spendry /*
38853838Spendry  * /dev/fd "should never get here" operation
38953838Spendry  */
39053838Spendry fdesc_badop()
39153838Spendry {
39253838Spendry 	panic("fdesc: bad op");
39353838Spendry 	/* NOTREACHED */
39453838Spendry }
39553838Spendry 
39653838Spendry /*
39753838Spendry  * /dev/fd vnode null operation
39853838Spendry  */
39953838Spendry fdesc_nullop()
40053838Spendry {
40153838Spendry 	return (0);
40253838Spendry }
40353838Spendry 
40453838Spendry #define fdesc_create ((int (*) __P((struct  vop_create_args *)))fdesc_enotsupp)
40553838Spendry #define fdesc_mknod ((int (*) __P((struct  vop_mknod_args *)))fdesc_enotsupp)
40653838Spendry #define fdesc_close ((int (*) __P((struct  vop_close_args *)))nullop)
40753838Spendry #define fdesc_access ((int (*) __P((struct  vop_access_args *)))nullop)
40853838Spendry #define fdesc_read ((int (*) __P((struct  vop_read_args *)))fdesc_enotsupp)
40953838Spendry #define fdesc_write ((int (*) __P((struct  vop_write_args *)))fdesc_enotsupp)
41053838Spendry #define fdesc_ioctl ((int (*) __P((struct  vop_ioctl_args *)))fdesc_enotsupp)
41153838Spendry #define fdesc_select ((int (*) __P((struct  vop_select_args *)))fdesc_enotsupp)
41253838Spendry #define fdesc_mmap ((int (*) __P((struct  vop_mmap_args *)))fdesc_enotsupp)
41353838Spendry #define fdesc_fsync ((int (*) __P((struct  vop_fsync_args *)))nullop)
41453838Spendry #define fdesc_seek ((int (*) __P((struct  vop_seek_args *)))nullop)
41553838Spendry #define fdesc_remove ((int (*) __P((struct  vop_remove_args *)))fdesc_enotsupp)
41653838Spendry #define fdesc_link ((int (*) __P((struct  vop_link_args *)))fdesc_enotsupp)
41753838Spendry #define fdesc_rename ((int (*) __P((struct  vop_rename_args *)))fdesc_enotsupp)
41853838Spendry #define fdesc_mkdir ((int (*) __P((struct  vop_mkdir_args *)))fdesc_enotsupp)
41953838Spendry #define fdesc_rmdir ((int (*) __P((struct  vop_rmdir_args *)))fdesc_enotsupp)
42053838Spendry #define fdesc_symlink ((int (*) __P((struct  vop_symlink_args *)))fdesc_enotsupp)
42153838Spendry #define fdesc_readlink ((int (*) __P((struct  vop_readlink_args *)))fdesc_enotsupp)
42253838Spendry #define fdesc_abortop ((int (*) __P((struct  vop_abortop_args *)))nullop)
42353838Spendry #define fdesc_lock ((int (*) __P((struct  vop_lock_args *)))nullop)
42453838Spendry #define fdesc_unlock ((int (*) __P((struct  vop_unlock_args *)))nullop)
42553838Spendry #define fdesc_bmap ((int (*) __P((struct  vop_bmap_args *)))fdesc_badop)
42653838Spendry #define fdesc_strategy ((int (*) __P((struct  vop_strategy_args *)))fdesc_badop)
42753838Spendry #define fdesc_islocked ((int (*) __P((struct  vop_islocked_args *)))nullop)
42853838Spendry #define fdesc_advlock ((int (*) __P((struct  vop_advlock_args *)))fdesc_enotsupp)
42953838Spendry #define fdesc_blkatoff ((int (*) __P((struct  vop_blkatoff_args *)))fdesc_enotsupp)
43053838Spendry #define fdesc_vget ((int (*) __P((struct  vop_vget_args *)))fdesc_enotsupp)
43153838Spendry #define fdesc_valloc ((int(*) __P(( \
43253838Spendry 		struct vnode *pvp, \
43353838Spendry 		int mode, \
43453838Spendry 		struct ucred *cred, \
43553838Spendry 		struct vnode **vpp))) fdesc_enotsupp)
43653838Spendry #define fdesc_truncate ((int (*) __P((struct  vop_truncate_args *)))fdesc_enotsupp)
43753838Spendry #define fdesc_update ((int (*) __P((struct  vop_update_args *)))fdesc_enotsupp)
43853838Spendry #define fdesc_bwrite ((int (*) __P((struct  vop_bwrite_args *)))fdesc_enotsupp)
43953838Spendry 
44053838Spendry int (**fdesc_vnodeop_p)();
44153838Spendry struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = {
44253838Spendry 	{ &vop_default_desc, vn_default_error },
44353838Spendry 	{ &vop_lookup_desc, fdesc_lookup },	/* lookup */
44453838Spendry 	{ &vop_create_desc, fdesc_create },	/* create */
44553838Spendry 	{ &vop_mknod_desc, fdesc_mknod },	/* mknod */
44653838Spendry 	{ &vop_open_desc, fdesc_open },	/* open */
44753838Spendry 	{ &vop_close_desc, fdesc_close },	/* close */
44853838Spendry 	{ &vop_access_desc, fdesc_access },	/* access */
44953838Spendry 	{ &vop_getattr_desc, fdesc_getattr },	/* getattr */
45053838Spendry 	{ &vop_setattr_desc, fdesc_setattr },	/* setattr */
45153838Spendry 	{ &vop_read_desc, fdesc_read },	/* read */
45253838Spendry 	{ &vop_write_desc, fdesc_write },	/* write */
45353838Spendry 	{ &vop_ioctl_desc, fdesc_ioctl },	/* ioctl */
45453838Spendry 	{ &vop_select_desc, fdesc_select },	/* select */
45553838Spendry 	{ &vop_mmap_desc, fdesc_mmap },	/* mmap */
45653838Spendry 	{ &vop_fsync_desc, fdesc_fsync },	/* fsync */
45753838Spendry 	{ &vop_seek_desc, fdesc_seek },	/* seek */
45853838Spendry 	{ &vop_remove_desc, fdesc_remove },	/* remove */
45953838Spendry 	{ &vop_link_desc, fdesc_link },	/* link */
46053838Spendry 	{ &vop_rename_desc, fdesc_rename },	/* rename */
46153838Spendry 	{ &vop_mkdir_desc, fdesc_mkdir },	/* mkdir */
46253838Spendry 	{ &vop_rmdir_desc, fdesc_rmdir },	/* rmdir */
46353838Spendry 	{ &vop_symlink_desc, fdesc_symlink },	/* symlink */
46453838Spendry 	{ &vop_readdir_desc, fdesc_readdir },	/* readdir */
46553838Spendry 	{ &vop_readlink_desc, fdesc_readlink },	/* readlink */
46653838Spendry 	{ &vop_abortop_desc, fdesc_abortop },	/* abortop */
46753838Spendry 	{ &vop_inactive_desc, fdesc_inactive },	/* inactive */
46853838Spendry 	{ &vop_reclaim_desc, fdesc_reclaim },	/* reclaim */
46953838Spendry 	{ &vop_lock_desc, fdesc_lock },	/* lock */
47053838Spendry 	{ &vop_unlock_desc, fdesc_unlock },	/* unlock */
47153838Spendry 	{ &vop_bmap_desc, fdesc_bmap },	/* bmap */
47253838Spendry 	{ &vop_strategy_desc, fdesc_strategy },	/* strategy */
47353838Spendry 	{ &vop_print_desc, fdesc_print },	/* print */
47453838Spendry 	{ &vop_islocked_desc, fdesc_islocked },	/* islocked */
47553838Spendry 	{ &vop_advlock_desc, fdesc_advlock },	/* advlock */
47653838Spendry 	{ &vop_blkatoff_desc, fdesc_blkatoff },	/* blkatoff */
47753838Spendry 	{ &vop_vget_desc, fdesc_vget },	/* vget */
47853838Spendry 	{ &vop_valloc_desc, fdesc_valloc },	/* valloc */
47953838Spendry 	{ &vop_vfree_desc, fdesc_vfree },	/* vfree */
48053838Spendry 	{ &vop_truncate_desc, fdesc_truncate },	/* truncate */
48153838Spendry 	{ &vop_update_desc, fdesc_update },	/* update */
48253838Spendry 	{ &vop_bwrite_desc, fdesc_bwrite },	/* bwrite */
48353838Spendry 	{ (struct vnodeop_desc*)NULL, (int(*)())NULL }
48453838Spendry };
48553838Spendry struct vnodeopv_desc fdesc_vnodeop_opv_desc =
48653838Spendry 	{ &fdesc_vnodeop_p, fdesc_vnodeop_entries };
487