Commit Graph

171 Commits

Author SHA1 Message Date
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
yamt b0c4bb36d9 nfs_getreq: fix a kauth fallout.
pointed by nanashi-san.  http://pc8.2ch.net/test/read.cgi/unix/1145181361/786
2006-07-15 05:54:10 +00:00
yamt 2a9a8246f0 nfs_request: don't bother to handle NFSERR_STALEWRITEVERF
because it isn't a real nfs error value.
2006-06-30 09:55:06 +00:00
kardel de4337ab21 merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
blymn 4a065f3379 Clean up bogus whitespace 2006-05-28 13:23:08 +00:00
yamt 3ef3d785cc nfs_request: use kauth_cred_free rather than kauth_cred_destroy. 2006-05-28 06:47:58 +00:00
yamt b245701ca1 - fix compilation problem for !NFSSERVER && NFS.
pointed by Tom Spindler on source-changes@.
- make nfs_srvdesc_pool static.
2006-05-19 13:53:11 +00:00
yamt b861e24c71 - fix some leaks in nfsd, introduced by kauth changes.
- simplify code.
- add some assertions.
- wrap some long lines.
- remove an unnecessary ";".
2006-05-18 12:44:45 +00:00
elad fc9422c9d9 integrate kauth. 2006-05-14 21:31:52 +00:00
mrg 084c052803 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
dogcow bbfbd3e91f #if -> #ifdef 2006-04-15 02:46:39 +00:00
christos 0b55b29a78 Coverity CID 734: Define NFS_TEST_HEAVY for testing nfsds, and use this to
ifdef out dead code. XXX: Why is this turned on by default?
2006-04-15 01:57:36 +00:00
rpaulo 5bb59eeab9 Back out revision 1.125 and 1.124. The code for checking if
slp->ns_reclen == 0, was already there since "Linux sometimes
generates 0-lenght records.".

Bad Rui...
2006-03-01 21:31:00 +00:00
rpaulo 52dc289cfd In nfsrv_getstream(), ns_reclen will never be negative due to the
previous assignment (recmark & ~0x80000000).
Pointed out by Christos.
2006-03-01 19:38:29 +00:00
rpaulo b948e12637 From FreeBSD SA-06:10
Correct a remote kernel panic when processing zero-length RPC records
	via TCP.
2006-03-01 15:30:12 +00:00
yamt ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
yamt 7416ebb551 nfssvc_nfsd: reduce a chance for a slow peer to capture all our threads.
instead of sleeping to wait for the socket to send our reply,
just hand-off our reply to the thread which is holding the socket.
2006-01-03 12:30:01 +00:00