summaryrefslogtreecommitdiffstats
path: root/sys/nfs (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* remove rpc_auth_kerb variable, its now unused...thib2008-06-131-4/+2
|
* nuke a bunch of bogus ARGSUSED;thib2008-06-131-6/+1
| | | | ok blambert@
* Remove dead-end and never-used kerberos code in nfs. Future workblambert2008-06-131-139/+9
| | | | | | | to support authentication other than AUTH_UNIX will replace this with a (hopefully) much better system. ok thib@
* Replace one-line macro which only obfuscated the fact thatblambert2008-06-134-43/+40
| | | | | | the function it was named after took 4 arguments instead of 2. "get it in; get it in; get it in" thib@
* Remove now-vestigial bpos pointer from NFS. For building outgoingblambert2008-06-128-228/+174
| | | | | | | | | 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...)
* add a statistic bit to count how often we change async to syncthib2008-06-122-3/+7
| | | | | | you need to upgrade nfsstat and the relevant header files ok beck@
* if (something_complicated)art2008-06-121-10/+3
| | | | | | | | | | return (EIO); return (EIO); is kinda silly. Don't. Prettify a bit in the process. 'makes perfect sense' blambert@, ok thib@
* Bring biomem diff back into the tree after the nfs_bio.c fix went in.deraadt2008-06-122-8/+14
| | | | ok thib beck art
* Actually return an error in nfs_asyncio() if we fail to processthib2008-06-121-13/+3
| | | | | | | 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@
* back out biomem diff since it is not right yet. Doing very largederaadt2008-06-112-14/+8
| | | | | | | | 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.
* return an XDR'rd xid from nfs_get_xid() and kill the nfs_xid globalthib2008-06-111-7/+4
| | | | | | variable; ok & feedback deraadt@
* Canonical for() -> queue.h FOREACH macro conversions.blambert2008-06-1110-21/+26
| | | | | | | | | 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
* remove an unused variablethib2008-06-111-2/+1
|
* Remove redundant code that only leaked an mbuf.blambert2008-06-101-7/+1
| | | | | | | ok krw@, deraadt@, thib@ earlier commit for some reason did not go through prodded by nfs buddy
* o Avoid putting duplicate entries into the name cache,thib2008-06-105-18/+96
| | | | | | | | | | | | | | | | 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@
* Buffer cache revampbeck2008-06-102-8/+14
| | | | | | | | | | | | | | | | 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
* Update access(2) to have modern semantics with respect to X_OK andmillert2008-06-091-3/+3
| | | | | | 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@
* nfsm_get_xid() => nfs_get_xid() after thib@ informed me that thedjm2008-06-092-5/+5
| | | | nfsm_* functions are for mbufs
* Introduce a facility to generate unpredictable 32 bit numbers withdjm2008-06-093-13/+42
| | | | | | | | | | | | | | 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@
* remove a bunch of kerberos definitionsthib2008-06-083-48/+4
|
* Remove bloated and nasty nfsm_clget macro; while here, replace someblambert2008-05-272-142/+34
| | | | | | | handrolled loops with nfsm_strtombuf and nfsm_buftombuf. ok deraadt@ via thib@; ok 'nfs buddy' thib@ testing johan@, merdely@; thanks
* be much more clear about revarp failures; ok miodderaadt2008-05-271-2/+2
|
* Deal with the situation when TCP nfs mounts timeout and processesthib2008-05-232-6/+6
| | | | | | | | | | | | | 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.
* Fix last commit, it is rtrequest1() and not rtrequest(). Lucky me it seemsclaudio2008-05-201-2/+2
| | | | that the code is ifdef-ed out all the time.
* KNF. No names for arguments in function prototypes, regroupthib2008-05-171-19/+10
| | | | functions and make some comments nicer...
* don't grab the receive lock in nfs_rcvlock if the reply hasthib2008-05-131-7/+10
| | | | | | | | | | already been received while we slept. prevents processes from monopolising the lock. From FreeBSD; ok blambert@ tested by johan@ and a few others
* Another rtrequest() rtrequest1() replacement.claudio2008-05-091-3/+8
| | | | OK henning@
* retire vn_default_error() and replace all instancesthib2008-05-081-2/+2
| | | | | | with eopnotsupp() instead; ok blambert@
* plug potential mbuf leaks;thib2008-05-021-3/+8
| | | | | | | Parts from NetBSD; OK blambert@; tested by johan@, sthen@ and a few others.
* Plug potential mbuf leak by changing m_free to m_freem.blambert2008-04-251-2/+2
| | | | | | From NetBSD. ok thib@
* Remove kludges that map EEXIST errors too a 0 return (success) for certainthib2008-04-221-20/+3
| | | | | | | | | | | | | | | | | | 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;
* Close potential mbuf leak by iterating over the mbuf packet chainblambert2008-04-221-3/+8
| | | | | | | | and m_freem()'ing vice doing so only on the first packet. From a similar change in NetBSD. "yes please" thib@
* remove the "kerbflag" argument from nfsrv_fhtovp() and nfs_namei()thib2008-04-223-70/+35
| | | | | | | | (the latter only had it to pass it to nfsrv_fhtovp()). appropriate cleanup also; ok blambert@
* Add comments detailing what the SLP_* flag #define's meanblambert2008-04-221-10/+10
| | | | ok thib@
* in nfsm_reqh(), only allocate an mbuf cluster if thethib2008-04-191-2/+2
| | | | | | | len exceeds MLEN, not MINCLSIZE; inspired by a similar commit from damien. ok damien@, blambert@
* use arc4random_uniform() for random number requests that are not adjm2008-04-181-2/+2
| | | | | | | | | power of two. use arc4random_bytes() when requesting more than a word of PRNG output. ok deraadt@
* more efficient use of mbufs in nfsm_uiotombuf().damien2008-04-161-2/+2
| | | | | | | allocate a mbuf cluster only if length is greater than MLEN instead of MINCLSIZE. ok blambert@, thib@
* Rework NFS mbuf write routines:blambert2008-04-145-198/+120
| | | | | | | | | | | | | | | | | | | | | | | | 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@
* move the cache lookup code into a function, instead repeatingthib2008-04-141-73/+82
| | | | | | | | it twice, makes this nicer as a bonus; From NetBSD. tested by johan@, ok blambert@.
* Refine "netboot" interface group semantics to indicate the interface wederaadt2008-03-311-2/+1
| | | | | | | 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
* label all interfaces we netboot from in group "netboot", in a MI fashionderaadt2008-03-191-1/+2
| | | | ok miod
* Widen some struct statfs fields to support large filesystem stataotto2008-03-162-22/+19
| | | | | and add some to be able to support statvfs(2). Do the compat dance to provide backward compatibility. ok thib@ miod@
* diff missed in previous commit:deraadt2008-01-061-3/+3
| | | | | | | | | | | | | More NFS-related kernel shrinkage... When you use a macro ~200 times, it tends to bloat your code, so make a function out of it. Shaves ~8.5 kB from my kernel. ok thib@, "looks good" krw@ In snaps for 1+ week with no negative reports.
* More NFS-related kernel shrinkage...blambert2008-01-066-132/+147
| | | | | | | | | | | When you use a macro ~200 times, it tends to bloat your code, so make a function out of it. Shaves ~8.5 kB from my kernel. ok thib@, "looks good" krw@ In snaps for 1+ week with no negative reports.
* nfs_sndlock() is often called with its rep argumentthib2007-12-281-2/+2
| | | | | | | | | as NULL, so make sure its non-NULL before attempting to reference it. Fixes PR5694; Confirmed by submitter. OK art@, krw@
* Fix for PR5365.thib2007-12-271-40/+28
| | | | | | | | | Use the va_blocksize, that is the blocksize of the underlying exported file system instead of the DIRBLKSIZ constant to size the chunks. Diff from Enache Adrian <3n4ch3@gmail.com> Tested by myself and a few others.
* Garbage collect nfsdmap and leftover code. That structurethib2007-12-132-41/+5
| | | | | | | was used as a part of the "old-style directory caching" that was removed in 2001; ok beck@, blambert@
* convert massive (expanded to 150+ lines) nfsm_v3attr macro to a functionblambert2007-12-134-72/+86
| | | | | | shaves an insane (~8K) amount from an i386 kernel ok thib@
* fill the va_blocksize with something a litte saner,thib2007-11-281-3/+13
| | | | | | | | | make stat(2) return st_blocksize thats a bit closer to reality. From NetBSD; OK art@, beck@, tedu@
* Fix unsafe queue macro useblambert2007-11-081-4/+4
| | | | ok thib@ 'emphatic' ok beck@