The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/vnode_if.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: vnode_if.h,v 1.50 2005/02/26 22:15:27 perry Exp $      */
    2 
    3 /*
    4  * Warning: DO NOT EDIT! This file is automatically generated!
    5  * (Modifications made here may easily be lost!)
    6  *
    7  * Created from the file:
    8  *      NetBSD: vnode_if.src,v 1.44 2005/02/26 22:14:39 perry Exp
    9  * by the script:
   10  *      NetBSD: vnode_if.sh,v 1.38 2005/02/26 22:06:38 perry Exp
   11  */
   12 
   13 /*
   14  * Copyright (c) 1992, 1993, 1994, 1995
   15  *      The Regents of the University of California.  All rights reserved.
   16  *
   17  * Redistribution and use in source and binary forms, with or without
   18  * modification, are permitted provided that the following conditions
   19  * are met:
   20  * 1. Redistributions of source code must retain the above copyright
   21  *    notice, this list of conditions and the following disclaimer.
   22  * 2. Redistributions in binary form must reproduce the above copyright
   23  *    notice, this list of conditions and the following disclaimer in the
   24  *    documentation and/or other materials provided with the distribution.
   25  * 3. Neither the name of the University nor the names of its contributors
   26  *    may be used to endorse or promote products derived from this software
   27  *    without specific prior written permission.
   28  *
   29  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   30  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   31  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   32  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   33  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   34  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   35  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   36  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   37  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   38  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   39  * SUCH DAMAGE.
   40  */
   41 
   42 #ifndef _SYS_VNODE_IF_H_
   43 #define _SYS_VNODE_IF_H_
   44 
   45 #ifdef _KERNEL
   46 #if defined(_LKM) || defined(LKM)
   47 /* LKMs always use non-inlined vnode ops. */
   48 #define VNODE_OP_NOINLINE
   49 #else
   50 #include "opt_vnode_op_noinline.h"
   51 #endif /* _LKM || LKM */
   52 #ifdef _KERNEL_OPT
   53 #include "opt_vnode_lockdebug.h"
   54 #endif /* _KERNEL_OPT */
   55 #endif /* _KERNEL */
   56 
   57 extern const struct vnodeop_desc vop_default_desc;
   58 
   59 
   60 struct vop_lookup_args {
   61         const struct vnodeop_desc *a_desc;
   62         struct vnode *a_dvp;
   63         struct vnode **a_vpp;
   64         struct componentname *a_cnp;
   65 };
   66 extern const struct vnodeop_desc vop_lookup_desc;
   67 #ifndef VNODE_OP_NOINLINE
   68 static __inline
   69 #endif
   70 int VOP_LOOKUP(struct vnode *, struct vnode **, struct componentname *)
   71 #ifndef VNODE_OP_NOINLINE
   72 __attribute__((__unused__))
   73 #endif
   74 ;
   75 #ifndef VNODE_OP_NOINLINE
   76 static __inline int VOP_LOOKUP(dvp, vpp, cnp)
   77         struct vnode *dvp;
   78         struct vnode **vpp;
   79         struct componentname *cnp;
   80 {
   81         struct vop_lookup_args a;
   82 #ifdef VNODE_LOCKDEBUG
   83 #endif
   84         a.a_desc = VDESC(vop_lookup);
   85         a.a_dvp = dvp;
   86         a.a_vpp = vpp;
   87         a.a_cnp = cnp;
   88         return (VCALL(dvp, VOFFSET(vop_lookup), &a));
   89 }
   90 #endif
   91 
   92 struct vop_create_args {
   93         const struct vnodeop_desc *a_desc;
   94         struct vnode *a_dvp;
   95         struct vnode **a_vpp;
   96         struct componentname *a_cnp;
   97         struct vattr *a_vap;
   98 };
   99 extern const struct vnodeop_desc vop_create_desc;
  100 #ifndef VNODE_OP_NOINLINE
  101 static __inline
  102 #endif
  103 int VOP_CREATE(struct vnode *, struct vnode **, struct componentname *, 
  104     struct vattr *)
  105 #ifndef VNODE_OP_NOINLINE
  106 __attribute__((__unused__))
  107 #endif
  108 ;
  109 #ifndef VNODE_OP_NOINLINE
  110 static __inline int VOP_CREATE(dvp, vpp, cnp, vap)
  111         struct vnode *dvp;
  112         struct vnode **vpp;
  113         struct componentname *cnp;
  114         struct vattr *vap;
  115 {
  116         struct vop_create_args a;
  117 #ifdef VNODE_LOCKDEBUG
  118         int islocked_dvp;
  119 #endif
  120         a.a_desc = VDESC(vop_create);
  121         a.a_dvp = dvp;
  122 #ifdef VNODE_LOCKDEBUG
  123         islocked_dvp = (dvp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(dvp) == LK_EXCLUSIVE) : 1;
  124         if (islocked_dvp != 1)
  125                 panic("vop_create: dvp: locked %d, expected %d", islocked_dvp, 1);
  126 #endif
  127         a.a_vpp = vpp;
  128         a.a_cnp = cnp;
  129         a.a_vap = vap;
  130         return (VCALL(dvp, VOFFSET(vop_create), &a));
  131 }
  132 #endif
  133 
  134 struct vop_mknod_args {
  135         const struct vnodeop_desc *a_desc;
  136         struct vnode *a_dvp;
  137         struct vnode **a_vpp;
  138         struct componentname *a_cnp;
  139         struct vattr *a_vap;
  140 };
  141 extern const struct vnodeop_desc vop_mknod_desc;
  142 #ifndef VNODE_OP_NOINLINE
  143 static __inline
  144 #endif
  145 int VOP_MKNOD(struct vnode *, struct vnode **, struct componentname *, 
  146     struct vattr *)
  147 #ifndef VNODE_OP_NOINLINE
  148 __attribute__((__unused__))
  149 #endif
  150 ;
  151 #ifndef VNODE_OP_NOINLINE
  152 static __inline int VOP_MKNOD(dvp, vpp, cnp, vap)
  153         struct vnode *dvp;
  154         struct vnode **vpp;
  155         struct componentname *cnp;
  156         struct vattr *vap;
  157 {
  158         struct vop_mknod_args a;
  159 #ifdef VNODE_LOCKDEBUG
  160         int islocked_dvp;
  161 #endif
  162         a.a_desc = VDESC(vop_mknod);
  163         a.a_dvp = dvp;
  164 #ifdef VNODE_LOCKDEBUG
  165         islocked_dvp = (dvp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(dvp) == LK_EXCLUSIVE) : 1;
  166         if (islocked_dvp != 1)
  167                 panic("vop_mknod: dvp: locked %d, expected %d", islocked_dvp, 1);
  168 #endif
  169         a.a_vpp = vpp;
  170         a.a_cnp = cnp;
  171         a.a_vap = vap;
  172         return (VCALL(dvp, VOFFSET(vop_mknod), &a));
  173 }
  174 #endif
  175 
  176 struct vop_open_args {
  177         const struct vnodeop_desc *a_desc;
  178         struct vnode *a_vp;
  179         int a_mode;
  180         struct ucred *a_cred;
  181         struct proc *a_p;
  182 };
  183 extern const struct vnodeop_desc vop_open_desc;
  184 #ifndef VNODE_OP_NOINLINE
  185 static __inline
  186 #endif
  187 int VOP_OPEN(struct vnode *, int, struct ucred *, struct proc *)
  188 #ifndef VNODE_OP_NOINLINE
  189 __attribute__((__unused__))
  190 #endif
  191 ;
  192 #ifndef VNODE_OP_NOINLINE
  193 static __inline int VOP_OPEN(vp, mode, cred, p)
  194         struct vnode *vp;
  195         int mode;
  196         struct ucred *cred;
  197         struct proc *p;
  198 {
  199         struct vop_open_args a;
  200 #ifdef VNODE_LOCKDEBUG
  201         int islocked_vp;
  202 #endif
  203         a.a_desc = VDESC(vop_open);
  204         a.a_vp = vp;
  205 #ifdef VNODE_LOCKDEBUG
  206         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
  207         if (islocked_vp != 1)
  208                 panic("vop_open: vp: locked %d, expected %d", islocked_vp, 1);
  209 #endif
  210         a.a_mode = mode;
  211         a.a_cred = cred;
  212         a.a_p = p;
  213         return (VCALL(vp, VOFFSET(vop_open), &a));
  214 }
  215 #endif
  216 
  217 struct vop_close_args {
  218         const struct vnodeop_desc *a_desc;
  219         struct vnode *a_vp;
  220         int a_fflag;
  221         struct ucred *a_cred;
  222         struct proc *a_p;
  223 };
  224 extern const struct vnodeop_desc vop_close_desc;
  225 #ifndef VNODE_OP_NOINLINE
  226 static __inline
  227 #endif
  228 int VOP_CLOSE(struct vnode *, int, struct ucred *, struct proc *)
  229 #ifndef VNODE_OP_NOINLINE
  230 __attribute__((__unused__))
  231 #endif
  232 ;
  233 #ifndef VNODE_OP_NOINLINE
  234 static __inline int VOP_CLOSE(vp, fflag, cred, p)
  235         struct vnode *vp;
  236         int fflag;
  237         struct ucred *cred;
  238         struct proc *p;
  239 {
  240         struct vop_close_args a;
  241 #ifdef VNODE_LOCKDEBUG
  242         int islocked_vp;
  243 #endif
  244         a.a_desc = VDESC(vop_close);
  245         a.a_vp = vp;
  246 #ifdef VNODE_LOCKDEBUG
  247         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
  248         if (islocked_vp != 1)
  249                 panic("vop_close: vp: locked %d, expected %d", islocked_vp, 1);
  250 #endif
  251         a.a_fflag = fflag;
  252         a.a_cred = cred;
  253         a.a_p = p;
  254         return (VCALL(vp, VOFFSET(vop_close), &a));
  255 }
  256 #endif
  257 
  258 struct vop_access_args {
  259         const struct vnodeop_desc *a_desc;
  260         struct vnode *a_vp;
  261         int a_mode;
  262         struct ucred *a_cred;
  263         struct proc *a_p;
  264 };
  265 extern const struct vnodeop_desc vop_access_desc;
  266 #ifndef VNODE_OP_NOINLINE
  267 static __inline
  268 #endif
  269 int VOP_ACCESS(struct vnode *, int, struct ucred *, struct proc *)
  270 #ifndef VNODE_OP_NOINLINE
  271 __attribute__((__unused__))
  272 #endif
  273 ;
  274 #ifndef VNODE_OP_NOINLINE
  275 static __inline int VOP_ACCESS(vp, mode, cred, p)
  276         struct vnode *vp;
  277         int mode;
  278         struct ucred *cred;
  279         struct proc *p;
  280 {
  281         struct vop_access_args a;
  282 #ifdef VNODE_LOCKDEBUG
  283         int islocked_vp;
  284 #endif
  285         a.a_desc = VDESC(vop_access);
  286         a.a_vp = vp;
  287 #ifdef VNODE_LOCKDEBUG
  288         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
  289         if (islocked_vp != 1)
  290                 panic("vop_access: vp: locked %d, expected %d", islocked_vp, 1);
  291 #endif
  292         a.a_mode = mode;
  293         a.a_cred = cred;
  294         a.a_p = p;
  295         return (VCALL(vp, VOFFSET(vop_access), &a));
  296 }
  297 #endif
  298 
  299 struct vop_getattr_args {
  300         const struct vnodeop_desc *a_desc;
  301         struct vnode *a_vp;
  302         struct vattr *a_vap;
  303         struct ucred *a_cred;
  304         struct proc *a_p;
  305 };
  306 extern const struct vnodeop_desc vop_getattr_desc;
  307 #ifndef VNODE_OP_NOINLINE
  308 static __inline
  309 #endif
  310 int VOP_GETATTR(struct vnode *, struct vattr *, struct ucred *, struct proc *)
  311 #ifndef VNODE_OP_NOINLINE
  312 __attribute__((__unused__))
  313 #endif
  314 ;
  315 #ifndef VNODE_OP_NOINLINE
  316 static __inline int VOP_GETATTR(vp, vap, cred, p)
  317         struct vnode *vp;
  318         struct vattr *vap;
  319         struct ucred *cred;
  320         struct proc *p;
  321 {
  322         struct vop_getattr_args a;
  323 #ifdef VNODE_LOCKDEBUG
  324 #endif
  325         a.a_desc = VDESC(vop_getattr);
  326         a.a_vp = vp;
  327         a.a_vap = vap;
  328         a.a_cred = cred;
  329         a.a_p = p;
  330         return (VCALL(vp, VOFFSET(vop_getattr), &a));
  331 }
  332 #endif
  333 
  334 struct vop_setattr_args {
  335         const struct vnodeop_desc *a_desc;
  336         struct vnode *a_vp;
  337         struct vattr *a_vap;
  338         struct ucred *a_cred;
  339         struct proc *a_p;
  340 };
  341 extern const struct vnodeop_desc vop_setattr_desc;
  342 #ifndef VNODE_OP_NOINLINE
  343 static __inline
  344 #endif
  345 int VOP_SETATTR(struct vnode *, struct vattr *, struct ucred *, struct proc *)
  346 #ifndef VNODE_OP_NOINLINE
  347 __attribute__((__unused__))
  348 #endif
  349 ;
  350 #ifndef VNODE_OP_NOINLINE
  351 static __inline int VOP_SETATTR(vp, vap, cred, p)
  352         struct vnode *vp;
  353         struct vattr *vap;
  354         struct ucred *cred;
  355         struct proc *p;
  356 {
  357         struct vop_setattr_args a;
  358 #ifdef VNODE_LOCKDEBUG
  359         int islocked_vp;
  360 #endif
  361         a.a_desc = VDESC(vop_setattr);
  362         a.a_vp = vp;
  363 #ifdef VNODE_LOCKDEBUG
  364         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
  365         if (islocked_vp != 1)
  366                 panic("vop_setattr: vp: locked %d, expected %d", islocked_vp, 1);
  367 #endif
  368         a.a_vap = vap;
  369         a.a_cred = cred;
  370         a.a_p = p;
  371         return (VCALL(vp, VOFFSET(vop_setattr), &a));
  372 }
  373 #endif
  374 
  375 struct vop_read_args {
  376         const struct vnodeop_desc *a_desc;
  377         struct vnode *a_vp;
  378         struct uio *a_uio;
  379         int a_ioflag;
  380         struct ucred *a_cred;
  381 };
  382 extern const struct vnodeop_desc vop_read_desc;
  383 #ifndef VNODE_OP_NOINLINE
  384 static __inline
  385 #endif
  386 int VOP_READ(struct vnode *, struct uio *, int, struct ucred *)
  387 #ifndef VNODE_OP_NOINLINE
  388 __attribute__((__unused__))
  389 #endif
  390 ;
  391 #ifndef VNODE_OP_NOINLINE
  392 static __inline int VOP_READ(vp, uio, ioflag, cred)
  393         struct vnode *vp;
  394         struct uio *uio;
  395         int ioflag;
  396         struct ucred *cred;
  397 {
  398         struct vop_read_args a;
  399 #ifdef VNODE_LOCKDEBUG
  400         int islocked_vp;
  401 #endif
  402         a.a_desc = VDESC(vop_read);
  403         a.a_vp = vp;
  404 #ifdef VNODE_LOCKDEBUG
  405         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
  406         if (islocked_vp != 1)
  407                 panic("vop_read: vp: locked %d, expected %d", islocked_vp, 1);
  408 #endif
  409         a.a_uio = uio;
  410         a.a_ioflag = ioflag;
  411         a.a_cred = cred;
  412         return (VCALL(vp, VOFFSET(vop_read), &a));
  413 }
  414 #endif
  415 
  416 struct vop_write_args {
  417         const struct vnodeop_desc *a_desc;
  418         struct vnode *a_vp;
  419         struct uio *a_uio;
  420         int a_ioflag;
  421         struct ucred *a_cred;
  422 };
  423 extern const struct vnodeop_desc vop_write_desc;
  424 #ifndef VNODE_OP_NOINLINE
  425 static __inline
  426 #endif
  427 int VOP_WRITE(struct vnode *, struct uio *, int, struct ucred *)
  428 #ifndef VNODE_OP_NOINLINE
  429 __attribute__((__unused__))
  430 #endif
  431 ;
  432 #ifndef VNODE_OP_NOINLINE
  433 static __inline int VOP_WRITE(vp, uio, ioflag, cred)
  434         struct vnode *vp;
  435         struct uio *uio;
  436         int ioflag;
  437         struct ucred *cred;
  438 {
  439         struct vop_write_args a;
  440 #ifdef VNODE_LOCKDEBUG
  441         int islocked_vp;
  442 #endif
  443         a.a_desc = VDESC(vop_write);
  444         a.a_vp = vp;
  445 #ifdef VNODE_LOCKDEBUG
  446         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
  447         if (islocked_vp != 1)
  448                 panic("vop_write: vp: locked %d, expected %d", islocked_vp, 1);
  449 #endif
  450         a.a_uio = uio;
  451         a.a_ioflag = ioflag;
  452         a.a_cred = cred;
  453         return (VCALL(vp, VOFFSET(vop_write), &a));
  454 }
  455 #endif
  456 
  457 struct vop_ioctl_args {
  458         const struct vnodeop_desc *a_desc;
  459         struct vnode *a_vp;
  460         u_long a_command;
  461         void *a_data;
  462         int a_fflag;
  463         struct ucred *a_cred;
  464         struct proc *a_p;
  465 };
  466 extern const struct vnodeop_desc vop_ioctl_desc;
  467 #ifndef VNODE_OP_NOINLINE
  468 static __inline
  469 #endif
  470 int VOP_IOCTL(struct vnode *, u_long, void *, int, struct ucred *, 
  471     struct proc *)
  472 #ifndef VNODE_OP_NOINLINE
  473 __attribute__((__unused__))
  474 #endif
  475 ;
  476 #ifndef VNODE_OP_NOINLINE
  477 static __inline int VOP_IOCTL(vp, command, data, fflag, cred, p)
  478         struct vnode *vp;
  479         u_long command;
  480         void *data;
  481         int fflag;
  482         struct ucred *cred;
  483         struct proc *p;
  484 {
  485         struct vop_ioctl_args a;
  486 #ifdef VNODE_LOCKDEBUG
  487         int islocked_vp;
  488 #endif
  489         a.a_desc = VDESC(vop_ioctl);
  490         a.a_vp = vp;
  491 #ifdef VNODE_LOCKDEBUG
  492         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 0;
  493         if (islocked_vp != 0)
  494                 panic("vop_ioctl: vp: locked %d, expected %d", islocked_vp, 0);
  495 #endif
  496         a.a_command = command;
  497         a.a_data = data;
  498         a.a_fflag = fflag;
  499         a.a_cred = cred;
  500         a.a_p = p;
  501         return (VCALL(vp, VOFFSET(vop_ioctl), &a));
  502 }
  503 #endif
  504 
  505 struct vop_fcntl_args {
  506         const struct vnodeop_desc *a_desc;
  507         struct vnode *a_vp;
  508         u_int a_command;
  509         void *a_data;
  510         int a_fflag;
  511         struct ucred *a_cred;
  512         struct proc *a_p;
  513 };
  514 extern const struct vnodeop_desc vop_fcntl_desc;
  515 #ifndef VNODE_OP_NOINLINE
  516 static __inline
  517 #endif
  518 int VOP_FCNTL(struct vnode *, u_int, void *, int, struct ucred *, 
  519     struct proc *)
  520 #ifndef VNODE_OP_NOINLINE
  521 __attribute__((__unused__))
  522 #endif
  523 ;
  524 #ifndef VNODE_OP_NOINLINE
  525 static __inline int VOP_FCNTL(vp, command, data, fflag, cred, p)
  526         struct vnode *vp;
  527         u_int command;
  528         void *data;
  529         int fflag;
  530         struct ucred *cred;
  531         struct proc *p;
  532 {
  533         struct vop_fcntl_args a;
  534 #ifdef VNODE_LOCKDEBUG
  535         int islocked_vp;
  536 #endif
  537         a.a_desc = VDESC(vop_fcntl);
  538         a.a_vp = vp;
  539 #ifdef VNODE_LOCKDEBUG
  540         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
  541         if (islocked_vp != 1)
  542                 panic("vop_fcntl: vp: locked %d, expected %d", islocked_vp, 1);
  543 #endif
  544         a.a_command = command;
  545         a.a_data = data;
  546         a.a_fflag = fflag;
  547         a.a_cred = cred;
  548         a.a_p = p;
  549         return (VCALL(vp, VOFFSET(vop_fcntl), &a));
  550 }
  551 #endif
  552 
  553 struct vop_poll_args {
  554         const struct vnodeop_desc *a_desc;
  555         struct vnode *a_vp;
  556         int a_events;
  557         struct proc *a_p;
  558 };
  559 extern const struct vnodeop_desc vop_poll_desc;
  560 #ifndef VNODE_OP_NOINLINE
  561 static __inline
  562 #endif
  563 int VOP_POLL(struct vnode *, int, struct proc *)
  564 #ifndef VNODE_OP_NOINLINE
  565 __attribute__((__unused__))
  566 #endif
  567 ;
  568 #ifndef VNODE_OP_NOINLINE
  569 static __inline int VOP_POLL(vp, events, p)
  570         struct vnode *vp;
  571         int events;
  572         struct proc *p;
  573 {
  574         struct vop_poll_args a;
  575 #ifdef VNODE_LOCKDEBUG
  576         int islocked_vp;
  577 #endif
  578         a.a_desc = VDESC(vop_poll);
  579         a.a_vp = vp;
  580 #ifdef VNODE_LOCKDEBUG
  581         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 0;
  582         if (islocked_vp != 0)
  583                 panic("vop_poll: vp: locked %d, expected %d", islocked_vp, 0);
  584 #endif
  585         a.a_events = events;
  586         a.a_p = p;
  587         return (VCALL(vp, VOFFSET(vop_poll), &a));
  588 }
  589 #endif
  590 
  591 struct vop_kqfilter_args {
  592         const struct vnodeop_desc *a_desc;
  593         struct vnode *a_vp;
  594         struct knote *a_kn;
  595 };
  596 extern const struct vnodeop_desc vop_kqfilter_desc;
  597 #ifndef VNODE_OP_NOINLINE
  598 static __inline
  599 #endif
  600 int VOP_KQFILTER(struct vnode *, struct knote *)
  601 #ifndef VNODE_OP_NOINLINE
  602 __attribute__((__unused__))
  603 #endif
  604 ;
  605 #ifndef VNODE_OP_NOINLINE
  606 static __inline int VOP_KQFILTER(vp, kn)
  607         struct vnode *vp;
  608         struct knote *kn;
  609 {
  610         struct vop_kqfilter_args a;
  611 #ifdef VNODE_LOCKDEBUG
  612         int islocked_vp;
  613 #endif
  614         a.a_desc = VDESC(vop_kqfilter);
  615         a.a_vp = vp;
  616 #ifdef VNODE_LOCKDEBUG
  617         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 0;
  618         if (islocked_vp != 0)
  619                 panic("vop_kqfilter: vp: locked %d, expected %d", islocked_vp, 0);
  620 #endif
  621         a.a_kn = kn;
  622         return (VCALL(vp, VOFFSET(vop_kqfilter), &a));
  623 }
  624 #endif
  625 
  626 struct vop_revoke_args {
  627         const struct vnodeop_desc *a_desc;
  628         struct vnode *a_vp;
  629         int a_flags;
  630 };
  631 extern const struct vnodeop_desc vop_revoke_desc;
  632 #ifndef VNODE_OP_NOINLINE
  633 static __inline
  634 #endif
  635 int VOP_REVOKE(struct vnode *, int)
  636 #ifndef VNODE_OP_NOINLINE
  637 __attribute__((__unused__))
  638 #endif
  639 ;
  640 #ifndef VNODE_OP_NOINLINE
  641 static __inline int VOP_REVOKE(vp, flags)
  642         struct vnode *vp;
  643         int flags;
  644 {
  645         struct vop_revoke_args a;
  646 #ifdef VNODE_LOCKDEBUG
  647         int islocked_vp;
  648 #endif
  649         a.a_desc = VDESC(vop_revoke);
  650         a.a_vp = vp;
  651 #ifdef VNODE_LOCKDEBUG
  652         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 0;
  653         if (islocked_vp != 0)
  654                 panic("vop_revoke: vp: locked %d, expected %d", islocked_vp, 0);
  655 #endif
  656         a.a_flags = flags;
  657         return (VCALL(vp, VOFFSET(vop_revoke), &a));
  658 }
  659 #endif
  660 
  661 struct vop_mmap_args {
  662         const struct vnodeop_desc *a_desc;
  663         struct vnode *a_vp;
  664         int a_fflags;
  665         struct ucred *a_cred;
  666         struct proc *a_p;
  667 };
  668 extern const struct vnodeop_desc vop_mmap_desc;
  669 #ifndef VNODE_OP_NOINLINE
  670 static __inline
  671 #endif
  672 int VOP_MMAP(struct vnode *, int, struct ucred *, struct proc *)
  673 #ifndef VNODE_OP_NOINLINE
  674 __attribute__((__unused__))
  675 #endif
  676 ;
  677 #ifndef VNODE_OP_NOINLINE
  678 static __inline int VOP_MMAP(vp, fflags, cred, p)
  679         struct vnode *vp;
  680         int fflags;
  681         struct ucred *cred;
  682         struct proc *p;
  683 {
  684         struct vop_mmap_args a;
  685 #ifdef VNODE_LOCKDEBUG
  686 #endif
  687         a.a_desc = VDESC(vop_mmap);
  688         a.a_vp = vp;
  689         a.a_fflags = fflags;
  690         a.a_cred = cred;
  691         a.a_p = p;
  692         return (VCALL(vp, VOFFSET(vop_mmap), &a));
  693 }
  694 #endif
  695 
  696 struct vop_fsync_args {
  697         const struct vnodeop_desc *a_desc;
  698         struct vnode *a_vp;
  699         struct ucred *a_cred;
  700         int a_flags;
  701         off_t a_offlo;
  702         off_t a_offhi;
  703         struct proc *a_p;
  704 };
  705 extern const struct vnodeop_desc vop_fsync_desc;
  706 #ifndef VNODE_OP_NOINLINE
  707 static __inline
  708 #endif
  709 int VOP_FSYNC(struct vnode *, struct ucred *, int, off_t, off_t, 
  710     struct proc *)
  711 #ifndef VNODE_OP_NOINLINE
  712 __attribute__((__unused__))
  713 #endif
  714 ;
  715 #ifndef VNODE_OP_NOINLINE
  716 static __inline int VOP_FSYNC(vp, cred, flags, offlo, offhi, p)
  717         struct vnode *vp;
  718         struct ucred *cred;
  719         int flags;
  720         off_t offlo;
  721         off_t offhi;
  722         struct proc *p;
  723 {
  724         struct vop_fsync_args a;
  725 #ifdef VNODE_LOCKDEBUG
  726         int islocked_vp;
  727 #endif
  728         a.a_desc = VDESC(vop_fsync);
  729         a.a_vp = vp;
  730 #ifdef VNODE_LOCKDEBUG
  731         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
  732         if (islocked_vp != 1)
  733                 panic("vop_fsync: vp: locked %d, expected %d", islocked_vp, 1);
  734 #endif
  735         a.a_cred = cred;
  736         a.a_flags = flags;
  737         a.a_offlo = offlo;
  738         a.a_offhi = offhi;
  739         a.a_p = p;
  740         return (VCALL(vp, VOFFSET(vop_fsync), &a));
  741 }
  742 #endif
  743 
  744 struct vop_seek_args {
  745         const struct vnodeop_desc *a_desc;
  746         struct vnode *a_vp;
  747         off_t a_oldoff;
  748         off_t a_newoff;
  749         struct ucred *a_cred;
  750 };
  751 extern const struct vnodeop_desc vop_seek_desc;
  752 #ifndef VNODE_OP_NOINLINE
  753 static __inline
  754 #endif
  755 int VOP_SEEK(struct vnode *, off_t, off_t, struct ucred *)
  756 #ifndef VNODE_OP_NOINLINE
  757 __attribute__((__unused__))
  758 #endif
  759 ;
  760 #ifndef VNODE_OP_NOINLINE
  761 static __inline int VOP_SEEK(vp, oldoff, newoff, cred)
  762         struct vnode *vp;
  763         off_t oldoff;
  764         off_t newoff;
  765         struct ucred *cred;
  766 {
  767         struct vop_seek_args a;
  768 #ifdef VNODE_LOCKDEBUG
  769 #endif
  770         a.a_desc = VDESC(vop_seek);
  771         a.a_vp = vp;
  772         a.a_oldoff = oldoff;
  773         a.a_newoff = newoff;
  774         a.a_cred = cred;
  775         return (VCALL(vp, VOFFSET(vop_seek), &a));
  776 }
  777 #endif
  778 
  779 struct vop_remove_args {
  780         const struct vnodeop_desc *a_desc;
  781         struct vnode *a_dvp;
  782         struct vnode *a_vp;
  783         struct componentname *a_cnp;
  784 };
  785 extern const struct vnodeop_desc vop_remove_desc;
  786 #ifndef VNODE_OP_NOINLINE
  787 static __inline
  788 #endif
  789 int VOP_REMOVE(struct vnode *, struct vnode *, struct componentname *)
  790 #ifndef VNODE_OP_NOINLINE
  791 __attribute__((__unused__))
  792 #endif
  793 ;
  794 #ifndef VNODE_OP_NOINLINE
  795 static __inline int VOP_REMOVE(dvp, vp, cnp)
  796         struct vnode *dvp;
  797         struct vnode *vp;
  798         struct componentname *cnp;
  799 {
  800         struct vop_remove_args a;
  801 #ifdef VNODE_LOCKDEBUG
  802         int islocked_dvp;
  803         int islocked_vp;
  804 #endif
  805         a.a_desc = VDESC(vop_remove);
  806         a.a_dvp = dvp;
  807 #ifdef VNODE_LOCKDEBUG
  808         islocked_dvp = (dvp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(dvp) == LK_EXCLUSIVE) : 1;
  809         if (islocked_dvp != 1)
  810                 panic("vop_remove: dvp: locked %d, expected %d", islocked_dvp, 1);
  811 #endif
  812         a.a_vp = vp;
  813 #ifdef VNODE_LOCKDEBUG
  814         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
  815         if (islocked_vp != 1)
  816                 panic("vop_remove: vp: locked %d, expected %d", islocked_vp, 1);
  817 #endif
  818         a.a_cnp = cnp;
  819         return (VCALL(dvp, VOFFSET(vop_remove), &a));
  820 }
  821 #endif
  822 
  823 struct vop_link_args {
  824         const struct vnodeop_desc *a_desc;
  825         struct vnode *a_dvp;
  826         struct vnode *a_vp;
  827         struct componentname *a_cnp;
  828 };
  829 extern const struct vnodeop_desc vop_link_desc;
  830 #ifndef VNODE_OP_NOINLINE
  831 static __inline
  832 #endif
  833 int VOP_LINK(struct vnode *, struct vnode *, struct componentname *)
  834 #ifndef VNODE_OP_NOINLINE
  835 __attribute__((__unused__))
  836 #endif
  837 ;
  838 #ifndef VNODE_OP_NOINLINE
  839 static __inline int VOP_LINK(dvp, vp, cnp)
  840         struct vnode *dvp;
  841         struct vnode *vp;
  842         struct componentname *cnp;
  843 {
  844         struct vop_link_args a;
  845 #ifdef VNODE_LOCKDEBUG
  846         int islocked_dvp;
  847         int islocked_vp;
  848 #endif
  849         a.a_desc = VDESC(vop_link);
  850         a.a_dvp = dvp;
  851 #ifdef VNODE_LOCKDEBUG
  852         islocked_dvp = (dvp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(dvp) == LK_EXCLUSIVE) : 1;
  853         if (islocked_dvp != 1)
  854                 panic("vop_link: dvp: locked %d, expected %d", islocked_dvp, 1);
  855 #endif
  856         a.a_vp = vp;
  857 #ifdef VNODE_LOCKDEBUG
  858         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 0;
  859         if (islocked_vp != 0)
  860                 panic("vop_link: vp: locked %d, expected %d", islocked_vp, 0);
  861 #endif
  862         a.a_cnp = cnp;
  863         return (VCALL(dvp, VOFFSET(vop_link), &a));
  864 }
  865 #endif
  866 
  867 struct vop_rename_args {
  868         const struct vnodeop_desc *a_desc;
  869         struct vnode *a_fdvp;
  870         struct vnode *a_fvp;
  871         struct componentname *a_fcnp;
  872         struct vnode *a_tdvp;
  873         struct vnode *a_tvp;
  874         struct componentname *a_tcnp;
  875 };
  876 extern const struct vnodeop_desc vop_rename_desc;
  877 #ifndef VNODE_OP_NOINLINE
  878 static __inline
  879 #endif
  880 int VOP_RENAME(struct vnode *, struct vnode *, struct componentname *, 
  881     struct vnode *, struct vnode *, struct componentname *)
  882 #ifndef VNODE_OP_NOINLINE
  883 __attribute__((__unused__))
  884 #endif
  885 ;
  886 #ifndef VNODE_OP_NOINLINE
  887 static __inline int VOP_RENAME(fdvp, fvp, fcnp, tdvp, tvp, tcnp)
  888         struct vnode *fdvp;
  889         struct vnode *fvp;
  890         struct componentname *fcnp;
  891         struct vnode *tdvp;
  892         struct vnode *tvp;
  893         struct componentname *tcnp;
  894 {
  895         struct vop_rename_args a;
  896 #ifdef VNODE_LOCKDEBUG
  897         int islocked_fdvp;
  898         int islocked_fvp;
  899         int islocked_tdvp;
  900 #endif
  901         a.a_desc = VDESC(vop_rename);
  902         a.a_fdvp = fdvp;
  903 #ifdef VNODE_LOCKDEBUG
  904         islocked_fdvp = (fdvp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(fdvp) == LK_EXCLUSIVE) : 0;
  905         if (islocked_fdvp != 0)
  906                 panic("vop_rename: fdvp: locked %d, expected %d", islocked_fdvp, 0);
  907 #endif
  908         a.a_fvp = fvp;
  909 #ifdef VNODE_LOCKDEBUG
  910         islocked_fvp = (fvp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(fvp) == LK_EXCLUSIVE) : 0;
  911         if (islocked_fvp != 0)
  912                 panic("vop_rename: fvp: locked %d, expected %d", islocked_fvp, 0);
  913 #endif
  914         a.a_fcnp = fcnp;
  915         a.a_tdvp = tdvp;
  916 #ifdef VNODE_LOCKDEBUG
  917         islocked_tdvp = (tdvp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(tdvp) == LK_EXCLUSIVE) : 1;
  918         if (islocked_tdvp != 1)
  919                 panic("vop_rename: tdvp: locked %d, expected %d", islocked_tdvp, 1);
  920 #endif
  921         a.a_tvp = tvp;
  922         a.a_tcnp = tcnp;
  923         return (VCALL(fdvp, VOFFSET(vop_rename), &a));
  924 }
  925 #endif
  926 
  927 struct vop_mkdir_args {
  928         const struct vnodeop_desc *a_desc;
  929         struct vnode *a_dvp;
  930         struct vnode **a_vpp;
  931         struct componentname *a_cnp;
  932         struct vattr *a_vap;
  933 };
  934 extern const struct vnodeop_desc vop_mkdir_desc;
  935 #ifndef VNODE_OP_NOINLINE
  936 static __inline
  937 #endif
  938 int VOP_MKDIR(struct vnode *, struct vnode **, struct componentname *, 
  939     struct vattr *)
  940 #ifndef VNODE_OP_NOINLINE
  941 __attribute__((__unused__))
  942 #endif
  943 ;
  944 #ifndef VNODE_OP_NOINLINE
  945 static __inline int VOP_MKDIR(dvp, vpp, cnp, vap)
  946         struct vnode *dvp;
  947         struct vnode **vpp;
  948         struct componentname *cnp;
  949         struct vattr *vap;
  950 {
  951         struct vop_mkdir_args a;
  952 #ifdef VNODE_LOCKDEBUG
  953         int islocked_dvp;
  954 #endif
  955         a.a_desc = VDESC(vop_mkdir);
  956         a.a_dvp = dvp;
  957 #ifdef VNODE_LOCKDEBUG
  958         islocked_dvp = (dvp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(dvp) == LK_EXCLUSIVE) : 1;
  959         if (islocked_dvp != 1)
  960                 panic("vop_mkdir: dvp: locked %d, expected %d", islocked_dvp, 1);
  961 #endif
  962         a.a_vpp = vpp;
  963         a.a_cnp = cnp;
  964         a.a_vap = vap;
  965         return (VCALL(dvp, VOFFSET(vop_mkdir), &a));
  966 }
  967 #endif
  968 
  969 struct vop_rmdir_args {
  970         const struct vnodeop_desc *a_desc;
  971         struct vnode *a_dvp;
  972         struct vnode *a_vp;
  973         struct componentname *a_cnp;
  974 };
  975 extern const struct vnodeop_desc vop_rmdir_desc;
  976 #ifndef VNODE_OP_NOINLINE
  977 static __inline
  978 #endif
  979 int VOP_RMDIR(struct vnode *, struct vnode *, struct componentname *)
  980 #ifndef VNODE_OP_NOINLINE
  981 __attribute__((__unused__))
  982 #endif
  983 ;
  984 #ifndef VNODE_OP_NOINLINE
  985 static __inline int VOP_RMDIR(dvp, vp, cnp)
  986         struct vnode *dvp;
  987         struct vnode *vp;
  988         struct componentname *cnp;
  989 {
  990         struct vop_rmdir_args a;
  991 #ifdef VNODE_LOCKDEBUG
  992         int islocked_dvp;
  993         int islocked_vp;
  994 #endif
  995         a.a_desc = VDESC(vop_rmdir);
  996         a.a_dvp = dvp;
  997 #ifdef VNODE_LOCKDEBUG
  998         islocked_dvp = (dvp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(dvp) == LK_EXCLUSIVE) : 1;
  999         if (islocked_dvp != 1)
 1000                 panic("vop_rmdir: dvp: locked %d, expected %d", islocked_dvp, 1);
 1001 #endif
 1002         a.a_vp = vp;
 1003 #ifdef VNODE_LOCKDEBUG
 1004         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 1005         if (islocked_vp != 1)
 1006                 panic("vop_rmdir: vp: locked %d, expected %d", islocked_vp, 1);
 1007 #endif
 1008         a.a_cnp = cnp;
 1009         return (VCALL(dvp, VOFFSET(vop_rmdir), &a));
 1010 }
 1011 #endif
 1012 
 1013 struct vop_symlink_args {
 1014         const struct vnodeop_desc *a_desc;
 1015         struct vnode *a_dvp;
 1016         struct vnode **a_vpp;
 1017         struct componentname *a_cnp;
 1018         struct vattr *a_vap;
 1019         char *a_target;
 1020 };
 1021 extern const struct vnodeop_desc vop_symlink_desc;
 1022 #ifndef VNODE_OP_NOINLINE
 1023 static __inline
 1024 #endif
 1025 int VOP_SYMLINK(struct vnode *, struct vnode **, struct componentname *, 
 1026     struct vattr *, char *)
 1027 #ifndef VNODE_OP_NOINLINE
 1028 __attribute__((__unused__))
 1029 #endif
 1030 ;
 1031 #ifndef VNODE_OP_NOINLINE
 1032 static __inline int VOP_SYMLINK(dvp, vpp, cnp, vap, target)
 1033         struct vnode *dvp;
 1034         struct vnode **vpp;
 1035         struct componentname *cnp;
 1036         struct vattr *vap;
 1037         char *target;
 1038 {
 1039         struct vop_symlink_args a;
 1040 #ifdef VNODE_LOCKDEBUG
 1041         int islocked_dvp;
 1042 #endif
 1043         a.a_desc = VDESC(vop_symlink);
 1044         a.a_dvp = dvp;
 1045 #ifdef VNODE_LOCKDEBUG
 1046         islocked_dvp = (dvp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(dvp) == LK_EXCLUSIVE) : 1;
 1047         if (islocked_dvp != 1)
 1048                 panic("vop_symlink: dvp: locked %d, expected %d", islocked_dvp, 1);
 1049 #endif
 1050         a.a_vpp = vpp;
 1051         a.a_cnp = cnp;
 1052         a.a_vap = vap;
 1053         a.a_target = target;
 1054         return (VCALL(dvp, VOFFSET(vop_symlink), &a));
 1055 }
 1056 #endif
 1057 
 1058 struct vop_readdir_args {
 1059         const struct vnodeop_desc *a_desc;
 1060         struct vnode *a_vp;
 1061         struct uio *a_uio;
 1062         struct ucred *a_cred;
 1063         int *a_eofflag;
 1064         off_t **a_cookies;
 1065         int *a_ncookies;
 1066 };
 1067 extern const struct vnodeop_desc vop_readdir_desc;
 1068 #ifndef VNODE_OP_NOINLINE
 1069 static __inline
 1070 #endif
 1071 int VOP_READDIR(struct vnode *, struct uio *, struct ucred *, int *, 
 1072     off_t **, int *)
 1073 #ifndef VNODE_OP_NOINLINE
 1074 __attribute__((__unused__))
 1075 #endif
 1076 ;
 1077 #ifndef VNODE_OP_NOINLINE
 1078 static __inline int VOP_READDIR(vp, uio, cred, eofflag, cookies, ncookies)
 1079         struct vnode *vp;
 1080         struct uio *uio;
 1081         struct ucred *cred;
 1082         int *eofflag;
 1083         off_t **cookies;
 1084         int *ncookies;
 1085 {
 1086         struct vop_readdir_args a;
 1087 #ifdef VNODE_LOCKDEBUG
 1088         int islocked_vp;
 1089 #endif
 1090         a.a_desc = VDESC(vop_readdir);
 1091         a.a_vp = vp;
 1092 #ifdef VNODE_LOCKDEBUG
 1093         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 1094         if (islocked_vp != 1)
 1095                 panic("vop_readdir: vp: locked %d, expected %d", islocked_vp, 1);
 1096 #endif
 1097         a.a_uio = uio;
 1098         a.a_cred = cred;
 1099         a.a_eofflag = eofflag;
 1100         a.a_cookies = cookies;
 1101         a.a_ncookies = ncookies;
 1102         return (VCALL(vp, VOFFSET(vop_readdir), &a));
 1103 }
 1104 #endif
 1105 
 1106 struct vop_readlink_args {
 1107         const struct vnodeop_desc *a_desc;
 1108         struct vnode *a_vp;
 1109         struct uio *a_uio;
 1110         struct ucred *a_cred;
 1111 };
 1112 extern const struct vnodeop_desc vop_readlink_desc;
 1113 #ifndef VNODE_OP_NOINLINE
 1114 static __inline
 1115 #endif
 1116 int VOP_READLINK(struct vnode *, struct uio *, struct ucred *)
 1117 #ifndef VNODE_OP_NOINLINE
 1118 __attribute__((__unused__))
 1119 #endif
 1120 ;
 1121 #ifndef VNODE_OP_NOINLINE
 1122 static __inline int VOP_READLINK(vp, uio, cred)
 1123         struct vnode *vp;
 1124         struct uio *uio;
 1125         struct ucred *cred;
 1126 {
 1127         struct vop_readlink_args a;
 1128 #ifdef VNODE_LOCKDEBUG
 1129         int islocked_vp;
 1130 #endif
 1131         a.a_desc = VDESC(vop_readlink);
 1132         a.a_vp = vp;
 1133 #ifdef VNODE_LOCKDEBUG
 1134         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 1135         if (islocked_vp != 1)
 1136                 panic("vop_readlink: vp: locked %d, expected %d", islocked_vp, 1);
 1137 #endif
 1138         a.a_uio = uio;
 1139         a.a_cred = cred;
 1140         return (VCALL(vp, VOFFSET(vop_readlink), &a));
 1141 }
 1142 #endif
 1143 
 1144 struct vop_abortop_args {
 1145         const struct vnodeop_desc *a_desc;
 1146         struct vnode *a_dvp;
 1147         struct componentname *a_cnp;
 1148 };
 1149 extern const struct vnodeop_desc vop_abortop_desc;
 1150 #ifndef VNODE_OP_NOINLINE
 1151 static __inline
 1152 #endif
 1153 int VOP_ABORTOP(struct vnode *, struct componentname *)
 1154 #ifndef VNODE_OP_NOINLINE
 1155 __attribute__((__unused__))
 1156 #endif
 1157 ;
 1158 #ifndef VNODE_OP_NOINLINE
 1159 static __inline int VOP_ABORTOP(dvp, cnp)
 1160         struct vnode *dvp;
 1161         struct componentname *cnp;
 1162 {
 1163         struct vop_abortop_args a;
 1164 #ifdef VNODE_LOCKDEBUG
 1165 #endif
 1166         a.a_desc = VDESC(vop_abortop);
 1167         a.a_dvp = dvp;
 1168         a.a_cnp = cnp;
 1169         return (VCALL(dvp, VOFFSET(vop_abortop), &a));
 1170 }
 1171 #endif
 1172 
 1173 struct vop_inactive_args {
 1174         const struct vnodeop_desc *a_desc;
 1175         struct vnode *a_vp;
 1176         struct proc *a_p;
 1177 };
 1178 extern const struct vnodeop_desc vop_inactive_desc;
 1179 #ifndef VNODE_OP_NOINLINE
 1180 static __inline
 1181 #endif
 1182 int VOP_INACTIVE(struct vnode *, struct proc *)
 1183 #ifndef VNODE_OP_NOINLINE
 1184 __attribute__((__unused__))
 1185 #endif
 1186 ;
 1187 #ifndef VNODE_OP_NOINLINE
 1188 static __inline int VOP_INACTIVE(vp, p)
 1189         struct vnode *vp;
 1190         struct proc *p;
 1191 {
 1192         struct vop_inactive_args a;
 1193 #ifdef VNODE_LOCKDEBUG
 1194         int islocked_vp;
 1195 #endif
 1196         a.a_desc = VDESC(vop_inactive);
 1197         a.a_vp = vp;
 1198 #ifdef VNODE_LOCKDEBUG
 1199         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 1200         if (islocked_vp != 1)
 1201                 panic("vop_inactive: vp: locked %d, expected %d", islocked_vp, 1);
 1202 #endif
 1203         a.a_p = p;
 1204         return (VCALL(vp, VOFFSET(vop_inactive), &a));
 1205 }
 1206 #endif
 1207 
 1208 struct vop_reclaim_args {
 1209         const struct vnodeop_desc *a_desc;
 1210         struct vnode *a_vp;
 1211         struct proc *a_p;
 1212 };
 1213 extern const struct vnodeop_desc vop_reclaim_desc;
 1214 #ifndef VNODE_OP_NOINLINE
 1215 static __inline
 1216 #endif
 1217 int VOP_RECLAIM(struct vnode *, struct proc *)
 1218 #ifndef VNODE_OP_NOINLINE
 1219 __attribute__((__unused__))
 1220 #endif
 1221 ;
 1222 #ifndef VNODE_OP_NOINLINE
 1223 static __inline int VOP_RECLAIM(vp, p)
 1224         struct vnode *vp;
 1225         struct proc *p;
 1226 {
 1227         struct vop_reclaim_args a;
 1228 #ifdef VNODE_LOCKDEBUG
 1229         int islocked_vp;
 1230 #endif
 1231         a.a_desc = VDESC(vop_reclaim);
 1232         a.a_vp = vp;
 1233 #ifdef VNODE_LOCKDEBUG
 1234         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 0;
 1235         if (islocked_vp != 0)
 1236                 panic("vop_reclaim: vp: locked %d, expected %d", islocked_vp, 0);
 1237 #endif
 1238         a.a_p = p;
 1239         return (VCALL(vp, VOFFSET(vop_reclaim), &a));
 1240 }
 1241 #endif
 1242 
 1243 struct vop_lock_args {
 1244         const struct vnodeop_desc *a_desc;
 1245         struct vnode *a_vp;
 1246         int a_flags;
 1247 };
 1248 extern const struct vnodeop_desc vop_lock_desc;
 1249 #ifndef VNODE_OP_NOINLINE
 1250 static __inline
 1251 #endif
 1252 int VOP_LOCK(struct vnode *, int)
 1253 #ifndef VNODE_OP_NOINLINE
 1254 __attribute__((__unused__))
 1255 #endif
 1256 ;
 1257 #ifndef VNODE_OP_NOINLINE
 1258 static __inline int VOP_LOCK(vp, flags)
 1259         struct vnode *vp;
 1260         int flags;
 1261 {
 1262         struct vop_lock_args a;
 1263 #ifdef VNODE_LOCKDEBUG
 1264         int islocked_vp;
 1265 #endif
 1266         a.a_desc = VDESC(vop_lock);
 1267         a.a_vp = vp;
 1268 #ifdef VNODE_LOCKDEBUG
 1269         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 0;
 1270         if (islocked_vp != 0)
 1271                 panic("vop_lock: vp: locked %d, expected %d", islocked_vp, 0);
 1272 #endif
 1273         a.a_flags = flags;
 1274         return (VCALL(vp, VOFFSET(vop_lock), &a));
 1275 }
 1276 #endif
 1277 
 1278 struct vop_unlock_args {
 1279         const struct vnodeop_desc *a_desc;
 1280         struct vnode *a_vp;
 1281         int a_flags;
 1282 };
 1283 extern const struct vnodeop_desc vop_unlock_desc;
 1284 #ifndef VNODE_OP_NOINLINE
 1285 static __inline
 1286 #endif
 1287 int VOP_UNLOCK(struct vnode *, int)
 1288 #ifndef VNODE_OP_NOINLINE
 1289 __attribute__((__unused__))
 1290 #endif
 1291 ;
 1292 #ifndef VNODE_OP_NOINLINE
 1293 static __inline int VOP_UNLOCK(vp, flags)
 1294         struct vnode *vp;
 1295         int flags;
 1296 {
 1297         struct vop_unlock_args a;
 1298 #ifdef VNODE_LOCKDEBUG
 1299         int islocked_vp;
 1300 #endif
 1301         a.a_desc = VDESC(vop_unlock);
 1302         a.a_vp = vp;
 1303 #ifdef VNODE_LOCKDEBUG
 1304         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 1305         if (islocked_vp != 1)
 1306                 panic("vop_unlock: vp: locked %d, expected %d", islocked_vp, 1);
 1307 #endif
 1308         a.a_flags = flags;
 1309         return (VCALL(vp, VOFFSET(vop_unlock), &a));
 1310 }
 1311 #endif
 1312 
 1313 struct vop_bmap_args {
 1314         const struct vnodeop_desc *a_desc;
 1315         struct vnode *a_vp;
 1316         daddr_t a_bn;
 1317         struct vnode **a_vpp;
 1318         daddr_t *a_bnp;
 1319         int *a_runp;
 1320 };
 1321 extern const struct vnodeop_desc vop_bmap_desc;
 1322 #ifndef VNODE_OP_NOINLINE
 1323 static __inline
 1324 #endif
 1325 int VOP_BMAP(struct vnode *, daddr_t, struct vnode **, daddr_t *, int *)
 1326 #ifndef VNODE_OP_NOINLINE
 1327 __attribute__((__unused__))
 1328 #endif
 1329 ;
 1330 #ifndef VNODE_OP_NOINLINE
 1331 static __inline int VOP_BMAP(vp, bn, vpp, bnp, runp)
 1332         struct vnode *vp;
 1333         daddr_t bn;
 1334         struct vnode **vpp;
 1335         daddr_t *bnp;
 1336         int *runp;
 1337 {
 1338         struct vop_bmap_args a;
 1339 #ifdef VNODE_LOCKDEBUG
 1340         int islocked_vp;
 1341 #endif
 1342         a.a_desc = VDESC(vop_bmap);
 1343         a.a_vp = vp;
 1344 #ifdef VNODE_LOCKDEBUG
 1345         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 1346         if (islocked_vp != 1)
 1347                 panic("vop_bmap: vp: locked %d, expected %d", islocked_vp, 1);
 1348 #endif
 1349         a.a_bn = bn;
 1350         a.a_vpp = vpp;
 1351         a.a_bnp = bnp;
 1352         a.a_runp = runp;
 1353         return (VCALL(vp, VOFFSET(vop_bmap), &a));
 1354 }
 1355 #endif
 1356 
 1357 struct vop_strategy_args {
 1358         const struct vnodeop_desc *a_desc;
 1359         struct vnode *a_vp;
 1360         struct buf *a_bp;
 1361 };
 1362 extern const struct vnodeop_desc vop_strategy_desc;
 1363 #ifndef VNODE_OP_NOINLINE
 1364 static __inline
 1365 #endif
 1366 int VOP_STRATEGY(struct vnode *, struct buf *)
 1367 #ifndef VNODE_OP_NOINLINE
 1368 __attribute__((__unused__))
 1369 #endif
 1370 ;
 1371 #ifndef VNODE_OP_NOINLINE
 1372 static __inline int VOP_STRATEGY(vp, bp)
 1373         struct vnode *vp;
 1374         struct buf *bp;
 1375 {
 1376         struct vop_strategy_args a;
 1377 #ifdef VNODE_LOCKDEBUG
 1378 #endif
 1379         a.a_desc = VDESC(vop_strategy);
 1380         a.a_vp = vp;
 1381         a.a_bp = bp;
 1382         return (VCALL(vp, VOFFSET(vop_strategy), &a));
 1383 }
 1384 #endif
 1385 
 1386 struct vop_print_args {
 1387         const struct vnodeop_desc *a_desc;
 1388         struct vnode *a_vp;
 1389 };
 1390 extern const struct vnodeop_desc vop_print_desc;
 1391 #ifndef VNODE_OP_NOINLINE
 1392 static __inline
 1393 #endif
 1394 int VOP_PRINT(struct vnode *)
 1395 #ifndef VNODE_OP_NOINLINE
 1396 __attribute__((__unused__))
 1397 #endif
 1398 ;
 1399 #ifndef VNODE_OP_NOINLINE
 1400 static __inline int VOP_PRINT(vp)
 1401         struct vnode *vp;
 1402 {
 1403         struct vop_print_args a;
 1404 #ifdef VNODE_LOCKDEBUG
 1405 #endif
 1406         a.a_desc = VDESC(vop_print);
 1407         a.a_vp = vp;
 1408         return (VCALL(vp, VOFFSET(vop_print), &a));
 1409 }
 1410 #endif
 1411 
 1412 struct vop_islocked_args {
 1413         const struct vnodeop_desc *a_desc;
 1414         struct vnode *a_vp;
 1415 };
 1416 extern const struct vnodeop_desc vop_islocked_desc;
 1417 #ifndef VNODE_OP_NOINLINE
 1418 static __inline
 1419 #endif
 1420 int VOP_ISLOCKED(struct vnode *)
 1421 #ifndef VNODE_OP_NOINLINE
 1422 __attribute__((__unused__))
 1423 #endif
 1424 ;
 1425 #ifndef VNODE_OP_NOINLINE
 1426 static __inline int VOP_ISLOCKED(vp)
 1427         struct vnode *vp;
 1428 {
 1429         struct vop_islocked_args a;
 1430 #ifdef VNODE_LOCKDEBUG
 1431 #endif
 1432         a.a_desc = VDESC(vop_islocked);
 1433         a.a_vp = vp;
 1434         return (VCALL(vp, VOFFSET(vop_islocked), &a));
 1435 }
 1436 #endif
 1437 
 1438 struct vop_pathconf_args {
 1439         const struct vnodeop_desc *a_desc;
 1440         struct vnode *a_vp;
 1441         int a_name;
 1442         register_t *a_retval;
 1443 };
 1444 extern const struct vnodeop_desc vop_pathconf_desc;
 1445 #ifndef VNODE_OP_NOINLINE
 1446 static __inline
 1447 #endif
 1448 int VOP_PATHCONF(struct vnode *, int, register_t *)
 1449 #ifndef VNODE_OP_NOINLINE
 1450 __attribute__((__unused__))
 1451 #endif
 1452 ;
 1453 #ifndef VNODE_OP_NOINLINE
 1454 static __inline int VOP_PATHCONF(vp, name, retval)
 1455         struct vnode *vp;
 1456         int name;
 1457         register_t *retval;
 1458 {
 1459         struct vop_pathconf_args a;
 1460 #ifdef VNODE_LOCKDEBUG
 1461         int islocked_vp;
 1462 #endif
 1463         a.a_desc = VDESC(vop_pathconf);
 1464         a.a_vp = vp;
 1465 #ifdef VNODE_LOCKDEBUG
 1466         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 1467         if (islocked_vp != 1)
 1468                 panic("vop_pathconf: vp: locked %d, expected %d", islocked_vp, 1);
 1469 #endif
 1470         a.a_name = name;
 1471         a.a_retval = retval;
 1472         return (VCALL(vp, VOFFSET(vop_pathconf), &a));
 1473 }
 1474 #endif
 1475 
 1476 struct vop_advlock_args {
 1477         const struct vnodeop_desc *a_desc;
 1478         struct vnode *a_vp;
 1479         void *a_id;
 1480         int a_op;
 1481         struct flock *a_fl;
 1482         int a_flags;
 1483 };
 1484 extern const struct vnodeop_desc vop_advlock_desc;
 1485 #ifndef VNODE_OP_NOINLINE
 1486 static __inline
 1487 #endif
 1488 int VOP_ADVLOCK(struct vnode *, void *, int, struct flock *, int)
 1489 #ifndef VNODE_OP_NOINLINE
 1490 __attribute__((__unused__))
 1491 #endif
 1492 ;
 1493 #ifndef VNODE_OP_NOINLINE
 1494 static __inline int VOP_ADVLOCK(vp, id, op, fl, flags)
 1495         struct vnode *vp;
 1496         void *id;
 1497         int op;
 1498         struct flock *fl;
 1499         int flags;
 1500 {
 1501         struct vop_advlock_args a;
 1502 #ifdef VNODE_LOCKDEBUG
 1503         int islocked_vp;
 1504 #endif
 1505         a.a_desc = VDESC(vop_advlock);
 1506         a.a_vp = vp;
 1507 #ifdef VNODE_LOCKDEBUG
 1508         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 0;
 1509         if (islocked_vp != 0)
 1510                 panic("vop_advlock: vp: locked %d, expected %d", islocked_vp, 0);
 1511 #endif
 1512         a.a_id = id;
 1513         a.a_op = op;
 1514         a.a_fl = fl;
 1515         a.a_flags = flags;
 1516         return (VCALL(vp, VOFFSET(vop_advlock), &a));
 1517 }
 1518 #endif
 1519 
 1520 struct vop_blkatoff_args {
 1521         const struct vnodeop_desc *a_desc;
 1522         struct vnode *a_vp;
 1523         off_t a_offset;
 1524         char **a_res;
 1525         struct buf **a_bpp;
 1526 };
 1527 extern const struct vnodeop_desc vop_blkatoff_desc;
 1528 #ifndef VNODE_OP_NOINLINE
 1529 static __inline
 1530 #endif
 1531 int VOP_BLKATOFF(struct vnode *, off_t, char **, struct buf **)
 1532 #ifndef VNODE_OP_NOINLINE
 1533 __attribute__((__unused__))
 1534 #endif
 1535 ;
 1536 #ifndef VNODE_OP_NOINLINE
 1537 static __inline int VOP_BLKATOFF(vp, offset, res, bpp)
 1538         struct vnode *vp;
 1539         off_t offset;
 1540         char **res;
 1541         struct buf **bpp;
 1542 {
 1543         struct vop_blkatoff_args a;
 1544 #ifdef VNODE_LOCKDEBUG
 1545         int islocked_vp;
 1546 #endif
 1547         a.a_desc = VDESC(vop_blkatoff);
 1548         a.a_vp = vp;
 1549 #ifdef VNODE_LOCKDEBUG
 1550         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 1551         if (islocked_vp != 1)
 1552                 panic("vop_blkatoff: vp: locked %d, expected %d", islocked_vp, 1);
 1553 #endif
 1554         a.a_offset = offset;
 1555         a.a_res = res;
 1556         a.a_bpp = bpp;
 1557         return (VCALL(vp, VOFFSET(vop_blkatoff), &a));
 1558 }
 1559 #endif
 1560 
 1561 struct vop_valloc_args {
 1562         const struct vnodeop_desc *a_desc;
 1563         struct vnode *a_pvp;
 1564         int a_mode;
 1565         struct ucred *a_cred;
 1566         struct vnode **a_vpp;
 1567 };
 1568 extern const struct vnodeop_desc vop_valloc_desc;
 1569 #ifndef VNODE_OP_NOINLINE
 1570 static __inline
 1571 #endif
 1572 int VOP_VALLOC(struct vnode *, int, struct ucred *, struct vnode **)
 1573 #ifndef VNODE_OP_NOINLINE
 1574 __attribute__((__unused__))
 1575 #endif
 1576 ;
 1577 #ifndef VNODE_OP_NOINLINE
 1578 static __inline int VOP_VALLOC(pvp, mode, cred, vpp)
 1579         struct vnode *pvp;
 1580         int mode;
 1581         struct ucred *cred;
 1582         struct vnode **vpp;
 1583 {
 1584         struct vop_valloc_args a;
 1585 #ifdef VNODE_LOCKDEBUG
 1586         int islocked_pvp;
 1587 #endif
 1588         a.a_desc = VDESC(vop_valloc);
 1589         a.a_pvp = pvp;
 1590 #ifdef VNODE_LOCKDEBUG
 1591         islocked_pvp = (pvp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(pvp) == LK_EXCLUSIVE) : 1;
 1592         if (islocked_pvp != 1)
 1593                 panic("vop_valloc: pvp: locked %d, expected %d", islocked_pvp, 1);
 1594 #endif
 1595         a.a_mode = mode;
 1596         a.a_cred = cred;
 1597         a.a_vpp = vpp;
 1598         return (VCALL(pvp, VOFFSET(vop_valloc), &a));
 1599 }
 1600 #endif
 1601 
 1602 struct vop_balloc_args {
 1603         const struct vnodeop_desc *a_desc;
 1604         struct vnode *a_vp;
 1605         off_t a_startoffset;
 1606         int a_size;
 1607         struct ucred *a_cred;
 1608         int a_flags;
 1609         struct buf **a_bpp;
 1610 };
 1611 extern const struct vnodeop_desc vop_balloc_desc;
 1612 #ifndef VNODE_OP_NOINLINE
 1613 static __inline
 1614 #endif
 1615 int VOP_BALLOC(struct vnode *, off_t, int, struct ucred *, int, struct buf **)
 1616 #ifndef VNODE_OP_NOINLINE
 1617 __attribute__((__unused__))
 1618 #endif
 1619 ;
 1620 #ifndef VNODE_OP_NOINLINE
 1621 static __inline int VOP_BALLOC(vp, startoffset, size, cred, flags, bpp)
 1622         struct vnode *vp;
 1623         off_t startoffset;
 1624         int size;
 1625         struct ucred *cred;
 1626         int flags;
 1627         struct buf **bpp;
 1628 {
 1629         struct vop_balloc_args a;
 1630 #ifdef VNODE_LOCKDEBUG
 1631         int islocked_vp;
 1632 #endif
 1633         a.a_desc = VDESC(vop_balloc);
 1634         a.a_vp = vp;
 1635 #ifdef VNODE_LOCKDEBUG
 1636         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 1637         if (islocked_vp != 1)
 1638                 panic("vop_balloc: vp: locked %d, expected %d", islocked_vp, 1);
 1639 #endif
 1640         a.a_startoffset = startoffset;
 1641         a.a_size = size;
 1642         a.a_cred = cred;
 1643         a.a_flags = flags;
 1644         a.a_bpp = bpp;
 1645         return (VCALL(vp, VOFFSET(vop_balloc), &a));
 1646 }
 1647 #endif
 1648 
 1649 struct vop_reallocblks_args {
 1650         const struct vnodeop_desc *a_desc;
 1651         struct vnode *a_vp;
 1652         struct cluster_save *a_buflist;
 1653 };
 1654 extern const struct vnodeop_desc vop_reallocblks_desc;
 1655 #ifndef VNODE_OP_NOINLINE
 1656 static __inline
 1657 #endif
 1658 int VOP_REALLOCBLKS(struct vnode *, struct cluster_save *)
 1659 #ifndef VNODE_OP_NOINLINE
 1660 __attribute__((__unused__))
 1661 #endif
 1662 ;
 1663 #ifndef VNODE_OP_NOINLINE
 1664 static __inline int VOP_REALLOCBLKS(vp, buflist)
 1665         struct vnode *vp;
 1666         struct cluster_save *buflist;
 1667 {
 1668         struct vop_reallocblks_args a;
 1669 #ifdef VNODE_LOCKDEBUG
 1670         int islocked_vp;
 1671 #endif
 1672         a.a_desc = VDESC(vop_reallocblks);
 1673         a.a_vp = vp;
 1674 #ifdef VNODE_LOCKDEBUG
 1675         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 1676         if (islocked_vp != 1)
 1677                 panic("vop_reallocblks: vp: locked %d, expected %d", islocked_vp, 1);
 1678 #endif
 1679         a.a_buflist = buflist;
 1680         return (VCALL(vp, VOFFSET(vop_reallocblks), &a));
 1681 }
 1682 #endif
 1683 
 1684 struct vop_vfree_args {
 1685         const struct vnodeop_desc *a_desc;
 1686         struct vnode *a_pvp;
 1687         ino_t a_ino;
 1688         int a_mode;
 1689 };
 1690 extern const struct vnodeop_desc vop_vfree_desc;
 1691 #ifndef VNODE_OP_NOINLINE
 1692 static __inline
 1693 #endif
 1694 int VOP_VFREE(struct vnode *, ino_t, int)
 1695 #ifndef VNODE_OP_NOINLINE
 1696 __attribute__((__unused__))
 1697 #endif
 1698 ;
 1699 #ifndef VNODE_OP_NOINLINE
 1700 static __inline int VOP_VFREE(pvp, ino, mode)
 1701         struct vnode *pvp;
 1702         ino_t ino;
 1703         int mode;
 1704 {
 1705         struct vop_vfree_args a;
 1706 #ifdef VNODE_LOCKDEBUG
 1707         int islocked_pvp;
 1708 #endif
 1709         a.a_desc = VDESC(vop_vfree);
 1710         a.a_pvp = pvp;
 1711 #ifdef VNODE_LOCKDEBUG
 1712         islocked_pvp = (pvp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(pvp) == LK_EXCLUSIVE) : 1;
 1713         if (islocked_pvp != 1)
 1714                 panic("vop_vfree: pvp: locked %d, expected %d", islocked_pvp, 1);
 1715 #endif
 1716         a.a_ino = ino;
 1717         a.a_mode = mode;
 1718         return (VCALL(pvp, VOFFSET(vop_vfree), &a));
 1719 }
 1720 #endif
 1721 
 1722 struct vop_truncate_args {
 1723         const struct vnodeop_desc *a_desc;
 1724         struct vnode *a_vp;
 1725         off_t a_length;
 1726         int a_flags;
 1727         struct ucred *a_cred;
 1728         struct proc *a_p;
 1729 };
 1730 extern const struct vnodeop_desc vop_truncate_desc;
 1731 #ifndef VNODE_OP_NOINLINE
 1732 static __inline
 1733 #endif
 1734 int VOP_TRUNCATE(struct vnode *, off_t, int, struct ucred *, struct proc *)
 1735 #ifndef VNODE_OP_NOINLINE
 1736 __attribute__((__unused__))
 1737 #endif
 1738 ;
 1739 #ifndef VNODE_OP_NOINLINE
 1740 static __inline int VOP_TRUNCATE(vp, length, flags, cred, p)
 1741         struct vnode *vp;
 1742         off_t length;
 1743         int flags;
 1744         struct ucred *cred;
 1745         struct proc *p;
 1746 {
 1747         struct vop_truncate_args a;
 1748 #ifdef VNODE_LOCKDEBUG
 1749         int islocked_vp;
 1750 #endif
 1751         a.a_desc = VDESC(vop_truncate);
 1752         a.a_vp = vp;
 1753 #ifdef VNODE_LOCKDEBUG
 1754         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 1755         if (islocked_vp != 1)
 1756                 panic("vop_truncate: vp: locked %d, expected %d", islocked_vp, 1);
 1757 #endif
 1758         a.a_length = length;
 1759         a.a_flags = flags;
 1760         a.a_cred = cred;
 1761         a.a_p = p;
 1762         return (VCALL(vp, VOFFSET(vop_truncate), &a));
 1763 }
 1764 #endif
 1765 
 1766 struct vop_update_args {
 1767         const struct vnodeop_desc *a_desc;
 1768         struct vnode *a_vp;
 1769         struct timespec *a_access;
 1770         struct timespec *a_modify;
 1771         int a_flags;
 1772 };
 1773 extern const struct vnodeop_desc vop_update_desc;
 1774 #ifndef VNODE_OP_NOINLINE
 1775 static __inline
 1776 #endif
 1777 int VOP_UPDATE(struct vnode *, struct timespec *, struct timespec *, int)
 1778 #ifndef VNODE_OP_NOINLINE
 1779 __attribute__((__unused__))
 1780 #endif
 1781 ;
 1782 #ifndef VNODE_OP_NOINLINE
 1783 static __inline int VOP_UPDATE(vp, access, modify, flags)
 1784         struct vnode *vp;
 1785         struct timespec *access;
 1786         struct timespec *modify;
 1787         int flags;
 1788 {
 1789         struct vop_update_args a;
 1790 #ifdef VNODE_LOCKDEBUG
 1791         int islocked_vp;
 1792 #endif
 1793         a.a_desc = VDESC(vop_update);
 1794         a.a_vp = vp;
 1795 #ifdef VNODE_LOCKDEBUG
 1796         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 1797         if (islocked_vp != 1)
 1798                 panic("vop_update: vp: locked %d, expected %d", islocked_vp, 1);
 1799 #endif
 1800         a.a_access = access;
 1801         a.a_modify = modify;
 1802         a.a_flags = flags;
 1803         return (VCALL(vp, VOFFSET(vop_update), &a));
 1804 }
 1805 #endif
 1806 
 1807 struct vop_lease_args {
 1808         const struct vnodeop_desc *a_desc;
 1809         struct vnode *a_vp;
 1810         struct proc *a_p;
 1811         struct ucred *a_cred;
 1812         int a_flag;
 1813 };
 1814 extern const struct vnodeop_desc vop_lease_desc;
 1815 #ifndef VNODE_OP_NOINLINE
 1816 static __inline
 1817 #endif
 1818 int VOP_LEASE(struct vnode *, struct proc *, struct ucred *, int)
 1819 #ifndef VNODE_OP_NOINLINE
 1820 __attribute__((__unused__))
 1821 #endif
 1822 ;
 1823 #ifndef VNODE_OP_NOINLINE
 1824 static __inline int VOP_LEASE(vp, p, cred, flag)
 1825         struct vnode *vp;
 1826         struct proc *p;
 1827         struct ucred *cred;
 1828         int flag;
 1829 {
 1830         struct vop_lease_args a;
 1831 #ifdef VNODE_LOCKDEBUG
 1832 #endif
 1833         a.a_desc = VDESC(vop_lease);
 1834         a.a_vp = vp;
 1835         a.a_p = p;
 1836         a.a_cred = cred;
 1837         a.a_flag = flag;
 1838         return (VCALL(vp, VOFFSET(vop_lease), &a));
 1839 }
 1840 #endif
 1841 
 1842 struct vop_whiteout_args {
 1843         const struct vnodeop_desc *a_desc;
 1844         struct vnode *a_dvp;
 1845         struct componentname *a_cnp;
 1846         int a_flags;
 1847 };
 1848 extern const struct vnodeop_desc vop_whiteout_desc;
 1849 #ifndef VNODE_OP_NOINLINE
 1850 static __inline
 1851 #endif
 1852 int VOP_WHITEOUT(struct vnode *, struct componentname *, int)
 1853 #ifndef VNODE_OP_NOINLINE
 1854 __attribute__((__unused__))
 1855 #endif
 1856 ;
 1857 #ifndef VNODE_OP_NOINLINE
 1858 static __inline int VOP_WHITEOUT(dvp, cnp, flags)
 1859         struct vnode *dvp;
 1860         struct componentname *cnp;
 1861         int flags;
 1862 {
 1863         struct vop_whiteout_args a;
 1864 #ifdef VNODE_LOCKDEBUG
 1865         int islocked_dvp;
 1866 #endif
 1867         a.a_desc = VDESC(vop_whiteout);
 1868         a.a_dvp = dvp;
 1869 #ifdef VNODE_LOCKDEBUG
 1870         islocked_dvp = (dvp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(dvp) == LK_EXCLUSIVE) : 1;
 1871         if (islocked_dvp != 1)
 1872                 panic("vop_whiteout: dvp: locked %d, expected %d", islocked_dvp, 1);
 1873 #endif
 1874         a.a_cnp = cnp;
 1875         a.a_flags = flags;
 1876         return (VCALL(dvp, VOFFSET(vop_whiteout), &a));
 1877 }
 1878 #endif
 1879 
 1880 struct vop_getpages_args {
 1881         const struct vnodeop_desc *a_desc;
 1882         struct vnode *a_vp;
 1883         voff_t a_offset;
 1884         struct vm_page **a_m;
 1885         int *a_count;
 1886         int a_centeridx;
 1887         vm_prot_t a_access_type;
 1888         int a_advice;
 1889         int a_flags;
 1890 };
 1891 extern const struct vnodeop_desc vop_getpages_desc;
 1892 #ifndef VNODE_OP_NOINLINE
 1893 static __inline
 1894 #endif
 1895 int VOP_GETPAGES(struct vnode *, voff_t, struct vm_page **, int *, int, 
 1896     vm_prot_t, int, int)
 1897 #ifndef VNODE_OP_NOINLINE
 1898 __attribute__((__unused__))
 1899 #endif
 1900 ;
 1901 #ifndef VNODE_OP_NOINLINE
 1902 static __inline int VOP_GETPAGES(vp, offset, m, count, centeridx, access_type, advice, flags)
 1903         struct vnode *vp;
 1904         voff_t offset;
 1905         struct vm_page **m;
 1906         int *count;
 1907         int centeridx;
 1908         vm_prot_t access_type;
 1909         int advice;
 1910         int flags;
 1911 {
 1912         struct vop_getpages_args a;
 1913 #ifdef VNODE_LOCKDEBUG
 1914 #endif
 1915         a.a_desc = VDESC(vop_getpages);
 1916         a.a_vp = vp;
 1917         a.a_offset = offset;
 1918         a.a_m = m;
 1919         a.a_count = count;
 1920         a.a_centeridx = centeridx;
 1921         a.a_access_type = access_type;
 1922         a.a_advice = advice;
 1923         a.a_flags = flags;
 1924         return (VCALL(vp, VOFFSET(vop_getpages), &a));
 1925 }
 1926 #endif
 1927 
 1928 struct vop_putpages_args {
 1929         const struct vnodeop_desc *a_desc;
 1930         struct vnode *a_vp;
 1931         voff_t a_offlo;
 1932         voff_t a_offhi;
 1933         int a_flags;
 1934 };
 1935 extern const struct vnodeop_desc vop_putpages_desc;
 1936 #ifndef VNODE_OP_NOINLINE
 1937 static __inline
 1938 #endif
 1939 int VOP_PUTPAGES(struct vnode *, voff_t, voff_t, int)
 1940 #ifndef VNODE_OP_NOINLINE
 1941 __attribute__((__unused__))
 1942 #endif
 1943 ;
 1944 #ifndef VNODE_OP_NOINLINE
 1945 static __inline int VOP_PUTPAGES(vp, offlo, offhi, flags)
 1946         struct vnode *vp;
 1947         voff_t offlo;
 1948         voff_t offhi;
 1949         int flags;
 1950 {
 1951         struct vop_putpages_args a;
 1952 #ifdef VNODE_LOCKDEBUG
 1953 #endif
 1954         a.a_desc = VDESC(vop_putpages);
 1955         a.a_vp = vp;
 1956         a.a_offlo = offlo;
 1957         a.a_offhi = offhi;
 1958         a.a_flags = flags;
 1959         return (VCALL(vp, VOFFSET(vop_putpages), &a));
 1960 }
 1961 #endif
 1962 
 1963 struct vop_closeextattr_args {
 1964         const struct vnodeop_desc *a_desc;
 1965         struct vnode *a_vp;
 1966         int a_commit;
 1967         struct ucred *a_cred;
 1968         struct proc *a_p;
 1969 };
 1970 extern const struct vnodeop_desc vop_closeextattr_desc;
 1971 #ifndef VNODE_OP_NOINLINE
 1972 static __inline
 1973 #endif
 1974 int VOP_CLOSEEXTATTR(struct vnode *, int, struct ucred *, struct proc *)
 1975 #ifndef VNODE_OP_NOINLINE
 1976 __attribute__((__unused__))
 1977 #endif
 1978 ;
 1979 #ifndef VNODE_OP_NOINLINE
 1980 static __inline int VOP_CLOSEEXTATTR(vp, commit, cred, p)
 1981         struct vnode *vp;
 1982         int commit;
 1983         struct ucred *cred;
 1984         struct proc *p;
 1985 {
 1986         struct vop_closeextattr_args a;
 1987 #ifdef VNODE_LOCKDEBUG
 1988         int islocked_vp;
 1989 #endif
 1990         a.a_desc = VDESC(vop_closeextattr);
 1991         a.a_vp = vp;
 1992 #ifdef VNODE_LOCKDEBUG
 1993         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 1994         if (islocked_vp != 1)
 1995                 panic("vop_closeextattr: vp: locked %d, expected %d", islocked_vp, 1);
 1996 #endif
 1997         a.a_commit = commit;
 1998         a.a_cred = cred;
 1999         a.a_p = p;
 2000         return (VCALL(vp, VOFFSET(vop_closeextattr), &a));
 2001 }
 2002 #endif
 2003 
 2004 struct vop_getextattr_args {
 2005         const struct vnodeop_desc *a_desc;
 2006         struct vnode *a_vp;
 2007         int a_attrnamespace;
 2008         const char *a_name;
 2009         struct uio *a_uio;
 2010         size_t *a_size;
 2011         struct ucred *a_cred;
 2012         struct proc *a_p;
 2013 };
 2014 extern const struct vnodeop_desc vop_getextattr_desc;
 2015 #ifndef VNODE_OP_NOINLINE
 2016 static __inline
 2017 #endif
 2018 int VOP_GETEXTATTR(struct vnode *, int, const char *, struct uio *, 
 2019     size_t *, struct ucred *, struct proc *)
 2020 #ifndef VNODE_OP_NOINLINE
 2021 __attribute__((__unused__))
 2022 #endif
 2023 ;
 2024 #ifndef VNODE_OP_NOINLINE
 2025 static __inline int VOP_GETEXTATTR(vp, attrnamespace, name, uio, size, cred, p)
 2026         struct vnode *vp;
 2027         int attrnamespace;
 2028         const char *name;
 2029         struct uio *uio;
 2030         size_t *size;
 2031         struct ucred *cred;
 2032         struct proc *p;
 2033 {
 2034         struct vop_getextattr_args a;
 2035 #ifdef VNODE_LOCKDEBUG
 2036         int islocked_vp;
 2037 #endif
 2038         a.a_desc = VDESC(vop_getextattr);
 2039         a.a_vp = vp;
 2040 #ifdef VNODE_LOCKDEBUG
 2041         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 2042         if (islocked_vp != 1)
 2043                 panic("vop_getextattr: vp: locked %d, expected %d", islocked_vp, 1);
 2044 #endif
 2045         a.a_attrnamespace = attrnamespace;
 2046         a.a_name = name;
 2047         a.a_uio = uio;
 2048         a.a_size = size;
 2049         a.a_cred = cred;
 2050         a.a_p = p;
 2051         return (VCALL(vp, VOFFSET(vop_getextattr), &a));
 2052 }
 2053 #endif
 2054 
 2055 struct vop_listextattr_args {
 2056         const struct vnodeop_desc *a_desc;
 2057         struct vnode *a_vp;
 2058         int a_attrnamespace;
 2059         struct uio *a_uio;
 2060         size_t *a_size;
 2061         struct ucred *a_cred;
 2062         struct proc *a_p;
 2063 };
 2064 extern const struct vnodeop_desc vop_listextattr_desc;
 2065 #ifndef VNODE_OP_NOINLINE
 2066 static __inline
 2067 #endif
 2068 int VOP_LISTEXTATTR(struct vnode *, int, struct uio *, size_t *, 
 2069     struct ucred *, struct proc *)
 2070 #ifndef VNODE_OP_NOINLINE
 2071 __attribute__((__unused__))
 2072 #endif
 2073 ;
 2074 #ifndef VNODE_OP_NOINLINE
 2075 static __inline int VOP_LISTEXTATTR(vp, attrnamespace, uio, size, cred, p)
 2076         struct vnode *vp;
 2077         int attrnamespace;
 2078         struct uio *uio;
 2079         size_t *size;
 2080         struct ucred *cred;
 2081         struct proc *p;
 2082 {
 2083         struct vop_listextattr_args a;
 2084 #ifdef VNODE_LOCKDEBUG
 2085         int islocked_vp;
 2086 #endif
 2087         a.a_desc = VDESC(vop_listextattr);
 2088         a.a_vp = vp;
 2089 #ifdef VNODE_LOCKDEBUG
 2090         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 2091         if (islocked_vp != 1)
 2092                 panic("vop_listextattr: vp: locked %d, expected %d", islocked_vp, 1);
 2093 #endif
 2094         a.a_attrnamespace = attrnamespace;
 2095         a.a_uio = uio;
 2096         a.a_size = size;
 2097         a.a_cred = cred;
 2098         a.a_p = p;
 2099         return (VCALL(vp, VOFFSET(vop_listextattr), &a));
 2100 }
 2101 #endif
 2102 
 2103 struct vop_openextattr_args {
 2104         const struct vnodeop_desc *a_desc;
 2105         struct vnode *a_vp;
 2106         struct ucred *a_cred;
 2107         struct proc *a_p;
 2108 };
 2109 extern const struct vnodeop_desc vop_openextattr_desc;
 2110 #ifndef VNODE_OP_NOINLINE
 2111 static __inline
 2112 #endif
 2113 int VOP_OPENEXTATTR(struct vnode *, struct ucred *, struct proc *)
 2114 #ifndef VNODE_OP_NOINLINE
 2115 __attribute__((__unused__))
 2116 #endif
 2117 ;
 2118 #ifndef VNODE_OP_NOINLINE
 2119 static __inline int VOP_OPENEXTATTR(vp, cred, p)
 2120         struct vnode *vp;
 2121         struct ucred *cred;
 2122         struct proc *p;
 2123 {
 2124         struct vop_openextattr_args a;
 2125 #ifdef VNODE_LOCKDEBUG
 2126         int islocked_vp;
 2127 #endif
 2128         a.a_desc = VDESC(vop_openextattr);
 2129         a.a_vp = vp;
 2130 #ifdef VNODE_LOCKDEBUG
 2131         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 2132         if (islocked_vp != 1)
 2133                 panic("vop_openextattr: vp: locked %d, expected %d", islocked_vp, 1);
 2134 #endif
 2135         a.a_cred = cred;
 2136         a.a_p = p;
 2137         return (VCALL(vp, VOFFSET(vop_openextattr), &a));
 2138 }
 2139 #endif
 2140 
 2141 struct vop_deleteextattr_args {
 2142         const struct vnodeop_desc *a_desc;
 2143         struct vnode *a_vp;
 2144         int a_attrnamespace;
 2145         const char *a_name;
 2146         struct ucred *a_cred;
 2147         struct proc *a_p;
 2148 };
 2149 extern const struct vnodeop_desc vop_deleteextattr_desc;
 2150 #ifndef VNODE_OP_NOINLINE
 2151 static __inline
 2152 #endif
 2153 int VOP_DELETEEXTATTR(struct vnode *, int, const char *, struct ucred *, 
 2154     struct proc *)
 2155 #ifndef VNODE_OP_NOINLINE
 2156 __attribute__((__unused__))
 2157 #endif
 2158 ;
 2159 #ifndef VNODE_OP_NOINLINE
 2160 static __inline int VOP_DELETEEXTATTR(vp, attrnamespace, name, cred, p)
 2161         struct vnode *vp;
 2162         int attrnamespace;
 2163         const char *name;
 2164         struct ucred *cred;
 2165         struct proc *p;
 2166 {
 2167         struct vop_deleteextattr_args a;
 2168 #ifdef VNODE_LOCKDEBUG
 2169         int islocked_vp;
 2170 #endif
 2171         a.a_desc = VDESC(vop_deleteextattr);
 2172         a.a_vp = vp;
 2173 #ifdef VNODE_LOCKDEBUG
 2174         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 2175         if (islocked_vp != 1)
 2176                 panic("vop_deleteextattr: vp: locked %d, expected %d", islocked_vp, 1);
 2177 #endif
 2178         a.a_attrnamespace = attrnamespace;
 2179         a.a_name = name;
 2180         a.a_cred = cred;
 2181         a.a_p = p;
 2182         return (VCALL(vp, VOFFSET(vop_deleteextattr), &a));
 2183 }
 2184 #endif
 2185 
 2186 struct vop_setextattr_args {
 2187         const struct vnodeop_desc *a_desc;
 2188         struct vnode *a_vp;
 2189         int a_attrnamespace;
 2190         const char *a_name;
 2191         struct uio *a_uio;
 2192         struct ucred *a_cred;
 2193         struct proc *a_p;
 2194 };
 2195 extern const struct vnodeop_desc vop_setextattr_desc;
 2196 #ifndef VNODE_OP_NOINLINE
 2197 static __inline
 2198 #endif
 2199 int VOP_SETEXTATTR(struct vnode *, int, const char *, struct uio *, 
 2200     struct ucred *, struct proc *)
 2201 #ifndef VNODE_OP_NOINLINE
 2202 __attribute__((__unused__))
 2203 #endif
 2204 ;
 2205 #ifndef VNODE_OP_NOINLINE
 2206 static __inline int VOP_SETEXTATTR(vp, attrnamespace, name, uio, cred, p)
 2207         struct vnode *vp;
 2208         int attrnamespace;
 2209         const char *name;
 2210         struct uio *uio;
 2211         struct ucred *cred;
 2212         struct proc *p;
 2213 {
 2214         struct vop_setextattr_args a;
 2215 #ifdef VNODE_LOCKDEBUG
 2216         int islocked_vp;
 2217 #endif
 2218         a.a_desc = VDESC(vop_setextattr);
 2219         a.a_vp = vp;
 2220 #ifdef VNODE_LOCKDEBUG
 2221         islocked_vp = (vp->v_flag & VLOCKSWORK) ? (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) : 1;
 2222         if (islocked_vp != 1)
 2223                 panic("vop_setextattr: vp: locked %d, expected %d", islocked_vp, 1);
 2224 #endif
 2225         a.a_attrnamespace = attrnamespace;
 2226         a.a_name = name;
 2227         a.a_uio = uio;
 2228         a.a_cred = cred;
 2229         a.a_p = p;
 2230         return (VCALL(vp, VOFFSET(vop_setextattr), &a));
 2231 }
 2232 #endif
 2233 
 2234 /* Special cases: */
 2235 #include <sys/buf.h>
 2236 
 2237 struct vop_bwrite_args {
 2238         const struct vnodeop_desc *a_desc;
 2239         struct buf *a_bp;
 2240 };
 2241 extern const struct vnodeop_desc vop_bwrite_desc;
 2242 #ifndef VNODE_OP_NOINLINE
 2243 static __inline
 2244 #endif
 2245 int VOP_BWRITE(struct buf *)
 2246 #ifndef VNODE_OP_NOINLINE
 2247 __attribute__((__unused__))
 2248 #endif
 2249 ;
 2250 #ifndef VNODE_OP_NOINLINE
 2251 static __inline int VOP_BWRITE(bp)
 2252         struct buf *bp;
 2253 {
 2254         struct vop_bwrite_args a;
 2255 #ifdef VNODE_LOCKDEBUG
 2256 #endif
 2257         a.a_desc = VDESC(vop_bwrite);
 2258         a.a_bp = bp;
 2259         return (VCALL(bp->b_vp, VOFFSET(vop_bwrite), &a));
 2260 }
 2261 #endif
 2262 
 2263 #define VNODE_OPS_COUNT 56
 2264 
 2265 /* End of special cases. */
 2266 
 2267 #endif /* !_SYS_VNODE_IF_H_ */

Cache object: ca9bf83691f82ece3f58f6e318b2c204


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.