Commit Graph

58 Commits

Author SHA1 Message Date
hannken
4094bb1a9f Change VOP_BWRITE() to take a vnode as its first argument like all other
VOPs do.  Layered file systems no longer have to modify bp->b_vp and run
into trouble when an async VOP_BWRITE() uses the wrong vnode.

Adresses PR kern/38762 panic: vwakeup: neg numoutput

No objections from tech-kern@.
2011-07-11 08:23:00 +00:00
rmind
c71a09f0c6 - Use offsetof() in VOPARG_OFFSETOF() instead of re-implementing it.
- Remove VDESC_NOMAP_VPP and VDESC_VPP_WILLRELE.
- Remove VRELEL_NOINACTIVE and VRELEL_ONHEAD.
2011-04-03 01:19:35 +00:00
pooka
fcde1e9ca0 Make rump vnode interface lightweight: the only things we
really need are:

  0) provide VOP_OP in the alternate RUMP_VOP_OP namespace

  and for each op:
  1) schedule rump cpu
  2) call VOP_OP
  3) unschedule rump cpu

While here, take the opportunity to get rid of _t lossage in the
rump-exported interfaces.
2010-04-14 13:58:51 +00:00
pooka
7b0c00ddf9 Print "end of special cases" only where special cases end and not
a second time at the end of the file.  Adjust whitespace for the
sheer functional joy of it.

(i hope i didn't ruin someone's joke by missing a humorous implication
that all vnode operations are considered a little special)
2010-04-14 12:19:50 +00:00
pooka
790df5ab8d "Not yet" since 4.4BSD is quite a lot of "not yet", so remove
vdesc_transports from vnodeop_desc until we have a "not not yet"
situation.

Ride 5.99.27 bump (full build still in progress.  i wanted to get
this in as soon as possible to most effectively ride the bump.)
2010-04-10 19:41:54 +00:00
pooka
624234c0c5 Generate scheduling points around rump vnode operations. 2009-10-15 00:29:40 +00:00
pooka
ab3237b942 Add a switch on whether to create VNODE_LOCKDEBUG checks or not.
Since VNODE_LOCKDEBUG has never been generally useful, default to
off.  However, the checks can still be generated by flipping the
switch for the isolated cases where this form of dynamic analysis
is useful and the person using it knows what she is doing.
2009-09-29 11:51:02 +00:00
pooka
e10fef6cd2 Split vfs out of rumpkern into rumpvfs. Non-fs rumps no longer
include the file system code.  File system rumps explicitly need
to include rumpvfs from now on.
2008-11-19 14:10:48 +00:00
pooka
f1f9c07ac7 Make this generate the rump vnode interface files. 2008-11-17 08:46:03 +00:00
ad
245f0726ac Reduce ifdefs due to MULTIPROCESSOR slightly. 2008-05-19 17:06:02 +00:00
ad
4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
pooka
61e8303e9d Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
2007-11-26 19:01:26 +00:00
ad
abf0cf7ccd Merge from vmlocking. 2007-11-06 21:59:43 +00:00
ad
7dad9f7391 Merge from vmlocking:
- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.
2007-10-10 20:42:20 +00:00
pooka
f5ba107ccd Introduce WILLMAKE for vnode operations which create a new vnode.
Insert a KASSERT along the return path of such operations to check
that the operation set the vnode size.
2007-07-22 21:26:53 +00:00
pooka
d89a0720df Generate preprocessor macros for vop offsets in vfs op descs. And
use these symbols in the desc structures instead of magic numbers.
No functional change, except VOP_FOO_DESCOFFSET macros in vnode_if.h.

wrstuden ok
2006-11-30 21:06:29 +00:00
elad
215bd95ba4 integrate kauth. 2006-05-14 21:15:11 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
thorpej
aae7b1614d Generate ANSI function decls. 2005-12-07 00:45:57 +00:00
thorpej
e3dec5c260 Remove the VNODE_OP_NOINLINE option. We now NEVER inline vnode ops.
Briefly discussed on tech-kern not too long ago.
2005-12-07 00:42:03 +00:00
perry
f05ce97c60 remove some trailing spaces in generated output when removing $s from $NetBSD$ 2005-02-26 22:06:38 +00:00
perry
deef459f67 Change the DO NOT EDIT warning slightly, including the text "DO NOT EDIT".
(It is nice if all files that should not be edited have DO NOT EDIT in them.)
2005-02-26 21:40:45 +00:00
perry
da8abec863 nuke trailing whitespace 2005-02-26 21:34:55 +00:00
thorpej
11afd11faa Add a new VNODE_LOCKDEBUG option, which enables checks in the VOP_*()
calls to ensure that the vnode lock state is as expected when the VOP
call is made.  Modify vnode_if.src to set the expected state according
to the documenting lock table for each VOP.  Modify vnode_if.sh to emit
the checks.

