Commit Graph

53 Commits

Author SHA1 Message Date
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
yamt cc104d0635 eliminate v_id. 2003-07-30 12:10:57 +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
thorpej a06b275edc Undo part of the ktrace/lwp changes. In particular:
* Remove the "lwp *" argument that was added to vget().  Turns out
  that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
  and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
  above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
  just to appease the above.
2003-06-29 18:43:21 +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
yamt 08bf5aae7b remove local definitions of TRUE and FALSE. 2003-05-21 13:50:54 +00:00
drochner 9e95dcb696 Change some subordinate functions to take a "struct nfsnode" argument
instead of "struct vnode". This saves a number of pointer dereferences;
it sums up to about half a kB for me. And it paves the way for future
fixes.
While cleaning up, eliminate a write-only member of "struct nfsreq"
and a pointless assignment in the NFS_V2_ONLY case.
2003-04-24 21:21:04 +00:00
yamt a14f444335 use queue manipulation macros. 2003-04-02 15:14:19 +00:00
matt 65e5548a17 Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.
2003-02-26 06:31:08 +00:00
thorpej b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
thorpej b78f59b443 Merge the nathanw_sa branch. 2003-01-18 08:51:40 +00:00
matt 9bd0cc2bb9 Make sure these all agree on the same definitons of various variables. 2002-12-01 23:02:10 +00:00
yamt 005c29fafb fix a page locking deadlock problem for nfs.
add a flag that specify if the file can be truncated safely or not
to nfsm_loadattr and friends.  when it isn't safe, just mark the nfsnode
as "should be truncated later".

ok'ed by Frank van der Linden and Chuck Silvers.
close kern/18036.
2002-10-21 12:52:32 +00:00
matt caf4b56c6f Eliminate commons 2002-05-12 23:04:35 +00:00
lukem 0ffad69384 add RCSIDs 2001-11-10 10:59:08 +00:00
thorpej 5b35dc8136 When unmounting a file system, acquire the syncer_lock before
vfs_busy'ing just before the dounmount() call.  This is to avoid
sleeping with the mountlist_slock held -- but we must acquire
syncer_lock before vfs_busy because the syncer itself uses
syncer_lock -> vfs_busy locking order.
2001-04-16 22:41:09 +00:00
jdolecek 522f569810 make some more constant arrays 'const' 2001-02-21 21:39:52 +00:00
fvdl d4e6a2c4e1 Do actual vnode locking for NFS. 2001-02-06 11:40:02 +00:00
chs 8362134916 put more ISO bits under ifdef ISO. 2000-11-24 23:30:02 +00:00
bjh21 1f4240a461 Extend NFS_V2_ONLY to remove NQNFS lease support as well. Saves another 10k. 2000-09-19 23:26:25 +00:00
fvdl 8fd422dede Adapt for VOP_FSYNC parameter change. 2000-09-19 22:05:29 +00:00
fvdl 7cfd328d97 Some tweaks to enable NFS over IPv6. The special-casing of AF_INET
should really be removed.
2000-06-09 00:00:17 +00:00
augustss 8529438fe6 Remove register declarations. 2000-03-30 12:51:13 +00:00
sommerfeld ff0b960398 Fix bug in error handling for NFSv3 + nqnfs.
With nfsv2, the nfsm_reply() macro always causes the service routine
to return if error was nonzero.

With nfsv3, we can keep going after nfsm_reply() without returning,
but nqnfsrv_getlease() didn't take this into account, so add a
return(0) after each error-case nfsm_reply(0).
1999-10-10 02:44:55 +00:00
sommerfe e94a23c0ef Fix crash reported in PR7116 on shutdown 1999-03-25 04:07:33 +00:00
fair d143754986 Snatch a patch from OpenBSD to fix PRs 6529 and 7074.
Adjust fxdr_hyper() and txdr_hyper() macros.
1999-03-06 05:34:40 +00:00
perry 4522c799a1 bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:51:08 +00:00
thorpej 961f0708b1 - Rename nqnfs_vop_lease_check() to genfs_lease_check(). If NFSSERVER is
not in the kernel, genfs_lease_check() is simply a no-op.  This allows
  LKM'd file systems to be exported (previously did not work properly
  due to a compile-time decision based on -DNFSSERVER).
- defopt NFSSERVER
1998-06-25 22:15:28 +00:00
kleink 382743ada3 Convert fsync vnode operator implementations and usage from the old `waitfor'
argument and MNT_WAIT/MNT_NOWAIT to `flags' and FSYNC_WAIT.
1998-06-05 19:53:00 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
thorpej 2146a2ed29 Include the NFS option header. 1998-02-19 00:54:13 +00:00
fvdl 1cf3a3db94 * Implement optional 32 <-> 64 bit directory cookie translation. This uses
the directory cache as translation table. See nfs_subs.c for comments.
  Makes the code a bit more complex to look at than I would have liked,
  but doesn't affect the speed of the default behavior.
