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/kern/vnode_if.src

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 #
    2 # Copyright (c) 1992, 1993
    3 #       The Regents of the University of California.  All rights reserved.
    4 #
    5 # Redistribution and use in source and binary forms, with or without
    6 # modification, are permitted provided that the following conditions
    7 # are met:
    8 # 1. Redistributions of source code must retain the above copyright
    9 #    notice, this list of conditions and the following disclaimer.
   10 # 2. Redistributions in binary form must reproduce the above copyright
   11 #    notice, this list of conditions and the following disclaimer in the
   12 #    documentation and/or other materials provided with the distribution.
   13 # 3. All advertising materials mentioning features or use of this software
   14 #    must display the following acknowledgement:
   15 #       This product includes software developed by the University of
   16 #       California, Berkeley and its contributors.
   17 # 4. Neither the name of the University nor the names of its contributors
   18 #    may be used to endorse or promote products derived from this software
   19 #    without specific prior written permission.
   20 #
   21 # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   22 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   23 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   24 # ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   25 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   26 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   27 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   28 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   29 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   30 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   31 # SUCH DAMAGE.
   32 #
   33 #       @(#)vnode_if.src        8.12 (Berkeley) 5/14/95
   34 # $FreeBSD: releng/5.2/sys/kern/vnode_if.src 118131 2003-07-28 18:53:29Z rwatson $
   35 #
   36 
   37 #
   38 # Above each of the vop descriptors is a specification of the locking
   39 # protocol used by each vop call.  The first column is the name of
   40 # the variable, the remaining three columns are in, out and error
   41 # respectively.  The "in" column defines the lock state on input,
   42 # the "out" column defines the state on succesful return, and the
   43 # "error" column defines the locking state on error exit.
   44 #
   45 # The locking value can take the following values:
   46 # L: locked; not converted to type of lock.
   47 # A: any lock type.
   48 # S: locked with shared lock.
   49 # E: locked with exclusive lock for this process.
   50 # O: locked with exclusive lock for other process.
   51 # U: unlocked.
   52 # -: not applicable.  vnode does not yet (or no longer) exists.
   53 # =: the same on input and output, may be either L or U.
   54 # X: locked if not nil.
   55 #
   56 # The paramater named "vpp" is assumed to be always used with double
   57 # indirection (**vpp) and that name is hard-codeed in vnode_if.awk !
   58 #
   59 # If other such parameters are introduced, they have to be added to
   60 # the AWK script at the head of the definition of "add_debug_code()".
   61 #
   62 
   63 #
   64 # islocked      vp      = = =
   65 #
   66 vop_islocked {
   67         IN struct vnode *vp;
   68         IN struct thread *td;
   69 };
   70 
   71 #
   72 # lookup        dvp     L ? ?
   73 # lookup        vpp     - L -
   74 #! lookup       pre     vop_lookup_pre
   75 #! lookup       post    vop_lookup_post
   76 #
   77 # XXX - the lookup locking protocol defies simple description and depends
   78 #       on the flags and operation fields in the (cnp) structure.  Note
   79 #       especially that *vpp may equal dvp and both may be locked.
   80 #
   81 vop_lookup {
   82         IN struct vnode *dvp;
   83         INOUT struct vnode **vpp;
   84         IN struct componentname *cnp;
   85 };
   86 
   87 #
   88 #% cachedlookup dvp     L ? ?
   89 #% cachedlookup vpp     - L -
   90 #
   91 # This must be an exact copy of lookup.  See kern/vfs_cache.c for details.
   92 #
   93 vop_cachedlookup {
   94         IN struct vnode *dvp;
   95         INOUT struct vnode **vpp;
   96         IN struct componentname *cnp;
   97 };
   98 
   99 #
  100 #% create       dvp     L L L
  101 #% create       vpp     - L -
  102 #
  103 vop_create {
  104         IN struct vnode *dvp;
  105         OUT struct vnode **vpp;
  106         IN struct componentname *cnp;
  107         IN struct vattr *vap;
  108 };
  109 
  110 #
  111 #% whiteout     dvp     L L L
  112 #
  113 vop_whiteout {
  114         IN struct vnode *dvp;
  115         IN struct componentname *cnp;
  116         IN int flags;
  117 };
  118 
  119 #
  120 #% mknod        dvp     L L L
  121 #% mknod        vpp     - L -
  122 #
  123 vop_mknod {
  124         IN struct vnode *dvp;
  125         OUT struct vnode **vpp;
  126         IN struct componentname *cnp;
  127         IN struct vattr *vap;
  128 };
  129 
  130 #
  131 #% open         vp      L L L
  132 #
  133 vop_open {
  134         IN struct vnode *vp;
  135         IN int mode;
  136         IN struct ucred *cred;
  137         IN struct thread *td;
  138         IN int fdidx;
  139 };
  140 
  141 #
  142 #% close        vp      U U U
  143 #
  144 vop_close {
  145         IN struct vnode *vp;
  146         IN int fflag;
  147         IN struct ucred *cred;
  148         IN struct thread *td;
  149 };
  150 
  151 #
  152 #% access       vp      L L L
  153 #
  154 vop_access {
  155         IN struct vnode *vp;
  156         IN int mode;
  157         IN struct ucred *cred;
  158         IN struct thread *td;
  159 };
  160 
  161 #
  162 #% getattr      vp      L L L
  163 #
  164 vop_getattr {
  165         IN struct vnode *vp;
  166         OUT struct vattr *vap;
  167         IN struct ucred *cred;
  168         IN struct thread *td;
  169 };
  170 
  171 #
  172 #% setattr      vp      L L L
  173 #
  174 vop_setattr {
  175         IN struct vnode *vp;
  176         IN struct vattr *vap;
  177         IN struct ucred *cred;
  178         IN struct thread *td;
  179 };
  180 
  181 #
  182 #% read         vp      L L L
  183 #
  184 vop_read {
  185         IN struct vnode *vp;
  186         INOUT struct uio *uio;
  187         IN int ioflag;
  188         IN struct ucred *cred;
  189 };
  190 
  191 #
  192 #% write        vp      L L L
  193 #
  194 vop_write {
  195         IN struct vnode *vp;
  196         INOUT struct uio *uio;
  197         IN int ioflag;
  198         IN struct ucred *cred;
  199 };
  200 
  201 #
  202 #% lease        vp      = = =
  203 #
  204 vop_lease {
  205         IN struct vnode *vp;
  206         IN struct thread *td;
  207         IN struct ucred *cred;
  208         IN int flag;
  209 };
  210 
  211 #
  212 #% ioctl        vp      U U U
  213 #
  214 vop_ioctl {
  215         IN struct vnode *vp;
  216         IN u_long command;
  217         IN caddr_t data;
  218         IN int fflag;
  219         IN struct ucred *cred;
  220         IN struct thread *td;
  221 };
  222 
  223 #
  224 #% poll vp      U U U
  225 #
  226 vop_poll {
  227         IN struct vnode *vp;
  228         IN int events;
  229         IN struct ucred *cred;
  230         IN struct thread *td;
  231 };
  232 
  233 #
  234 #% kqfilter     vp      U U U
  235 #
  236 vop_kqfilter {
  237         IN struct vnode *vp;
  238         IN struct knote *kn;
  239 };
  240 
  241 #
  242 #% revoke       vp      U U U
  243 #
  244 vop_revoke {
  245         IN struct vnode *vp;
  246         IN int flags;
  247 };
  248 
  249 #
  250 #% fsync        vp      L L L
  251 #
  252 vop_fsync {
  253         IN struct vnode *vp;
  254         IN struct ucred *cred;
  255         IN int waitfor;
  256         IN struct thread *td;
  257 };
  258 
  259 #
  260 #% remove       dvp     L L L
  261 #% remove       vp      L L L
  262 #
  263 vop_remove {
  264         IN struct vnode *dvp;
  265         IN struct vnode *vp;
  266         IN struct componentname *cnp;
  267 };
  268 
  269 #
  270 #% link         tdvp    L L L
  271 #% link         vp      L L L
  272 #
  273 vop_link {
  274         IN struct vnode *tdvp;
  275         IN struct vnode *vp;
  276         IN struct componentname *cnp;
  277 };
  278 
  279 #
  280 # rename        fdvp    U U U
  281 # rename        fvp     U U U
  282 # rename        tdvp    L U U
  283 # rename        tvp     X U U
  284 #! rename       pre     vop_rename_pre
  285 #
  286 vop_rename {
  287         IN WILLRELE struct vnode *fdvp;
  288         IN WILLRELE struct vnode *fvp;
  289         IN struct componentname *fcnp;
  290         IN WILLRELE struct vnode *tdvp;
  291         IN WILLRELE struct vnode *tvp;
  292         IN struct componentname *tcnp;
  293 };
  294 
  295 #
  296 #% mkdir        dvp     L L L
  297 #% mkdir        vpp     - L -
  298 #
  299 vop_mkdir {
  300         IN struct vnode *dvp;
  301         OUT struct vnode **vpp;
  302         IN struct componentname *cnp;
  303         IN struct vattr *vap;
  304 };
  305 
  306 #
  307 #% rmdir        dvp     L L L
  308 #% rmdir        vp      L L L
  309 #
  310 vop_rmdir {
  311         IN struct vnode *dvp;
  312         IN struct vnode *vp;
  313         IN struct componentname *cnp;
  314 };
  315 
  316 #
  317 #% symlink      dvp     L L L
  318 #% symlink      vpp     - L -
  319 #
  320 vop_symlink {
  321         IN struct vnode *dvp;
  322         OUT struct vnode **vpp;
  323         IN struct componentname *cnp;
  324         IN struct vattr *vap;
  325         IN char *target;
  326 };
  327 
  328 #
  329 #% readdir      vp      L L L
  330 #
  331 vop_readdir {
  332         IN struct vnode *vp;
  333         INOUT struct uio *uio;
  334         IN struct ucred *cred;
  335         INOUT int *eofflag;
  336         OUT int *ncookies;
  337         INOUT u_long **cookies;
  338 };
  339 
  340 #
  341 #% readlink     vp      L L L
  342 #
  343 vop_readlink {
  344         IN struct vnode *vp;
  345         INOUT struct uio *uio;
  346         IN struct ucred *cred;
  347 };
  348 
  349 #
  350 #% inactive     vp      L U U
  351 #
  352 vop_inactive {
  353         IN struct vnode *vp;
  354         IN struct thread *td;
  355 };
  356 
  357 #
  358 #% reclaim      vp      U U U
  359 #
  360 vop_reclaim {
  361         IN struct vnode *vp;
  362         IN struct thread *td;
  363 };
  364 
  365 #
  366 #lock           vp      ? ? ?
  367 #! lock         pre     vop_lock_pre
  368 #! lock         post    vop_lock_post
  369 #
  370 vop_lock {
  371         IN struct vnode *vp;
  372         IN int flags;
  373         IN struct thread *td;
  374 };
  375 
  376 #
  377 #unlock         vp      L ? L
  378 #! unlock       pre     vop_unlock_pre
  379 #! unlock       post    vop_unlock_post
  380 #
  381 vop_unlock {
  382         IN struct vnode *vp;
  383         IN int flags;
  384         IN struct thread *td;
  385 };
  386 
  387 #
  388 #% bmap         vp      L L L
  389 #% bmap         vpp     - U -
  390 #
  391 vop_bmap {
  392         IN struct vnode *vp;
  393         IN daddr_t bn;
  394         OUT struct vnode **vpp;
  395         IN daddr_t *bnp;
  396         OUT int *runp;
  397         OUT int *runb;
  398 };
  399 
  400 #
  401 # strategy      vp      L L L
  402 #! strategy     pre     vop_strategy_pre
  403 #
  404 vop_strategy {
  405         IN struct vnode *vp;
  406         IN struct buf *bp;
  407 };
  408 
  409 #
  410 # specstrategy  vp      L L L
  411 #! specstrategy pre     vop_strategy_pre
  412 #
  413 vop_specstrategy {
  414         IN struct vnode *vp;
  415         IN struct buf *bp;
  416 };
  417 
  418 #
  419 #% getwritemount vp     = = =
  420 #
  421 vop_getwritemount {
  422         IN struct vnode *vp;
  423         OUT struct mount **mpp;
  424 };
  425 
  426 #
  427 #% print        vp      = = =
  428 #
  429 vop_print {
  430         IN struct vnode *vp;
  431 };
  432 
  433 #
  434 #% pathconf     vp      L L L
  435 #
  436 vop_pathconf {
  437         IN struct vnode *vp;
  438         IN int name;
  439         OUT register_t *retval;
  440 };
  441 
  442 #
  443 #% advlock      vp      U U U
  444 #
  445 vop_advlock {
  446         IN struct vnode *vp;
  447         IN caddr_t id;
  448         IN int op;
  449         IN struct flock *fl;
  450         IN int flags;
  451 };
  452 
  453 #
  454 #% reallocblks  vp      L L L
  455 #
  456 vop_reallocblks {
  457         IN struct vnode *vp;
  458         IN struct cluster_save *buflist;
  459 };
  460 
  461 #
  462 #% getpages     vp      L L L
  463 #
  464 vop_getpages {
  465         IN struct vnode *vp;
  466         IN vm_page_t *m;
  467         IN int count;
  468         IN int reqpage;
  469         IN vm_ooffset_t offset;
  470 };
  471 
  472 #
  473 #% putpages     vp      L L L
  474 #
  475 vop_putpages {
  476         IN struct vnode *vp;
  477         IN vm_page_t *m;
  478         IN int count;
  479         IN int sync;
  480         IN int *rtvals;
  481         IN vm_ooffset_t offset;
  482 };
  483 
  484 #
  485 #% freeblks     vp      - - -
  486 #
  487 # This call is used by the filesystem to release blocks back to 
  488 # device-driver.  This is useful if the driver has a lengthy 
  489 # erase handling or similar.
  490 #
  491 
  492 vop_freeblks {
  493         IN struct vnode *vp;
  494         IN daddr_t addr;
  495         IN daddr_t length;
  496 };
  497 
  498 #
  499 #% getacl       vp      L L L
  500 #
  501 vop_getacl {
  502         IN struct vnode *vp;
  503         IN acl_type_t type;
  504         OUT struct acl *aclp;
  505         IN struct ucred *cred;
  506         IN struct thread *td;
  507 };
  508 
  509 #
  510 #% setacl       vp      L L L
  511 #
  512 vop_setacl {
  513         IN struct vnode *vp;
  514         IN acl_type_t type;
  515         IN struct acl *aclp;
  516         IN struct ucred *cred;
  517         IN struct thread *td;
  518 };
  519 
  520 #
  521 #% aclcheck     vp      = = =
  522 #
  523 vop_aclcheck {
  524         IN struct vnode *vp;
  525         IN acl_type_t type;
  526         IN struct acl *aclp;
  527         IN struct ucred *cred;
  528         IN struct thread *td;
  529 };
  530 
  531 #
  532 #% closeextattr vp      L L L
  533 #
  534 vop_closeextattr {
  535         IN struct vnode *vp;
  536         IN int commit;
  537         IN struct ucred *cred;
  538         IN struct thread *td;
  539 };
  540 
  541 #
  542 #% getextattr   vp      L L L
  543 #
  544 vop_getextattr {
  545         IN struct vnode *vp;
  546         IN int attrnamespace;
  547         IN const char *name;
  548         INOUT struct uio *uio;
  549         OUT size_t *size;
  550         IN struct ucred *cred;
  551         IN struct thread *td;
  552 };
  553 
  554 #
  555 #% listextattr  vp      L L L
  556 #
  557 vop_listextattr {
  558         IN struct vnode *vp;
  559         IN int attrnamespace;
  560         INOUT struct uio *uio;
  561         OUT size_t *size;
  562         IN struct ucred *cred;
  563         IN struct thread *td;
  564 };
  565 
  566 #
  567 #% openextattr  vp      L L L
  568 #
  569 vop_openextattr {
  570         IN struct vnode *vp;
  571         IN struct ucred *cred;
  572         IN struct thread *td;
  573 };
  574 
  575 #
  576 #% deleteextattr        vp      L L L
  577 #
  578 vop_deleteextattr {
  579         IN struct vnode *vp;
  580         IN int attrnamespace;
  581         IN const char *name;
  582         IN struct ucred *cred;
  583         IN struct thread *td;
  584 };
  585 
  586 #
  587 #% setextattr   vp      L L L
  588 #
  589 vop_setextattr {
  590         IN struct vnode *vp;
  591         IN int attrnamespace;
  592         IN const char *name;
  593         INOUT struct uio *uio;
  594         IN struct ucred *cred;
  595         IN struct thread *td;
  596 };
  597 
  598 #
  599 #% createvobject        vp      L L L
  600 #
  601 vop_createvobject {
  602         IN struct vnode *vp;
  603         IN struct ucred *cred;
  604         IN struct thread *td;
  605 };
  606 
  607 #
  608 #% destroyvobject       vp      L L L
  609 #
  610 vop_destroyvobject {
  611         IN struct vnode *vp;
  612 };
  613 
  614 #
  615 #% getvobject   vp      L L L
  616 #
  617 vop_getvobject {
  618         IN struct vnode *vp;
  619         OUT struct vm_object **objpp;
  620 };
  621 
  622 #
  623 #% setlabel     vp      L L L
  624 #
  625 vop_setlabel {
  626         IN struct vnode *vp;
  627         IN struct label *label;
  628         IN struct ucred *cred;
  629         IN struct thread *td;
  630 };

Cache object: e02b5580b5e83bdc65b8ecb0f7f92e3b


[ 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.