Commit Graph

69 Commits

Author SHA1 Message Date
lukem 0ffad69384 add RCSIDs 2001-11-10 10:59:08 +00:00
simonb aaaea89787 Don't initialise the 5th element of some 4 element arrays. 2001-10-13 22:59:16 +00:00
fvdl 0cc3c4a023 Suppress another case of a potentially noisy error message which
isn't fatal.
2001-05-09 20:02:32 +00:00
jdolecek 522f569810 make some more constant arrays 'const' 2001-02-21 21:39:52 +00:00
jdolecek 7ec49a1f35 update commented out code to recent changes of signal structures 2000-12-27 22:01:43 +00:00
bjh21 47d4a4d009 Extra diagnostic assertion: subtle pmap bugs can ultimately lead to trying
to use NULL credentials for NFS ops, so spot them before we dereference them.
2000-12-27 16:35:37 +00:00
fvdl 405b695086 Make sobind() take a struct proc *. It already took curproc and
passed it down to the appropriate usrreq function, and this
allows usage for contexts that need to be explicitly different
from curproc (like in the NFS code when binding to a reserved port).
2000-12-10 23:16:28 +00:00
fvdl 06b8ac615d Avoid unused variables for V2_ONLY case. 2000-09-27 18:36:03 +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 874d41c959 "ENOBUF" on socket writes isn't really fatal; we may just be too fast
for the driver. Don't log the error, just try again. Could try to
be smart and do a backoff, but it's probably not worth the trouble.
2000-09-19 22:21:21 +00:00
bjh21 33daa8de6b New kernel option, NFS_V2_ONLY, which aims to reduce the NFS client to just
that required to support NFSv2 mounts.  Not finished yet, but already
provides some 44k of saving in code size on arm26.  More savings, and some
documentation, are still to come.
2000-09-19 17:04:50 +00:00
mrg 6eeafef261 remove include of <vm/vm.h> 2000-06-27 17:52:28 +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
thorpej 21fc65e1a8 sleep() -> tsleep() 2000-05-27 04:52:27 +00:00
augustss 8529438fe6 Remove register declarations. 2000-03-30 12:51:13 +00:00
thorpej fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +00:00
sommerfeld 873713a5f7 Fix overzealous DIAGNOSTIC check in nfs_disconnect()
(fix pr8249, 8288)
1999-08-29 16:29:16 +00:00
fvdl 3c9ce57651 Don't try to copy an mbuf that may have been freed in case of an error. 1999-07-30 09:46:24 +00:00
sommerfeld c1ecf66965 kern/5591: Fix race in the NFS socket code during umount -f and system
shutdown:

During an unmount, wake up all the processes which are waiting to lock
the socket for receive, and wait for them (and the process blocked in
soreceive, if any) to go away before blowing away the socket and the
mount structure.
1999-07-04 19:56:00 +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
thorpej 1b97ad6910 Fix printf format warnings on Alpha. 1999-02-12 01:37:06 +00:00
fvdl fb1a849339 Use different names for the "nfscon" label to tsleep(), so that it can
be seen in which one a process is sleeping.
1998-11-12 22:31:02 +00:00
mycroft fb526e055c Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
  versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
  sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
  sys_sigpending() and sys_sigsuspend() into separate functions, and call them
  from all the emulations rather than hard-coding everything.  (Avoids uses
  the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
  pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
  bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
  in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified.  Other ports and
emulations need to be updated.
1998-09-11 12:50:05 +00:00
perry 4522c799a1 bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:51:08 +00:00
fvdl 2db169eb1f Avoid possibly overflowing an mbuf. From Dan S. Decasper, via Chuck Cranor. 1998-07-20 16:41:05 +00:00
thorpej 6b781d156f defopt NFSSERVER 1998-06-25 22:17:36 +00:00
matt bd055c0318 Adapt to new sosend/soreceive and upcall (now down in sowakeup) 1998-04-25 17:41:01 +00:00
thorpej 2146a2ed29 Include the NFS option header. 1998-02-19 00:54:13 +00:00
fvdl 0c8ab9044c Only take the receive lock before disconnecting when doing it from
nfs_decode_args. Otherwise we might just end up locking against ourselves.

XXX workaround, will do ok for now. Proper fix forthcoming.
1998-01-30 22:44:13 +00:00
fvdl e46f160a4a Make sure the receive lock is taken when disconnecting a socket. Also
change a check for a 'connected' socket to use the socket rather than
the mount flags.

From Matthias Drochner.
1997-11-16 23:23:20 +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
gwr 248eff8eee Temporary work-around for PR kern/3579 (from Jonathan Stone). 1997-05-22 18:20:06 +00:00
fvdl fe28924160 * If nfs_reconnect fails, be sure to release the sndlock, otherwise no
other requests will get through and the mount point will be effectively dead.
  This could happen for mounts using TCP and -i and/or -s.
* Reserve enough space for UDP sockets. Fixes PR 3008, from Naofumi Honda.
1997-05-12 23:40:22 +00:00
fvdl b4e49cf0e9 Avoid nfsiods acquiring/releasing a lock, then acquiring it again, before
anyone else can get to it, by checking if a reply was received, and it
has thus become unnecessary to take the lock. From FreeBSD.

XXX I don't really like this, "locks" potentially suffer from the same
problem throughout the whole kernel; they should probably be FIFO everywhere.
1997-04-08 17:57:16 +00:00
fvdl dce1770311 Fixes from BSDI (thanks go to Keith Bostic). Original RCS messages:
date: 1995/11/30 20:37:03;  author: cp;  state: Exp;  lines: +25 -14
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: 1997/02/10 18:41:13;  author: cp;  state: Exp;  lines: +4 -1
Make nfs_realign go away on sparc and add functionality to nfsm_disct.
1997-02-22 02:59:08 +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
fvdl 64fcae7bcb * Make sure a new socket is created when switching to/from NOCONN with
a mount
* Add extra printf statements to hopefully get some more info on lockups,
  specifically when a send error is ignored.
1997-02-04 21:33:19 +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 0f6afee9a7 Remove bogus check on record length < NFS_MINPACKET.
(From Guy Harris via Rick Macklem).
1996-07-02 23:21:15 +00:00
mycroft 49d52c9b1c Pass a proc pointer down to the usrreq and pcbbind functions for PRU_ATTACH, PRU_BIND and
PRU_CONTROL.  The usrreq interface really needs to be split up, but this will have to wait.
Remove SS_PRIV completely.
1996-05-22 13:54:55 +00:00
thorpej b417cc19fe Make this compile again on a SPARC if NFSCLIENT is defined without
NFSSERVER.  (-Wall unused variable lossage)
1996-04-15 20:20:00 +00:00
fvdl 3821dd940b Oops. Do previous fix on the right line this time.. (thanks Charles) 1996-02-25 17:47:26 +00:00
fvdl 1f20fc9fc2 Call soreserve() with the right size for receives (from pk). 1996-02-25 15:30:01 +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
mycroft 5482957905 splnet --> splsoftnet 1995-08-12 23:59:09 +00:00
mycroft 41a1b362f8 Fix more off by one errors. 1995-06-02 19:50:11 +00:00