* Optimize caching behavior a bit when buffers are invalidated.
* Save some RPCs in readdir operations by not bothering if there is
  a small amount left to do to fill the buffer. It'll be done in the
  next RPC with a larger chunk anyway. Wastes a bit of buffer space
  but is faster.
* Make n_vattr an allocated vattr struct. This avoids nfsnode bloat,
  and is friendlier to the malloc routines.
1997-10-19 01:46:15 +00:00
fvdl 7f7d814e67 * New directory entry caching system. Provides full caching of any
directory cookie that may be thrown back at us from userspace, up
  to a size limit. Fixes double entry problem.
* Split flags for internal and external use in the NFS mount structure.
* Fix some buffer structure fields that weren're being used correctly.
* Fix missing directory cache inval call in nfs_open.
* Limit on NFS_DIRBLKSIZ no longer needed, bumped to the more reasonable
  value of 8k.
* Various other things that I forget, all related to the dir caching
  somehow, though.
1997-10-10 01:53:17 +00:00
fvdl 66081af1c0 Provide extra arg to nfsrv_fhtovp (just FALSE in this case), it was
extended for WebNFS support.
1997-06-24 23:30:04 +00:00
fvdl 78d0ef4390 Fixes from BSDI (thanks go to Keith Bostic). Original RCS messages:
date: 1995/11/30 20:37:53;  author: cp;  state: Exp;  lines: +3 -3
Change splsoftclock() to splnet();
Make nfsrv_getstream create two copies of data when
splitting up an mbuf rather than two references to the
same external buffer. The symptom this fixes is client
hangs.

date: 1996/10/16 00:06:05;  author: ewv;  state: Exp;  lines: +5 -3
Clear pending signal when an unmount fails, this allows us another chance
at the umount after a short sleep. The fixes a problem where /usr is
mounted via nqnfs and the system hangs on shutdown since the umount()
always fails with EBUSY (inetd is still busy on usr) and since we don't
clear the signal we end up stuck looping and never give inetd a chance to
catch its SIGKILL.

date: 1996/10/23 18:22:14;  author: donn;  state: Exp;  lines: +12 -7
Kirk's changes to prevent races when unmounting.  (1) Unmount()
and vfs_unmountall() now call vfs_busy() so that they participates
in the mount structure locking scheme.  Dounmount() calls vfs_unbusy()
to unlock things, and makes sure to wake up waiters if there's an
error.  (2) The MFS and NQNFS daemons also now use vfs_busy() when
unmounting filesystems.  Kirk restructured the code so that a
successful unmount by another process won't leave the possibility
that a daemon might reference a mount structure that has been freed.
1997-02-22 02:51:47 +00:00
fvdl be787cc073 * Fix some bugs in NQNFS (malformed RPC requests, no directory lease eviction)
* Avoid possible NULL ptr ref in nfs_reply
* Don't ever try to sillyrename directories (from FreeBSD)
1997-02-09 21:19:04 +00:00
thorpej dc33841893 NFSCLIENT -> NFS. 1997-01-31 02:58:48 +00:00
christos bcf4552fb1 revert kprintf changes 1996-10-13 01:39:03 +00:00
christos 117a51c5a5 printf -> kprintf, sprintf -> ksprintf 1996-10-10 23:31:17 +00:00
fvdl e9788cf246 Fix a missing 'error =' before 'if (error)'. 1996-02-18 14:06:50 +00:00
fvdl 5ac7df1caf Bring in a merge of Rick Macklem's NFSv3 code from Lite2 1996-02-18 11:53:36 +00:00
christos e4c93ec893 nfs prototype changes 1996-02-09 21:48:19 +00:00
cgd 3e0efb4d89 changes to make this work on systems where pointers & longs are 64 bits.
This is mostly just changes to make the stuff that goes over the wire
use fixed-size types.
1995-12-19 23:07:11 +00:00
cgd 8f62c773e8 don't assume the f_fsnamelen is nul-truncated or longer than MFSNAMELEN 1995-06-18 14:45:14 +00:00
mycroft 1448ab7a19 Remove gratuitous extra indirections. 1995-05-23 06:22:45 +00:00
mycroft 7b85c59a4e Turn mountlist into a CIRCLEQ, and handle setting and checking of MNT_ROOTFS
differently.
1995-01-18 06:15:17 +00:00
mycroft 527b796ff5 Turn lease_check() into a vnode op, per CSRG. 1994-12-13 20:14:30 +00:00
cgd 56364fe8b1 cleanliness; don't wrap lines. 1994-08-21 21:07:13 +00:00
mycroft f7c13d44bd More LIST/CIRCLEQ migration. 1994-08-18 22:47:43 +00:00
mycroft 8743009944 Convert some more lists and queues. 1994-08-17 14:43:47 +00:00