pass V_SAVE to vinvalbuf
[unix-history] / usr / src / sys / miscfs / portal / portal_vnops.c
CommitLineData
0def7932 1/*
1446b03c
KB
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
0def7932
JSP
4 *
5 * This code is derived from software donated to Berkeley by
6 * Jan-Simon Pendry.
7 *
8 * %sccs.include.redist.c%
9 *
1611db1e 10 * @(#)portal_vnops.c 8.8 (Berkeley) %G%
0def7932
JSP
11 *
12 * $Id: portal_vnops.c,v 1.4 1992/05/30 10:05:24 jsp Exp jsp $
13 */
14
15/*
16 * Portal Filesystem
17 */
18
19#include <sys/param.h>
20#include <sys/systm.h>
21#include <sys/kernel.h>
22#include <sys/types.h>
23#include <sys/time.h>
24#include <sys/proc.h>
0def7932
JSP
25#include <sys/filedesc.h>
26#include <sys/vnode.h>
27#include <sys/file.h>
28#include <sys/stat.h>
29#include <sys/mount.h>
30#include <sys/malloc.h>
31#include <sys/namei.h>
0def7932
JSP
32#include <sys/mbuf.h>
33#include <sys/socket.h>
34#include <sys/socketvar.h>
35#include <sys/un.h>
36#include <sys/unpcb.h>
77123753 37#include <miscfs/portal/portal.h>
0def7932
JSP
38
39static int portal_fileid = PORTAL_ROOTFILEID+1;
40
41static void
42portal_closefd(p, fd)
43 struct proc *p;
44 int fd;
45{
46 int error;
47 struct {
48 int fd;
49 } ua;
50 int rc;
51
52 ua.fd = fd;
53 error = close(p, &ua, &rc);
54 /*
55 * We should never get an error, and there isn't anything
56 * we could do if we got one, so just print a message.
57 */
58 if (error)
59 printf("portal_closefd: error = %d\n", error);
60}
61
62/*
63 * vp is the current namei directory
64 * cnp is the name to locate in that directory...
65 */
67271270 66int
77123753
KM
67portal_lookup(ap)
68 struct vop_lookup_args /* {
69 struct vnode * a_dvp;
70 struct vnode ** a_vpp;
71 struct componentname * a_cnp;
72 } */ *ap;
0def7932 73{
0def7932
JSP
74 char *pname = ap->a_cnp->cn_nameptr;
75 struct portalnode *pt;
76 int error;
77 struct vnode *fvp = 0;
78 char *path;
79 int size;
80
0def7932
JSP
81 if (ap->a_cnp->cn_namelen == 1 && *pname == '.') {
82 *ap->a_vpp = ap->a_dvp;
83 VREF(ap->a_dvp);
84 /*VOP_LOCK(ap->a_dvp);*/
85 return (0);
86 }
87
88
46a14367 89 error = getnewvnode(VT_PORTAL, ap->a_dvp->v_mount, portal_vnodeop_p, &fvp);
0def7932
JSP
90 if (error)
91 goto bad;
92 fvp->v_type = VREG;
93 MALLOC(fvp->v_data, void *, sizeof(struct portalnode),
94 M_TEMP, M_WAITOK);
95
96 pt = VTOPORTAL(fvp);
97 /*
98 * Save all of the remaining pathname and
99 * advance the namei next pointer to the end
100 * of the string.
101 */
0def7932
JSP
102 for (size = 0, path = pname; *path; path++)
103 size++;
ecae7b6f
JSP
104 ap->a_cnp->cn_consume = size - ap->a_cnp->cn_namelen;
105
0def7932
JSP
106 pt->pt_arg = malloc(size+1, M_TEMP, M_WAITOK);
107 pt->pt_size = size+1;
108 bcopy(pname, pt->pt_arg, pt->pt_size);
109 pt->pt_fileid = portal_fileid++;
110
111 *ap->a_vpp = fvp;
112 /*VOP_LOCK(fvp);*/
0def7932
JSP
113 return (0);
114
115bad:;
116 if (fvp) {
0def7932
JSP
117 vrele(fvp);
118 }
119 *ap->a_vpp = NULL;
0def7932
JSP
120 return (error);
121}
122
123static int
124portal_connect(so, so2)
125 struct socket *so;
126 struct socket *so2;
127{
128 /* from unp_connect, bypassing the namei stuff... */
0def7932
JSP
129 struct socket *so3;
130 struct unpcb *unp2;
131 struct unpcb *unp3;
132
0def7932
JSP
133 if (so2 == 0)
134 return (ECONNREFUSED);
135
136 if (so->so_type != so2->so_type)
137 return (EPROTOTYPE);
138
139 if ((so2->so_options & SO_ACCEPTCONN) == 0)
140 return (ECONNREFUSED);
141
0def7932
JSP
142 if ((so3 = sonewconn(so2, 0)) == 0)
143 return (ECONNREFUSED);
144
145 unp2 = sotounpcb(so2);
146 unp3 = sotounpcb(so3);
147 if (unp2->unp_addr)
148 unp3->unp_addr = m_copy(unp2->unp_addr, 0, (int)M_COPYALL);
149
150 so2 = so3;
151
0def7932
JSP
152
153 return (unp_connect2(so, so2));
154}
155
67271270 156int
77123753
KM
157portal_open(ap)
158 struct vop_open_args /* {
159 struct vnode *a_vp;
160 int a_mode;
161 struct ucred *a_cred;
162 struct proc *a_p;
163 } */ *ap;
0def7932
JSP
164{
165 struct socket *so = 0;
166 struct portalnode *pt;
59531d89
JSP
167 struct proc *p = ap->a_p;
168 struct vnode *vp = ap->a_vp;
0def7932
JSP
169 int s;
170 struct uio auio;
171 struct iovec aiov[2];
172 int res;
173 struct mbuf *cm = 0;
174 struct cmsghdr *cmsg;
175 int newfds;
176 int *ip;
177 int fd;
178 int error;
179 int len;
180 struct portalmount *fmp;
181 struct file *fp;
182 struct portal_cred pcred;
183
184 /*
185 * Nothing to do when opening the root node.
186 */
59531d89 187 if (vp->v_flag & VROOT)
0def7932
JSP
188 return (0);
189
0def7932
JSP
190 /*
191 * Can't be opened unless the caller is set up
192 * to deal with the side effects. Check for this
193 * by testing whether the p_dupfd has been set.
194 */
59531d89 195 if (p->p_dupfd >= 0)
0def7932
JSP
196 return (ENODEV);
197
59531d89
JSP
198 pt = VTOPORTAL(vp);
199 fmp = VFSTOPORTAL(vp->v_mount);
0def7932
JSP
200
201 /*
202 * Create a new socket.
203 */
204 error = socreate(AF_UNIX, &so, SOCK_STREAM, 0);
205 if (error)
206 goto bad;
207
208 /*
209 * Reserve some buffer space
210 */
ecae7b6f 211 res = pt->pt_size + sizeof(pcred) + 512; /* XXX */
0def7932
JSP
212 error = soreserve(so, res, res);
213 if (error)
214 goto bad;
215
216 /*
217 * Kick off connection
218 */
0def7932
JSP
219 error = portal_connect(so, (struct socket *)fmp->pm_server->f_data);
220 if (error)
221 goto bad;
222
223 /*
224 * Wait for connection to complete
225 */
0def7932
JSP
226 /*
227 * XXX: Since the mount point is holding a reference on the
228 * underlying server socket, it is not easy to find out whether
229 * the server process is still running. To handle this problem
230 * we loop waiting for the new socket to be connected (something
231 * which will only happen if the server is still running) or for
232 * the reference count on the server socket to drop to 1, which
233 * will happen if the server dies. Sleep for 5 second intervals
234 * and keep polling the reference count. XXX.
235 */
236 s = splnet();
237 while ((so->so_state & SS_ISCONNECTING) && so->so_error == 0) {
238 if (fmp->pm_server->f_count == 1) {
239 error = ECONNREFUSED;
240 splx(s);
0def7932
JSP
241 goto bad;
242 }
243 (void) tsleep((caddr_t) &so->so_timeo, PSOCK, "portalcon", 5 * hz);
244 }
245 splx(s);
246
247 if (so->so_error) {
248 error = so->so_error;
249 goto bad;
250 }
251
252 /*
253 * Set miscellaneous flags
254 */
255 so->so_rcv.sb_timeo = 0;
256 so->so_snd.sb_timeo = 0;
257 so->so_rcv.sb_flags |= SB_NOINTR;
258 so->so_snd.sb_flags |= SB_NOINTR;
259
0def7932 260
ecae7b6f 261 pcred.pcr_flag = ap->a_mode;
0def7932 262 pcred.pcr_uid = ap->a_cred->cr_uid;
ecae7b6f
JSP
263 pcred.pcr_ngroups = ap->a_cred->cr_ngroups;
264 bcopy(ap->a_cred->cr_groups, pcred.pcr_groups, NGROUPS * sizeof(gid_t));
0def7932
JSP
265 aiov[0].iov_base = (caddr_t) &pcred;
266 aiov[0].iov_len = sizeof(pcred);
267 aiov[1].iov_base = pt->pt_arg;
268 aiov[1].iov_len = pt->pt_size;
269 auio.uio_iov = aiov;
270 auio.uio_iovcnt = 2;
271 auio.uio_rw = UIO_WRITE;
272 auio.uio_segflg = UIO_SYSSPACE;
59531d89 273 auio.uio_procp = p;
0def7932
JSP
274 auio.uio_offset = 0;
275 auio.uio_resid = aiov[0].iov_len + aiov[1].iov_len;
276
97b557d1 277 error = sosend(so, (struct mbuf *) 0, &auio,
0def7932
JSP
278 (struct mbuf *) 0, (struct mbuf *) 0, 0);
279 if (error)
280 goto bad;
281
282 len = auio.uio_resid = sizeof(int);
283 do {
284 struct mbuf *m = 0;
285 int flags = MSG_WAITALL;
0def7932
JSP
286 error = soreceive(so, (struct mbuf **) 0, &auio,
287 &m, &cm, &flags);
0def7932
JSP
288 if (error)
289 goto bad;
290
291 /*
292 * Grab an error code from the mbuf.
293 */
294 if (m) {
295 m = m_pullup(m, sizeof(int)); /* Needed? */
296 if (m) {
297 error = *(mtod(m, int *));
298 m_freem(m);
299 } else {
300 error = EINVAL;
301 }
0def7932
JSP
302 } else {
303 if (cm == 0) {
0def7932
JSP
304 error = ECONNRESET; /* XXX */
305#ifdef notdef
306 break;
307#endif
308 }
309 }
310 } while (cm == 0 && auio.uio_resid == len && !error);
311
312 if (cm == 0)
313 goto bad;
314
315 if (auio.uio_resid) {
0def7932
JSP
316 error = 0;
317#ifdef notdef
318 error = EMSGSIZE;
319 goto bad;
320#endif
321 }
322
323 /*
324 * XXX: Break apart the control message, and retrieve the
325 * received file descriptor. Note that more than one descriptor
326 * may have been received, or that the rights chain may have more
327 * than a single mbuf in it. What to do?
328 */
0def7932
JSP
329 cmsg = mtod(cm, struct cmsghdr *);
330 newfds = (cmsg->cmsg_len - sizeof(*cmsg)) / sizeof (int);
331 if (newfds == 0) {
0def7932
JSP
332 error = ECONNREFUSED;
333 goto bad;
334 }
335 /*
336 * At this point the rights message consists of a control message
337 * header, followed by a data region containing a vector of
338 * integer file descriptors. The fds were allocated by the action
339 * of receiving the control message.
340 */
341 ip = (int *) (cmsg + 1);
342 fd = *ip++;
343 if (newfds > 1) {
344 /*
345 * Close extra fds.
346 */
347 int i;
348 printf("portal_open: %d extra fds\n", newfds - 1);
349 for (i = 1; i < newfds; i++) {
59531d89 350 portal_closefd(p, *ip);
0def7932
JSP
351 ip++;
352 }
353 }
354
355 /*
59531d89
JSP
356 * Check that the mode the file is being opened for is a subset
357 * of the mode of the existing descriptor.
0def7932 358 */
59531d89 359 fp = p->p_fd->fd_ofiles[fd];
0def7932 360 if (((ap->a_mode & (FREAD|FWRITE)) | fp->f_flag) != fp->f_flag) {
59531d89 361 portal_closefd(p, fd);
0def7932
JSP
362 error = EACCES;
363 goto bad;
364 }
365
0def7932
JSP
366 /*
367 * Save the dup fd in the proc structure then return the
368 * special error code (ENXIO) which causes magic things to
369 * happen in vn_open. The whole concept is, well, hmmm.
370 */
59531d89 371 p->p_dupfd = fd;
0def7932
JSP
372 error = ENXIO;
373
374bad:;
375 /*
376 * And discard the control message.
377 */
378 if (cm) {
0def7932
JSP
379 m_freem(cm);
380 }
381
382 if (so) {
0def7932 383 soshutdown(so, 2);
0def7932
JSP
384 soclose(so);
385 }
0def7932
JSP
386 return (error);
387}
388
67271270 389int
77123753
KM
390portal_getattr(ap)
391 struct vop_getattr_args /* {
392 struct vnode *a_vp;
393 struct vattr *a_vap;
394 struct ucred *a_cred;
395 struct proc *a_p;
396 } */ *ap;
0def7932 397{
59531d89
JSP
398 struct vnode *vp = ap->a_vp;
399 struct vattr *vap = ap->a_vap;
0def7932 400
67e8af50 401 bzero(vap, sizeof(*vap));
59531d89
JSP
402 vattr_null(vap);
403 vap->va_uid = 0;
404 vap->va_gid = 0;
405 vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0];
406 vap->va_size = DEV_BSIZE;
407 vap->va_blocksize = DEV_BSIZE;
408 microtime(&vap->va_atime);
409 vap->va_mtime = vap->va_atime;
410 vap->va_ctime = vap->va_ctime;
411 vap->va_gen = 0;
412 vap->va_flags = 0;
413 vap->va_rdev = 0;
414 /* vap->va_qbytes = 0; */
415 vap->va_bytes = 0;
416 /* vap->va_qsize = 0; */
417 if (vp->v_flag & VROOT) {
59531d89
JSP
418 vap->va_type = VDIR;
419 vap->va_mode = S_IRUSR|S_IWUSR|S_IXUSR|
0def7932
JSP
420 S_IRGRP|S_IWGRP|S_IXGRP|
421 S_IROTH|S_IWOTH|S_IXOTH;
59531d89
JSP
422 vap->va_nlink = 2;
423 vap->va_fileid = 2;
0def7932 424 } else {
59531d89
JSP
425 vap->va_type = VREG;
426 vap->va_mode = S_IRUSR|S_IWUSR|
0def7932
JSP
427 S_IRGRP|S_IWGRP|
428 S_IROTH|S_IWOTH;
59531d89
JSP
429 vap->va_nlink = 1;
430 vap->va_fileid = VTOPORTAL(vp)->pt_fileid;
0def7932
JSP
431 }
432 return (0);
433}
434
67271270 435int
77123753
KM
436portal_setattr(ap)
437 struct vop_setattr_args /* {
438 struct vnode *a_vp;
439 struct vattr *a_vap;
440 struct ucred *a_cred;
441 struct proc *a_p;
442 } */ *ap;
0def7932 443{
67271270 444
0def7932
JSP
445 /*
446 * Can't mess with the root vnode
447 */
448 if (ap->a_vp->v_flag & VROOT)
449 return (EACCES);
450
451 return (0);
452}
453
454/*
455 * Fake readdir, just return empty directory.
456 * It is hard to deal with '.' and '..' so don't bother.
457 */
67271270 458int
77123753
KM
459portal_readdir(ap)
460 struct vop_readdir_args /* {
461 struct vnode *a_vp;
462 struct uio *a_uio;
463 struct ucred *a_cred;
464 } */ *ap;
0def7932 465{
67271270 466
0def7932
JSP
467 return (0);
468}
469
67271270 470int
77123753
KM
471portal_inactive(ap)
472 struct vop_inactive_args /* {
473 struct vnode *a_vp;
474 } */ *ap;
0def7932 475{
67271270 476
0def7932
JSP
477 return (0);
478}
479
67271270 480int
77123753
KM
481portal_reclaim(ap)
482 struct vop_reclaim_args /* {
483 struct vnode *a_vp;
484 } */ *ap;
0def7932
JSP
485{
486 struct portalnode *pt = VTOPORTAL(ap->a_vp);
67271270 487
0def7932
JSP
488 if (pt->pt_arg) {
489 free((caddr_t) pt->pt_arg, M_TEMP);
490 pt->pt_arg = 0;
491 }
12f06b78
JSP
492 FREE(ap->a_vp->v_data, M_TEMP);
493 ap->a_vp->v_data = 0;
67271270 494
0def7932
JSP
495 return (0);
496}
497
0020ca6e
JSP
498/*
499 * Return POSIX pathconf information applicable to special devices.
500 */
501portal_pathconf(ap)
502 struct vop_pathconf_args /* {
503 struct vnode *a_vp;
504 int a_name;
505 int *a_retval;
506 } */ *ap;
507{
508
509 switch (ap->a_name) {
510 case _PC_LINK_MAX:
511 *ap->a_retval = LINK_MAX;
512 return (0);
513 case _PC_MAX_CANON:
514 *ap->a_retval = MAX_CANON;
515 return (0);
516 case _PC_MAX_INPUT:
517 *ap->a_retval = MAX_INPUT;
518 return (0);
519 case _PC_PIPE_BUF:
520 *ap->a_retval = PIPE_BUF;
521 return (0);
522 case _PC_CHOWN_RESTRICTED:
523 *ap->a_retval = 1;
524 return (0);
525 case _PC_VDISABLE:
526 *ap->a_retval = _POSIX_VDISABLE;
527 return (0);
528 default:
529 return (EINVAL);
530 }
531 /* NOTREACHED */
532}
533
0def7932
JSP
534/*
535 * Print out the contents of a Portal vnode.
536 */
537/* ARGSUSED */
67271270 538int
77123753
KM
539portal_print(ap)
540 struct vop_print_args /* {
541 struct vnode *a_vp;
542 } */ *ap;
0def7932 543{
77123753 544
0def7932 545 printf("tag VT_PORTAL, portal vnode\n");
77123753 546 return (0);
0def7932
JSP
547}
548
549/*void*/
67271270 550int
77123753
KM
551portal_vfree(ap)
552 struct vop_vfree_args /* {
553 struct vnode *a_pvp;
554 ino_t a_ino;
555 int a_mode;
556 } */ *ap;
0def7932 557{
77123753
KM
558
559 return (0);
0def7932
JSP
560}
561
562
563/*
564 * Portal vnode unsupported operation
565 */
67271270 566int
0def7932
JSP
567portal_enotsupp()
568{
77123753 569
0def7932
JSP
570 return (EOPNOTSUPP);
571}
572
573/*
574 * Portal "should never get here" operation
575 */
67271270 576int
0def7932
JSP
577portal_badop()
578{
77123753 579
0def7932
JSP
580 panic("portal: bad op");
581 /* NOTREACHED */
582}
583
584/*
585 * Portal vnode null operation
586 */
67271270 587int
0def7932
JSP
588portal_nullop()
589{
77123753 590
0def7932
JSP
591 return (0);
592}
593
77123753 594#define portal_create ((int (*) __P((struct vop_create_args *)))portal_enotsupp)
0def7932
JSP
595#define portal_mknod ((int (*) __P((struct vop_mknod_args *)))portal_enotsupp)
596#define portal_close ((int (*) __P((struct vop_close_args *)))nullop)
597#define portal_access ((int (*) __P((struct vop_access_args *)))nullop)
598#define portal_read ((int (*) __P((struct vop_read_args *)))portal_enotsupp)
599#define portal_write ((int (*) __P((struct vop_write_args *)))portal_enotsupp)
600#define portal_ioctl ((int (*) __P((struct vop_ioctl_args *)))portal_enotsupp)
77123753 601#define portal_select ((int (*) __P((struct vop_select_args *)))portal_enotsupp)
0def7932
JSP
602#define portal_mmap ((int (*) __P((struct vop_mmap_args *)))portal_enotsupp)
603#define portal_fsync ((int (*) __P((struct vop_fsync_args *)))nullop)
604#define portal_seek ((int (*) __P((struct vop_seek_args *)))nullop)
77123753 605#define portal_remove ((int (*) __P((struct vop_remove_args *)))portal_enotsupp)
0def7932 606#define portal_link ((int (*) __P((struct vop_link_args *)))portal_enotsupp)
77123753 607#define portal_rename ((int (*) __P((struct vop_rename_args *)))portal_enotsupp)
0def7932
JSP
608#define portal_mkdir ((int (*) __P((struct vop_mkdir_args *)))portal_enotsupp)
609#define portal_rmdir ((int (*) __P((struct vop_rmdir_args *)))portal_enotsupp)
b076d1ce 610#define portal_symlink \
77123753 611 ((int (*) __P((struct vop_symlink_args *)))portal_enotsupp)
b076d1ce 612#define portal_readlink \
77123753 613 ((int (*) __P((struct vop_readlink_args *)))portal_enotsupp)
0def7932
JSP
614#define portal_abortop ((int (*) __P((struct vop_abortop_args *)))nullop)
615#define portal_lock ((int (*) __P((struct vop_lock_args *)))nullop)
616#define portal_unlock ((int (*) __P((struct vop_unlock_args *)))nullop)
617#define portal_bmap ((int (*) __P((struct vop_bmap_args *)))portal_badop)
b076d1ce 618#define portal_strategy \
77123753 619 ((int (*) __P((struct vop_strategy_args *)))portal_badop)
0def7932 620#define portal_islocked ((int (*) __P((struct vop_islocked_args *)))nullop)
b076d1ce 621#define portal_advlock \
77123753 622 ((int (*) __P((struct vop_advlock_args *)))portal_enotsupp)
b076d1ce 623#define portal_blkatoff \
77123753 624 ((int (*) __P((struct vop_blkatoff_args *)))portal_enotsupp)
0def7932
JSP
625#define portal_valloc ((int(*) __P(( \
626 struct vnode *pvp, \
627 int mode, \
628 struct ucred *cred, \
629 struct vnode **vpp))) portal_enotsupp)
b076d1ce 630#define portal_truncate \
77123753
KM
631 ((int (*) __P((struct vop_truncate_args *)))portal_enotsupp)
632#define portal_update ((int (*) __P((struct vop_update_args *)))portal_enotsupp)
633#define portal_bwrite ((int (*) __P((struct vop_bwrite_args *)))portal_enotsupp)
0def7932
JSP
634
635int (**portal_vnodeop_p)();
636struct vnodeopv_entry_desc portal_vnodeop_entries[] = {
637 { &vop_default_desc, vn_default_error },
638 { &vop_lookup_desc, portal_lookup }, /* lookup */
639 { &vop_create_desc, portal_create }, /* create */
640 { &vop_mknod_desc, portal_mknod }, /* mknod */
641 { &vop_open_desc, portal_open }, /* open */
642 { &vop_close_desc, portal_close }, /* close */
643 { &vop_access_desc, portal_access }, /* access */
644 { &vop_getattr_desc, portal_getattr }, /* getattr */
645 { &vop_setattr_desc, portal_setattr }, /* setattr */
646 { &vop_read_desc, portal_read }, /* read */
647 { &vop_write_desc, portal_write }, /* write */
648 { &vop_ioctl_desc, portal_ioctl }, /* ioctl */
649 { &vop_select_desc, portal_select }, /* select */
650 { &vop_mmap_desc, portal_mmap }, /* mmap */
651 { &vop_fsync_desc, portal_fsync }, /* fsync */
652 { &vop_seek_desc, portal_seek }, /* seek */
653 { &vop_remove_desc, portal_remove }, /* remove */
654 { &vop_link_desc, portal_link }, /* link */
655 { &vop_rename_desc, portal_rename }, /* rename */
656 { &vop_mkdir_desc, portal_mkdir }, /* mkdir */
657 { &vop_rmdir_desc, portal_rmdir }, /* rmdir */
658 { &vop_symlink_desc, portal_symlink }, /* symlink */
659 { &vop_readdir_desc, portal_readdir }, /* readdir */
660 { &vop_readlink_desc, portal_readlink }, /* readlink */
661 { &vop_abortop_desc, portal_abortop }, /* abortop */
662 { &vop_inactive_desc, portal_inactive }, /* inactive */
663 { &vop_reclaim_desc, portal_reclaim }, /* reclaim */
664 { &vop_lock_desc, portal_lock }, /* lock */
665 { &vop_unlock_desc, portal_unlock }, /* unlock */
666 { &vop_bmap_desc, portal_bmap }, /* bmap */
667 { &vop_strategy_desc, portal_strategy }, /* strategy */
668 { &vop_print_desc, portal_print }, /* print */
669 { &vop_islocked_desc, portal_islocked }, /* islocked */
0020ca6e 670 { &vop_pathconf_desc, portal_pathconf }, /* pathconf */
0def7932
JSP
671 { &vop_advlock_desc, portal_advlock }, /* advlock */
672 { &vop_blkatoff_desc, portal_blkatoff }, /* blkatoff */
0def7932
JSP
673 { &vop_valloc_desc, portal_valloc }, /* valloc */
674 { &vop_vfree_desc, portal_vfree }, /* vfree */
675 { &vop_truncate_desc, portal_truncate }, /* truncate */
676 { &vop_update_desc, portal_update }, /* update */
677 { &vop_bwrite_desc, portal_bwrite }, /* bwrite */
678 { (struct vnodeop_desc*)NULL, (int(*)())NULL }
679};
680struct vnodeopv_desc portal_vnodeop_opv_desc =
681 { &portal_vnodeop_p, portal_vnodeop_entries };