Commit Graph

187 Commits

Author SHA1 Message Date
pooka
77486bda39 Get rid of dependency on fs_nfs.h, i.e. source modules with
conditional content depending on if the NFS client is wanted or
not.  The server can now be made an independent module not depending
on the nfs client.

Tested with rump_nfs (standalone client), rump_nfsd (standalone
nfsd) and a qemu installation with both the client and the server.
2010-03-02 23:19:09 +00:00
yamt
b1ff79355f nfs_msg: #if 0 out tprintf for now and comment why. 2010-02-13 11:17:30 +00:00
yamt
5a779e86cd nfs_request: fix races which break congestion window and make nfs client stuck. 2010-01-19 13:39:04 +00:00
christos
41b6684af0 appease gcc. 2009-12-31 19:31:31 +00:00
dyoung
8641587693 For readability's sake, write NULL instead of (type *)0. 2009-12-06 18:00:15 +00:00
bouyer
5dabc83466 Handle EWOULDBLOCK the same way as EPIPE. It seems the TCP socket layer
can return EWOULDBLOCK on some occasion when the connection is broken.
2009-11-05 08:11:24 +00:00
pooka
65aa3ef107 If send fails with EMSGSIZE for whatever reason, it's unlikely to
succeed no matter how hard we retry.  So just fail the request.
2009-10-16 23:36:05 +00:00
dsl
82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
ad
350a5f88e7 PR kern/40491 5.0: nfs timer can crash/break on smp
Hack around it by acquiring softnet_lock around the client-side timer loop.
2009-02-04 20:36:54 +00:00
yamt
812bb0d164 restore the pre socket locking patch signal behaviour.
this fixes a busy-loop in nfs_connect.
2009-01-21 06:59:29 +00:00
mrg
f41b56aff5 Actually enforce the maximum timeout (60s by default) rather
than backing off to 256*SRTT.  This is why it sometimes could take
hours for a NFS mount to come back when the server returned.

contributed anonymously.
2009-01-18 09:45:05 +00:00
mrg
d7d9597105 avoid noisy nfs_timer/nfs_reply DEBUG output that occurs when the
NFS server goes away.  use ratelimit(9) and only print the console
error once every 10 seconds.  PR#31562.
2008-11-23 08:22:07 +00:00
ad
92ce8c6a3d Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
2008-11-19 18:35:57 +00:00
pooka
d9f75a894c nuke outdated comment 2008-10-07 01:20:37 +00:00
pooka
7f617ba79e Apply #ifdef modern art to make NFSSERVER-without-NFS possible. 2008-09-30 14:25:15 +00:00
plunky
fd7356a917 Convert socket options code to use a sockopt structure
instead of laying everything into an mbuf.

approved by core
2008-08-06 15:01:23 +00:00
ad
15e29e981b Merge the socket locking patch:
- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.

With much feedback from matt@ and plunky@.
2008-04-24 11:38:36 +00:00
yamt
7f11d683b1 - make nfs_receive and nfs_reply static.
- ansify.
2008-04-10 12:32:37 +00:00
yamt
24840272de whitespace. 2008-03-28 14:29:57 +00:00
yamt
677860cb8a use kmem_alloc instead of malloc. 2008-01-02 19:26:45 +00:00
ad
4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
yamt
1ed3981c19 merge non-intrusive nfs changes from vmlocking. 2007-12-04 17:42:30 +00:00
yamt
46b951d6aa remove lwp argument from nfs_reconnect and always use &lwp0
because who triggers a reconnect doesn't really matter here.  PR/37145.
2007-10-21 08:23:19 +00:00
yamt
1f0f803e45 use kpause rather than lbolt. 2007-08-05 09:40:39 +00:00
yamt
d72bfdbeb2 nfsdsock_unlock: add an assertion. 2007-08-02 12:45:37 +00:00
yamt
c90a0e2579 stop nfs tick when we have nothing to do. 2007-07-27 10:03:58 +00:00
ad
88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
dsl
6319443e37 Updates for changes prototype of kauth_cred_set/getgroups(). 2007-06-30 15:27:02 +00:00
yamt
f0baa9219b - nfsrv_slpderef: fix a locking botch.
(should fix "slp->ns_sref == 0" assertion failures in nfsrv_init)
- add some related assertions.
2007-06-22 14:39:59 +00:00
yamt
05aaff39ff use mutex and condvar. 2007-06-01 11:56:03 +00:00
yamt
61131eb130 nfsdsock_lock: fix an inverted check of SLP_VALID. 2007-06-01 11:38:44 +00:00
yamt
febe85111f - remove nfs_exit exit hook. ok'ed by christos@.
- as far as i understand the code, it shouldn't be necessary
	  because nfs_request can't return without removing its request
	  and r->r_lwp is either curlwp or NULL.
	- even if it's necessary, leaking requests is not the correct way
	  to recover from the condition.
- nfs_request: add a related assertion.
2007-05-28 16:47:38 +00:00
yamt
fce3c58e5e nfs_rcvlock: fix NFSMNT_INT check, which has been broken since rev.1.39. 2007-05-02 16:19:55 +00:00
yamt
e4c778084c - nfs_reply: keep rcvlock longer so that lwp which already have its reply
received won't be stuck in nfs_receive.
- nfs_rcvlock: check exceptions before sleeping on the lock.
- nfs_rcvunlock: use cv_broadcast rather than cv_signal to ensure that
  lwps which received its reply get woken up.
2007-05-02 14:48:47 +00:00
yamt
ab54f30196 remove R_GETONEREP. 2007-04-30 23:10:55 +00:00
yamt
bbe5115ad9 use condvar. 2007-04-29 14:56:59 +00:00
yamt
aca6764004 use mutex and condver. 2007-04-29 10:30:18 +00:00
ad
59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
thorpej
b3667ada6d TRUE -> true, FALSE -> false 2007-02-22 06:05:00 +00:00
thorpej
712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
ad
b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
yamt
ccfd2c0df0 remove nqnfs. 2006-12-27 12:10:09 +00:00
yamt
9c62b6fe1d nfs_disconnect: 2 -> SHUT_RDWR. no functional change. 2006-12-06 09:13:46 +00:00
yamt
6c575a38c3 nfsrv_rcv: claim ownership of received mbufs. 2006-12-06 08:55:52 +00:00
yamt
89682b24fe remove some __unused in function parameters. 2006-11-09 09:53:57 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
dogcow
55ddfc9aae change the MOWNER_INIT define to take two args; fix extant struct mowner
decls to use it. Makes options MBUFTRACE compile again and not whinge about
missing structure declarations. (Also makes initialization consistent.)
2006-10-10 21:49:14 +00:00
yamt
b45e7d3197 nfsdreq_free: remove an assertion which is not true. 2006-09-02 13:30:08 +00:00