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

Cache object: 409b7ea93ef15cb86b61daf3bde0e044


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