summaryrefslogtreecommitdiffstats
path: root/sys/nfs/nfs_subs.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* return an XDR'rd xid from nfs_get_xid() and kill the nfs_xid globalthib2008-06-111-7/+4
| | | | | | variable; ok & feedback deraadt@
* o Avoid putting duplicate entries into the name cache,thib2008-06-101-1/+13
| | | | | | | | | | | | | | | | 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@
* nfsm_get_xid() => nfs_get_xid() after thib@ informed me that thedjm2008-06-091-3/+3
| | | | nfsm_* functions are for mbufs
* Introduce a facility to generate unpredictable 32 bit numbers withdjm2008-06-091-8/+19
| | | | | | | | | | | | | | 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 the "kerbflag" argument from nfsrv_fhtovp() and nfs_namei()thib2008-04-221-18/+6
| | | | | | | | (the latter only had it to pass it to nfsrv_fhtovp()). appropriate cleanup also; ok blambert@
* 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-141-141/+85
| | | | | | | | | | | | | | | | | | | | | | | | 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@
* More NFS-related kernel shrinkage...blambert2008-01-061-25/+54
| | | | | | | | | | | 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.
* convert massive (expanded to 150+ lines) nfsm_v3attr macro to a functionblambert2007-12-131-1/+77
| | | | | | 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@
* deinline nfs_attrtimeo(); and remove some associatedthib2007-11-051-8/+2
| | | | | | #ifdef goo. ok krw@, blambert@
* Remove alot of dead kerberos code (add sane comments too).thib2007-10-131-127/+72
| | | | | | | | | | | | | Cleanup and partly redo the way we create the RPC header, by having nfsm_rpchead() do a bit more work. Right now this is pretty RPCAUTH_UNIX centric, but since it is the only auth method we support right now thats fine. Make sure we can never generate a zero xid, thats forbidden by the RFC. Misc cleanup. tested by a few.
* shrink nfsrv_v2errmap[] and check table size more carefully to avoidderaadt2007-10-081-8/+5
| | | | dependency on ELAST; ok miod thib
* Make sure nfsrv_v2errmap[] really contains ELAST initialized values.miod2007-10-071-2/+3
|
* MALLOC/FREE -> malloc/free + M_ZERO.thib2007-09-201-2/+1
| | | | | | Uneeded includes and casts... ok krw@
* Replace the nfskevq_lock lockmgr lock with rwlock.thib2007-04-191-5/+1
| | | | | | | | Replace nfs_kqinit() wich just calls lockinit with RWLOCK_INITALIZER. Assorted cleanup. ok tedu@ "reads good" art@
* remove some unneeded externs and unused declerations.thib2007-04-131-8/+1
| | | | | | There's no need to extern stuff thats declared in the same file. ok tedu@
* Avoid void * arithmetic, okay deraadt@, suggestions from millert@pedro2006-12-291-3/+3
|
* move the declaration of nfsstats from nfs_bio.c tothib2006-11-011-1/+2
| | | | | | | nfs_subs.c so it gets pulled in for NFSSERVER only kernels. ok deraadt@,krw@
* revert vfs.nfs.privport sysctl, broke a few architecturesavsm2006-05-291-11/+7
| | | | requested by deraadt@
* Add support for NFS mounts to be from non-reserved ports:avsm2006-05-281-7/+11
| | | | | | | | - new sysctl vfs.nfs.privport to require NFS mount requests to be on reserved ports when set to 1 (the default). - mountd now automatically sets the sysctl depending on the -n flag. - add mountd_flags to rc.conf to enable the -n flag at boot. deraadt@ ok
* Remove v_vnlock from struct vnode, okay krw@ tedu@pedro2005-10-191-3/+1
|
* use pool for struct nfsreq; tedu@ pedro@ ok and testing by mark patruck <mark@2ls4agd.net> on several archsmickey2005-04-021-1/+6
|
* re-commit marius commit:deraadt2005-03-311-2/+3
| | | | | | | | | | > fix preposterous time warnings in the nfs client; caused by false hits > in the attribute cache > based on original fix by pedro@, ok pedro@, tedu@; testing kettenis@ was backed out because too close to release put back in now, since tree is unlocked. unfortunately it appears that even after MANY MAILS ON THIS SUBJECT, NOONE HAS DONE THIS. WTF? Noone wants to FINISH jobs anymore?
* backout nfs_subs.c rev1.51 nfs_vfsops.c rev1.54:pvalchev2005-02-011-3/+2
| | | | | | | fix preposterous time warnings in the nfs client; caused by false hits in the attribute cache too close to release, save for immediately after unlock
* fix preposterous time warnings in the nfs client; caused by false hitsmarius2005-01-241-2/+3
| | | | | | in the attribute cache based on original fix by pedro@, ok pedro@, tedu@; testing kettenis@
* NFS commit coalescion: instead of sending a commit for each block, coalescemarius2004-08-031-1/+167
| | | | | | | | these into larger ranges wherever possible. this should speed up NFS writes quite a bit. ok art@ millert@ pedro@ tedu@
* When accessing device nodes over nfs, do not trim major and minor numbersmiod2004-08-031-3/+3
| | | | | | to 8 bits only; found the hard way by henning@. Ok deraadt@ marius@ millert@
* kqueue support for NFS, adapted from netbsd.marius2004-07-211-1/+5
| | | | ok art@ pedro@, "get it in" deraadt@
* kill netiso stuff here as well, millert okhenning2004-07-161-19/+1
|
* Change mode_t and nlink_t from 16bit to 32bit. This allows us tomillert2004-07-131-6/+6
| | | | | | | | | | use mode_t in syscalls.master and to use mode_t in more places in the kernel. It also makes lint much more useful on kernel code. I've also added a placeholder for st_birthtime to make a UFS2 import easier at some future date. Requested by and OK deraadt@
* First step towards more sane time handling in the kernel -- this changestholo2004-06-211-4/+4
| | | | | | | | things such that code that only need a second-resolution uptime or wall time, and used to get that from time.tv_secs or mono_time.tv_secs now get this from separate time_t globals time_second and time_uptime. ok art@ niklas@ nordin@
* use pool for namei pathbuf. testing ok millert@ tdeval@tedu2004-05-141-3/+4
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* First round of __P removal in sysmillert2002-03-141-4/+4
|
* theo doesn't like this codenate2002-02-101-2/+2
|
* use queue.h macro'sericj2002-01-161-67/+67
| | | | remove register
* Add a new sysctl that removes the requirement for reserved ports to benate2002-01-111-2/+2
| | | | used by the nfs server.
* UBC was a disaster. It worked very good when it worked, but on someart2001-12-191-244/+23
| | | | | | | | | machines or some configurations or in some phase of the moon (we actually don't know when or why) files disappeared. Since we've not been able to track down the problem in two weeks intense debugging and we need -current to be stable, back out everything to a state it had before UBC. We apologise for the inconvenience.
* Merge in struct uvm_vnode into struct vnode.art2001-12-101-4/+4
|
* Merge in the unified buffer cache code as found in NetBSD 2001/03/10. Theart2001-11-271-23/+244
| | | | | | | code is written mostly by Chuck Silvers <chuq@chuq.com>/<chs@netbsd.org>. Tested for the past few weeks by many developers, should be in a pretty stable state, but will require optimizations and additional cleanups.
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-4/+2
| | | | (Look ma, I might have broken the tree)
* Stop whining.art2001-08-191-23/+1
|
* add __sparc64__ to list of arch's not checked for bloated structures (alsojason2001-08-191-2/+2
| | | | correct alpha -> __alpha__)
* Remove old vm.art2001-06-271-9/+1
|
* Remove NQNFScsapuntz2001-06-251-51/+7
|
* Get rid of old directory caching scheme which caused persistent duplicates.csapuntz2001-06-251-83/+1
| | | | Still not correct for NFSv3 but that's hard.
* Convert nfs_timer to new timeouts.art2000-06-261-2/+6
|