Notes:
- The checks are only performed if the vnode has the VLOCKSWORK bit
  set.  Some file systems (e.g. specfs) don't even bother with vnode
  locks, so of course the checks will fail.
- We can't actually run with VNODE_LOCKDEBUG because there are so many
  vnode locking problems, not the least of which is the "use SHARED for
  VOP_READ()" issue, which screws things up for the entire call chain.

Inspired by similar changes in OpenBSD, but implemented differently.
2004-09-21 03:10:35 +00:00
hannken
d7f6cbf8bc Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern. 2004-01-25 18:02:04 +00:00
agc
aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
lukem
d8dd7943fe add RCSID to generated .c file 2001-11-12 14:34:24 +00:00
lukem
e1adc31453 delint: vop_default_desc was declared const but not defined const. 2001-05-07 08:46:02 +00:00
jdolecek
950412b4f5 when generating individual *_desc, generate also proper offsets so that
then don't need to be patched at runtime
add new define VNODE_OPS_COUNT (to vnode_if.h) so that the number is known
at compile-time
make stuff const, it now can be
2001-01-22 09:52:21 +00:00
martin
c9803fbf98 Remove over-const-ification.
This structures are actually modified at kernel init time by vfs_op_init.

XXX - looks like the state after initialization is pretty const and with
some magic in the generator script (and appropriate changes to vfs_op_init)
it could be made const.
2001-01-19 12:22:56 +00:00
jdolecek
34c8ae80da constify 2001-01-18 20:28:15 +00:00
fvdl
8eaf6e8d8e Make that defined(LKM) || defined(_LKM), to catch both the cases
of compiling a kernel with LKM support and compiling an LKM.
2000-12-22 20:05:35 +00:00
fvdl
2ac441ddfb LKM -> _LKM around opt_ include. 2000-12-22 20:00:16 +00:00
mrg
80ab63644e redo the previous correctly 2000-12-22 15:09:46 +00:00
mrg
62230909f1 avoid redefinition of VNODE_OP_NOINLINE 2000-12-22 14:58:39 +00:00
thorpej
7f3e4b0331 If building an LKM, always cause it to use the non-inline version
of the vnode ops, and if LKM support is included in the kernel,
always include the non-inline stubs regardless of whether or not
they're being used in the static kernel iamge.
2000-09-13 16:09:27 +00:00
thorpej
9d482308b1 Allow the VOP_*() calls to be un-inlined with the VNODE_OP_NOINLINE
kernel option.  Saves 36k of kernel text on an i386 GENERIC.  Useful
for install media kernels, small memory systems, embedded systems.
2000-09-13 15:50:26 +00:00
wrstuden
99a1c75bcb Update syntax to support WILLUNLOCK and WILLPUT syntax. Change calls which
really vput to indicate that rather than just WILLRELE.
1999-07-07 23:32:50 +00:00
christos
34cb71bf00 Quote the backquotes in the double-quoted shell string, otherwise they
disappear and you get AS IS'' instead of ``AS IS'' in the generated files.
1998-09-13 14:44:34 +00:00
mycroft
d588e17601 __Namespace__ __protection__. 1998-07-30 00:46:01 +00:00
fvdl
e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
thorpej
b59d427988 Add RCS IDs to generated files, in correct place. 1998-01-09 06:40:43 +00:00
thorpej
5713d318b8 Back out RCS ID related changes. 1998-01-08 01:06:50 +00:00
perry
02e9346e57 fix RCS ids insertion so it really works 1998-01-05 19:13:04 +00:00
perry
9b0894473d make script insert RCS ids into generated files 1998-01-05 18:45:02 +00:00
cgd
6542ece8e1 mark prototypes for static inline functions in the generated files as
possibly unused (with __attribute__ ((unused))), to avoid generating
warnings when compiling without optimization but with most ports' default
warning flags.
1997-07-07 20:17:36 +00:00
mikel
bd71be635d add multiple inclusion protection to generated header 1997-01-22 06:51:59 +00:00
cgd
3d67685d36 Do not build vnode_if.[ch] for each kernel. Build them once, like the
various syscall sources/headers, and just compile them.  From PR 2142, OK'd
by mycroft.
1996-02-29 20:54:58 +00:00