summaryrefslogtreecommitdiff
path: root/sys/nfs
AgeCommit message (Collapse)Author
2008-06-15unroll the NFSMADV() macro and nuke itThordur I. Bjornsson
ok blambert@
2008-06-14Replace nfsm_build/bcopy with nfsm_{buf,str}tombuf functions inBret Lambert
filehandle -> mbuf write macros. Removes `magic' variable cp which was used only in these macros, and should lead to marginally better mbuf packing as well. `slap it in' thib@
2008-06-14Ensure each nfsiod can actually enqueue more than one asynchio - this mirrorsBob Beck
the accidental situation that used to happen when it leaked buffers and allowed the syncer to do it, however this puts a limit on how much of the buffer cache it is allowed to consume to a sensible amount - improves nfs write performance since we don't have to do tons of them synch now. Modifies the existing code to use wakeup_one instead of cruft, and now all nfsiod's tsleep the same way. ok thib@ art@
2008-06-14A bunch of pool_get() + bzero() -> pool_get(..., .. | PR_ZERO)Michael Knudsen
conversions that should shave a few bytes off the kernel. ok henning, krw, jsing, oga, miod, and thib (``even though i usually prefer FOO|BAR''; thanks for looking.
2008-06-14Replace magic '2' and '3' with defines for nfs version numbersThordur I. Bjornsson
ok blambert@
2008-06-14Clean up nfsrv_wakenfsd(); variable name change to be in line with theBret Lambert
rest of NFS code, canonical for() -> LIST_FOREACH() change, minor readability changes. ANSIfy function while here. ok thib@
2008-06-14use nfsm_padlen() where appropriate;Thordur I. Bjornsson
ok blambert@
2008-06-14put the canonical ifdef dance for multiple inclusion, also put all theThordur I. Bjornsson
contents of this file inside #ifdef _KERNEL; there's nothing here that userland should ever need/touch. but then again, some userland programs define _KERNEL before they include kernel header files *shrugh*... survived a build, OK blambert@
2008-06-13NFSD_NEEDAUTH and NFSD_AUTHFAIL are never set, so cull code thatBret Lambert
depends on them being set. This should be the removal of the original return-to-userland-to-authenticate code that was apparently an unfinished experiment. ok thib@
2008-06-13Kill one-liner macro which obfuscated mbuf pointer assignment.Bret Lambert
Rescue nfsm_reqhead macro name and rename nfsm_reqh. End of one-liners from nfsm_subs.h. ok thib@
2008-06-13remove rpc_auth_kerb variable, its now unused...Thordur I. Bjornsson
2008-06-13nuke a bunch of bogus ARGSUSED;Thordur I. Bjornsson
ok blambert@
2008-06-13Remove dead-end and never-used kerberos code in nfs. Future workBret Lambert
to support authentication other than AUTH_UNIX will replace this with a (hopefully) much better system. ok thib@
2008-06-13Replace one-line macro which only obfuscated the fact thatBret Lambert
the function it was named after took 4 arguments instead of 2. "get it in; get it in; get it in" thib@
2008-06-12Remove now-vestigial bpos pointer from NFS. For building outgoingBret Lambert
NFS mbufs, mbufs now contain all their internal buffer state internally, the way god intended. ok thib@ testing johan@ (and possibly merdely@; this diff's been around for a bit...)
2008-06-12add a statistic bit to count how often we change async to syncThordur I. Bjornsson
you need to upgrade nfsstat and the relevant header files ok beck@
2008-06-12 if (something_complicated)Artur Grabowski
return (EIO); return (EIO); is kinda silly. Don't. Prettify a bit in the process. 'makes perfect sense' blambert@, ok thib@
2008-06-12Bring biomem diff back into the tree after the nfs_bio.c fix went in.Theo de Raadt
ok thib beck art
2008-06-12Actually return an error in nfs_asyncio() if we fail to processThordur I. Bjornsson
the buf due too all of the nfs iod's being busy; this downgrades the write to a sync one and allows to handle this. ok art@, beck@
2008-06-11back out biomem diff since it is not right yet. Doing very largeTheo de Raadt
file copies to nfsv2 causes the system to eventually peg the console. On the console ^T indicates that the load is increasing rapidly, ddb indicates many calls to getbuf, there is some very slow nfs traffic making none (or extremely slow) progress. Eventually some machines seize up entirely.
2008-06-11return an XDR'rd xid from nfs_get_xid() and kill the nfs_xid globalThordur I. Bjornsson
variable; ok & feedback deraadt@
2008-06-11Canonical for() -> queue.h FOREACH macro conversions.Bret Lambert
Also, it is historical practice to #include <sys/queue.h> when using queue.h macros. ok thib@ krw@ special thanks to krw@ for reminders vice violence
2008-06-11remove an unused variableThordur I. Bjornsson
2008-06-10Remove redundant code that only leaked an mbuf.Bret Lambert
ok krw@, deraadt@, thib@ earlier commit for some reason did not go through prodded by nfs buddy
2008-06-10o Avoid putting duplicate entries into the name cache,Thordur I. Bjornsson
add a function to handle cache_enter()'s for us since we need to update the appropriate timestamps so we don't miss on lookup; o Do not purge the dvp in nfs_rmdir(), since there's no need; o cache the new entry created in nfs_mkdir(); o Do caching of the access modes, this drastically reduces the amount of over the wire access RPCs we do in the NFSv3 case. This diff was written by Pedro Martelletto, sometime in 2004. A lot of people have been running with it at one time or another, this includes at least markus and matthieu. OK deraadt@, blambert@
2008-06-10Buffer cache revampBob Beck
1) remove multiple size queues, introduced as a stopgap. 2) decouple pages containing data from their mappings 3) only keep buffers mapped when they actually have to be mapped (right now, this is when buffers are B_BUSY) 4) New functions to make a buffer busy, and release the busy flag (buf_acquire and buf_release) 5) Move high/low water marks and statistics counters into a structure 6) Add a sysctl to retrieve buffer cache statistics Tested in several variants and beat upon by bob and art for a year. run accidentally on henning's nfs server for a few months... ok deraadt@, krw@, art@ - who promises to be around to deal with any fallout
2008-06-09Update access(2) to have modern semantics with respect to X_OK andTodd C. Miller
the superuser. access(2) will now only indicate success for X_OK on non-directories if there is at least one execute bit set on the file. OK deraadt@ thib@ otto@
2008-06-09nfsm_get_xid() => nfs_get_xid() after thib@ informed me that theDamien Miller
nfsm_* functions are for mbufs
2008-06-09Introduce a facility to generate unpredictable 32 bit numbers withDamien Miller
near maximal (2^32) cycle times. These are useful for network IDs in cases where there are negative consequences to ID prediction and/or reuse. Use the idgen32() functions to generate IPv6 IDs and NFS client/server XIDs. Pseudorandom permutation code in crypto/idgen.c based on public domain skip32.c from Greg Rose. feedback & ok thib@ deraadt@
2008-06-08remove a bunch of kerberos definitionsThordur I. Bjornsson
2008-05-27Remove bloated and nasty nfsm_clget macro; while here, replace someBret Lambert
handrolled loops with nfsm_strtombuf and nfsm_buftombuf. ok deraadt@ via thib@; ok 'nfs buddy' thib@ testing johan@, merdely@; thanks
2008-05-27be much more clear about revarp failures; ok miodTheo de Raadt
2008-05-23Deal with the situation when TCP nfs mounts timeout and processesThordur I. Bjornsson
get hung in nfs_reconnect() because they do not have the proper privilages to bind to a socket, by adding a struct proc * argument to sobind() (and the *_usrreq() routines, and finally in{6}_pcbbind) and do the sobind() with proc0 in nfs_connect. OK markus@, blambert@. "go ahead" deraadt@. Fixes an issue reported by bernd@ (Tested by bernd@). Fixes PR5135 too.
2008-05-20Fix last commit, it is rtrequest1() and not rtrequest(). Lucky me it seemsClaudio Jeker
that the code is ifdef-ed out all the time.
2008-05-17KNF. No names for arguments in function prototypes, regroupThordur I. Bjornsson
functions and make some comments nicer...
2008-05-13don't grab the receive lock in nfs_rcvlock if the reply hasThordur I. Bjornsson
already been received while we slept. prevents processes from monopolising the lock. From FreeBSD; ok blambert@ tested by johan@ and a few others
2008-05-09Another rtrequest() rtrequest1() replacement.Claudio Jeker
OK henning@
2008-05-08retire vn_default_error() and replace all instancesThordur I. Bjornsson
with eopnotsupp() instead; ok blambert@
2008-05-02plug potential mbuf leaks;Thordur I. Bjornsson
Parts from NetBSD; OK blambert@; tested by johan@, sthen@ and a few others.
2008-04-25Plug potential mbuf leak by changing m_free to m_freem.Bret Lambert
From NetBSD. ok thib@
2008-04-22Remove kludges that map EEXIST errors too a 0 return (success) for certainThordur I. Bjornsson
operations (non-idempotent ones) under the assumption that the reply from the server is for a duplicate of the original request. However, most (all) NFS server today have a duplicate reply cache that address this problem and these kludges have been shown to cause problems with some applications (most notably dovecot as pointed out by brad@). For more information: http://lists.freebsd.org/pipermail/freebsd-current/2007-November/079961.html And revision 1.277 of sys/nfsclient/nfs_vnops.c in FreeBSD. Diff from rwatson@freebsd.org OK blambert@, "no objections" krw@ tested by many;
2008-04-22Close potential mbuf leak by iterating over the mbuf packet chainBret Lambert
and m_freem()'ing vice doing so only on the first packet. From a similar change in NetBSD. "yes please" thib@
2008-04-22remove the "kerbflag" argument from nfsrv_fhtovp() and nfs_namei()Thordur I. Bjornsson
(the latter only had it to pass it to nfsrv_fhtovp()). appropriate cleanup also; ok blambert@
2008-04-22Add comments detailing what the SLP_* flag #define's meanBret Lambert
ok thib@
2008-04-19in nfsm_reqh(), only allocate an mbuf cluster if theThordur I. Bjornsson
len exceeds MLEN, not MINCLSIZE; inspired by a similar commit from damien. ok damien@, blambert@
2008-04-18use arc4random_uniform() for random number requests that are not aDamien Miller
power of two. use arc4random_bytes() when requesting more than a word of PRNG output. ok deraadt@
2008-04-16more efficient use of mbufs in nfsm_uiotombuf().Damien Bergamini
allocate a mbuf cluster only if length is greater than MLEN instead of MINCLSIZE. ok blambert@, thib@
2008-04-14Rework NFS mbuf write routines:Bret Lambert
nfsm_uiotombuf(): - no meaningful return, function becomes void - replace frankensteined uiomove/MGET with actual call to uiomove nfsm_strtmbuf(): - no meaningful return, becomes void - rename and reorder parameters to be consistent with other functions - becomes wrapper to nfsm_uiotombuf nfsm_buftombuf(): - new function; unused but slated for future use - wrapper to nfsm_uiotombuf As a bonus, making these functions void removes much unneeded code and garbage collects `magic' variable t2 which was only used (invisibly) by the macros from nfsm_subs.h Preps the way for removing much more NFS goo... testing by myself, thib@ and merdely@ ok thib@
2008-04-14move the cache lookup code into a function, instead repeatingThordur I. Bjornsson
it twice, makes this nicer as a bonus; From NetBSD. tested by johan@, ok blambert@.
2008-03-31Refine "netboot" interface group semantics to indicate the interface weTheo de Raadt
booted from to the most precision; preferring the boot device, or if that is not known, the root device discussed with miod and reyk tested by beck