aboutsummaryrefslogtreecommitdiff
path: root/sys/tools/vnode_if.awk
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease/7.0.0_cvscvs2svn2008-02-241-2/+2
| | | | | | 'RELENG_7_0_0_RELEASE'. This commit was manufactured to restore the state of the 7.0-RELEASE image.
* - Add two checks for syntax errorsDiomidis Spinellis2006-05-301-7/+13
| | | | | | | | - Improve error reporting - Remove redundant conditionals Notes: svn path=/head/; revision=159083
* Assertion code specifications are introduced using special characterDiomidis Spinellis2006-05-301-5/+5
| | | | | | | | sequences that are distinct from comments. %% is used for argument locks; %! for pre- and post-conditions. Notes: svn path=/head/; revision=159082
* Update usage comment to match reality.Diomidis Spinellis2006-05-261-1/+2
| | | | Notes: svn path=/head/; revision=158936
* Eradicate caddr_t from the VFS API.Dag-Erling Smørgrav2005-12-141-2/+2
| | | | Notes: svn path=/head/; revision=153400
* Nuke vnodeop_desc.vdesc_transports, which has been unused since the dawnDag-Erling Smørgrav2005-12-141-2/+1
| | | | | | | of time (or the inception of ncvs, whichever came last) Notes: svn path=/head/; revision=153397
* Allow EVFILT_VNODE events to work on every filesystem type, not justSuleiman Souhlal2005-06-091-9/+6
| | | | | | | | | | | | | | | | | | UFS by: - Making the pre and post hooks for the VOP functions work even when DEBUG_VFS_LOCKS is not defined. - Moving the KNOTE activations into the corresponding VOP hooks. - Creating a MNTK_NOKNOTE flag for the mnt_kern_flag field of struct mount that permits filesystems to disable the new behavior. - Creating a default VOP_KQFILTER function: vfs_kqfilter() My benchmarks have not revealed any performance degradation. Reviewed by: jeff, bde Approved by: rwatson, jmg (kqueue changes), grehan (mentor) Notes: svn path=/head/; revision=147198
* - Add the character "E" to the understood lock types. This meansJeff Roberson2005-04-111-0/+2
| | | | | | | | | the VOP requires an exclusive lock. Sponsored by: Isilon Systems, Inc. Notes: svn path=/head/; revision=144907
* Add VOP_FOO_APV() which takes a pointer to the vop_vector.Poul-Henning Kamp2005-02-081-6/+11
| | | | | | | | | | This allows stacked or partitioned filesystems to say "Continue the normal resolution from here", for instace from FFS to UFS. Use VNASSERT() instead of KASSERT(). Notes: svn path=/head/; revision=141515
* Get rid of the VDESC() macro while the pot is boiling anyway, it isPoul-Henning Kamp2005-01-131-2/+2
| | | | | | | | only used from generate files now, so we might as well generate the right stuff from the start. Notes: svn path=/head/; revision=140166
* Change the generated VOP_ macro implementations to improve type checkingPoul-Henning Kamp2005-01-131-48/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and KASSERT coverage. After this check there is only one "nasty" cast in this code but there is a KASSERT to protect against the wrong argument structure behind that cast. Un-inlining the meat of VOP_FOO() saves 35kB of text segment on a typical kernel with no change in performance. We also now run the checking and tracing on VOP's which have been layered by nullfs, umapfs, deadfs or unionfs. Add new (non-inline) VOP_FOO_AP() functions which take a "struct foo_args" argument and does everything the VOP_FOO() macros used to do with checks and debugging code. Add KASSERT to VOP_FOO_AP() check for argument type being correct. Slim down VOP_FOO() inline functions to just stuff arguments into the struct foo_args and call VOP_FOO_AP(). Put function pointer to VOP_FOO_AP() into vop_foo_desc structure and make VCALL() use it instead of the current offsetoff() hack. Retire vcall() which implemented the offsetoff() Make deadfs and unionfs use VOP_FOO_AP() calls instead of VCALL(), we know which specific call we want already. Remove unneeded arguments to VCALL() in nullfs and umapfs bypass functions. Remove unused vdesc_offset and VOFFSET(). Generally improve style/readability of the generated code. Notes: svn path=/head/; revision=140165
* /* -> /*- for license, minor formatting changesWarner Losh2005-01-071-1/+2
| | | | Notes: svn path=/head/; revision=139825
* Rather than casting through a (void *) to avoid the aliasing warning,Warner Losh2004-12-131-3/+3
| | | | | | | | | | | | do things correctly from an aliasing perspective. Put the vop_generic_args element as the first element for all the vop_*_args and adjust the code to take the address of that instead of the structure. OK'd based on a vague description by: phk Notes: svn path=/head/; revision=138789
* Cast from the specific vop_*_args to vop_generic_args via a (void *)Warner Losh2004-12-131-1/+1
| | | | | | | | | | | | | pointer to eliminate the hundreds of warnings that we have in tree at the moment. # Chances are good that all the struct vop_*_args should have, as its # first element, the struct vop_generic_args, and when necessary to # reference it, we just take its address rather than going through # this double case. Notes: svn path=/head/; revision=138780
* Back when VOP_* was introduced, we did not have new-style structPoul-Henning Kamp2004-12-011-7/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initializations but we did have lofty goals and big ideals. Adjust to more contemporary circumstances and gain type checking. Replace the entire vop_t frobbing thing with properly typed structures. The only casualty is that we can not add a new VOP_ method with a loadable module. History has not given us reason to belive this would ever be feasible in the the first place. Eliminate in toto VOCALL(), vop_t, VNODEOP_SET() etc. Give coda correct prototypes and function definitions for all vop_()s. Generate a bit more data from the vnode_if.src file: a struct vop_vector and protype typedefs for all vop methods. Add a new vop_bypass() and make vop_default be a pointer to another struct vop_vector. Remove a lot of vfs_init since vop_vector is ready to use from the compiler. Cast various vop_mumble() to void * with uppercase name, for instance VOP_PANIC, VOP_NULL etc. Implement VCALL() by making vdesc_offset the offsetof() the relevant function pointer in vop_vector. This is disgusting but since the code is generated by a script comparatively safe. The alternative for nullfs etc. would be much worse. Fix up all vnode method vectors to remove casts so they become typesafe. (The bulk of this is generated by scripts) Notes: svn path=/head/; revision=138290
* emit a "typedef vop_foo_t(struct vop_foo_args *);" which we can usePoul-Henning Kamp2004-12-011-0/+1
| | | | | | | to prototype VOP functions with. Notes: svn path=/head/; revision=138266
* Remove advertising clause from University of California Regent's license,Warner Losh2004-04-071-4/+0
| | | | | | | | | per letter dated July 22, 1999. Approved by: core Notes: svn path=/head/; revision=127976
* Don't check the state of the vnode interlock if the specification saysDon Lewis2003-06-221-1/+7
| | | | | | | | | | that the lock should not be checked. Skip the lock assertion checks for *vpp or any other pointer to a vnode pointer if vpp (or equivalent) is NULL. Notes: svn path=/head/; revision=116694
* The assertions generated to test VFS locking never included checksStefan Eßer2003-06-201-0/+2
| | | | | | | | | | | | | | | | | | | for vnodes reached through double indirection (i.e. **vpp). This is worked-around by special-casing the identifier "vpp" (adding one level of indirection). The alternative fix mentioned in the PR had required substantial changes to this script. In case there are locking violations that had been hidden without this patch, they may suddenly show up, now ... This change does not affect code compiled without DEBUG_VFS_LOCKS. PR: kern/46652 Notes: svn path=/head/; revision=116614
* - Move ASSERT_VOP_*LOCK* functionality into functions in vfs_subr.cJeff Roberson2002-09-261-1/+1
| | | | | | | | | | - Make the VI asserts more orthogonal to the rest of the asserts by using a new, common vfs_badlock() function and adding a 'str' arg. - Adjust generated ASSERTS to match the new prototype. - Adjust explicit ASSERTS to match the new prototype. Notes: svn path=/head/; revision=103986
* - Automatically generate and insert KTR points in all VOPs.Jeff Roberson2002-09-231-0/+24
| | | | Notes: svn path=/head/; revision=103833
* - Add two new debugging macros: ASSERT_VI_LOCKED and ASSERT_VI_UNLOCKEDJeff Roberson2002-08-211-0/+1
| | | | | | | | | | | - Use the new VI asserts in place of the old mtx_assert checks. - Add the VI asserts to the automated lock checking in the VOP calls. The interlock should not be held across vops with a few exceptions. - Add the vop_(un)lock_{pre,post} functions to assert that interlock is held when LK_INTERLOCK is set. Notes: svn path=/head/; revision=102210
* - Add automatic post vop debug checks. These work in both the success andJeff Roberson2002-07-301-5/+14
| | | | | | | failure cases. Notes: svn path=/head/; revision=100919
* - Use 'options DEBUG_VFS_LOCKS' instead of the DEBUG_ALL_VFS_LOCKSJeff Roberson2002-07-071-5/+7
| | | | | | | environment variable to enable the lock verifiction code. Notes: svn path=/head/; revision=99516
* Add a new configuration directive that inserts calls to debugging functionsJeff Roberson2002-07-061-1/+28
| | | | | | | | | | | | | | | | | | | in the VOP inlines. This is intended to replace the simple locking specifications for calls that have more complicated behavior such as rename and lookup. The syntax of the new entries is: #! name pre/post function If the function is marked 'pre' it is executed prior to calling the VOP and takes a pointer to a struct vop_{name}_args as it's only parameter. If the function is marked 'post' it is executed after the VOP call and takes a pointer to a struct vop_{name}_args as it's first parameter and the integer return value from the vop as the second paramter. Notes: svn path=/head/; revision=99482
* include systm.h in vnode_if.c so that panic is defined when we're doingJeff Roberson2002-05-041-0/+1
| | | | | | | DEBUG_ALL_VFS_LOCKS. Notes: svn path=/head/; revision=96008
* Return vnode_if back to its AWK roots.David E. O'Brien2002-03-011-289/+233
| | | | | | | | It became a Perl script in rev 1.20. This removes one more dependence on perl for the kernel build. Notes: svn path=/head/; revision=91511
* Throw the $FreeBSD$s back in, properly escaping them.Mike Silbersack2002-01-041-4/+4
| | | | Notes: svn path=/head/; revision=88873
* Remove $FreeBSD$s from previous commit; perl thinks that they'reMike Silbersack2002-01-041-2/+2
| | | | | | | something to be interpreted. Urk. Notes: svn path=/head/; revision=88872
* Solve vnode_if.pl's identity crisis; make sure that it refers to itselfMike Silbersack2002-01-031-4/+4
| | | | | | | | | | as vnode_if.pl instead of vnode_if.sh. PR: 33509 MFC after: 3 weeks Notes: svn path=/head/; revision=88858
* KSE Milestone 2Julian Elischer2001-09-121-2/+2
| | | | | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
* replace calls to non-existant bail() subroutine with calls toAlfred Perlstein2001-03-231-2/+2
| | | | | | | the die() builtin function. Notes: svn path=/head/; revision=74688
* Simplify this a bit so that it doesn't have to generate silly redundantPeter Wemm2000-12-061-14/+3
| | | | | | | | | __P() prototypes when an ansi-style static inline is a prototype already. Since vnode_if.[ch] are generated on the fly, there are no CVS diffs to mess up. Notes: svn path=/head/; revision=69663
* remove crufty exec stuff, perl is in the base systemAlfred Perlstein2000-06-271-27/+39
| | | | | | | | | | | make it work with warnings on (there was some harmless use of uninitialized variables) make it work with 'use strict' Approved by: peter Notes: svn path=/head/; revision=62168
* Use a seperate -c and -h mode. The vnode_if.c file is compiled only intoPeter Wemm1999-12-121-120/+147
| | | | | | | | | | | | the kernel while the vnode_if.h header is a bunch of inlines to call the code that is in the kernel. Generating the .h file on the fly is kinda bogus because it has to match the one compiled into the kernel. IMHO we should have kern/vnode_if.c and sys/vnode_if.h committed in the tree but that's another battle. Notes: svn path=/head/; revision=54499
* Update this to be able to output ASSERT_VOP_(UN)LOCKED() based on theEivind Eklund1999-09-261-255/+230
| | | | | | | | | | | | | | | | | lock specifications in kern/vnode_if.src. At present, this do not distinguish between exclusive and shared locks, and the kernel is so full of bugs in this area that running with auto-generation of assertions enabled makes DEBUG_VFS_LOCKS totally useless for anybody that has used it for anything prior to outputting automated assertions. Due to this, I made vnode_if.sh only output locking assertions if you have the environment variable DEBUG_ALL_VFS_LOCKS set to "YES". In order to actually use the assertions, you need to also add "options DEBUG_VFS_LOCKS" to your kernel config file. Urged to commit by: phk Notes: svn path=/head/; revision=51681
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Add a vnode argument to VOP_BWRITE to get rid of the last vnodeKirk McKusick1999-06-161-46/+1
| | | | | | | | operator special case. Delete special case code from vnode_if.sh, vnode_if.src, umap_vnops.c, and null_vnops.c. Notes: svn path=/head/; revision=47964
* Declare static __inline functions as __inline in their forwardBruce Evans1999-02-281-13/+8
| | | | | | | | | | | declaration. Fixed some comments. Fixed a staticization botch. Notes: svn path=/head/; revision=44328
* Make the vnode opv vector construction fully dynamic. Previously wePeter Wemm1998-11-101-38/+2
| | | | | | | | | | | | | | | | | | | | | | | leaked memory on each unload and were limited to items referenced in the kernel copy of vnode_if.c. Now a kernel module is free to create it's own VOP_FOO() routines and the rest of the system will happily deal with it, including passthrough layers like union/umap/etc. Have VFS_SET() call a common vfs_modevent() handler rather than inline duplicating the common code all over the place. Have VNODEOP_SET() have the vnodeops removed at unload time (assuming a module) so that the vop_t ** vector is reclaimed. Slightly adjust the vop_t ** vectors so that calling slot 0 is a panic rather than a page fault. This could happen if VOP_something() was called without *any* handlers being present anywhere (including in vfs_default.c). slot 1 becomes the default vector for the vnodeop table. TODO: reclaim zones on unload (eg: nfs code) Notes: svn path=/head/; revision=41056
* VOP_STRATEGY grows an (struct vnode *) argumentJulian Elischer1998-07-041-31/+1
| | | | | | | | | as the value in b_vp is often not really what you want. (and needs to be frobbed). more cleanups will follow this. Reviewed by: Bruce Evans <bde@freebsd.org> Notes: svn path=/head/; revision=37384
* Use __inline instead of inline to prevent pedantic compiler warnings.Bruce Evans1997-12-191-4/+4
| | | | Notes: svn path=/head/; revision=31880
* Removed unused #includes.Bruce Evans1997-10-281-2/+1
| | | | Notes: svn path=/head/; revision=30813
* 3 lines of code and updates to a number of comments.Poul-Henning Kamp1997-09-101-1/+11
| | | | | | | | Reviewed by: phk Submitted by: Terry Lambert <tlambert@primenet.com> Notes: svn path=/head/; revision=29290
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Another mega commit to staticize things.Poul-Henning Kamp1995-12-141-3/+3
| | | | Notes: svn path=/head/; revision=12820
* Don't #include vm stuff in vnode_if.[ch]. Enough vm stuff (aBruce Evans1995-12-061-6/+1
| | | | | | | | | | | | single typedef) is now declared in <sys/types.h>. This is the first of 4 commits that will remove some excessive includes of vm*.h and user.h. The total speed improvement isn't as large as I first thought. `make depend; make' for LINT only improved from 2180 seconds to 2108 seconds user time. Notes: svn path=/head/; revision=12656
* Second batch of cleanup changes.Poul-Henning Kamp1995-10-291-2/+2
| | | | | | | | This time mostly making a lot of things static and some unused variables here and there. Notes: svn path=/head/; revision=11921
* Generate prototypes for VOP functions. I decided to keep the old-styleBruce Evans1995-09-111-1/+26
| | | | | | | | | definitions even though the functions are inline. If vnode_if.h was compiled by a non-ANSI compiler, then `inline' would be defined away, so vnode_if.h might compile correctly. Notes: svn path=/head/; revision=10676