summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
Commit message (Collapse)AuthorAgeFilesLines
* Suser() simplification:phk1999-04-271-3/+3
| | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
* Fixed printf format errors on alpha.dt1999-04-241-3/+3
|
* Close a potential mbuf and/or mbuf cluster leak in the client-side NFSpeter1999-04-101-2/+2
| | | | statfs() code. Free the whole chain, not just the first one.
* Hold nfsd's upages in-core with PHOLD rather than P_NOSWAP.peter1999-04-061-2/+2
|
* Catch a case spotted by Tor where files mmapped could leave garbage in thejulian1999-04-051-10/+46
| | | | | | | | | | | | unallocated parts of the last page when the file ended on a frag but not a page boundary. Delimitted by tags PRE_MATT_MMAP_EOF and POST_MATT_MMAP_EOF, in files alpha/alpha/pmap.c i386/i386/pmap.c nfs/nfs_bio.c vm/pmap.h vm/vm_page.c vm/vm_page.h vm/vnode_pager.c miscfs/specfs/spec_vnops.c ufs/ufs/ufs_readwrite.c kern/vfs_bio.c Submitted by: Matt Dillon <dillon@freebsd.org> Reviewed by: Alan Cox <alc@freebsd.org>
* Reviewed by: Many at differnt times in differnt parts,julian1999-03-122-51/+87
| | | | | | | | | | | | | | | | | | | | | | including alan, john, me, luoqi, and kirk Submitted by: Matt Dillon <dillon@frebsd.org> This change implements a relatively sophisticated fix to getnewbuf(). There were two problems with getnewbuf(). First, the writerecursion can lead to a system stack overflow when you have NFS and/or VN devices in the system. Second, the free/dirty buffer accounting was completely broken. Not only did the nfs routines blow it trying to manually account for the buffer state, but the accounting that was done did not work well with the purpose of their existance: figuring out when getnewbuf() needs to sleep. The meat of the change is to kern/vfs_bio.c. The remaining diffs are all minor except for NFS, which includes both the fixes for bp interaction AND fixes for a 'biodone(): buffer already done' lockup. Sys/buf.h also contains a chaining structure which is not used by this patchset but is used by other patches that are coming soon. This patch deliniated by tags PRE_MAT_GETBUF and POST_MAT_GETBUF. (sorry for the missing T matt)
* Untangle the nfs send and receive queue locking a little. One lockpeter1999-02-255-64/+90
| | | | | | routine was [ab]used for two different things, and you couldn't tell from the wait channel which one had wedged. Catch a few things missing from NFS_NOSERVER.
* Move the declaration of the vfs.nfs sysctl node outside an ifdef so thatdfr1999-02-181-3/+3
| | | | | | it builds if NFS_NOSERVER is defined. Spotted by: Bruce Evans <bde@zeta.org.au>
* Fixed bitrot in NFS_ACDEBUG option.bde1999-02-171-1/+2
|
* * Change sysctl from using linker_set to construct its tree using SLISTs.dfr1999-02-163-4/+7
| | | | | | | | | | This makes it possible to change the sysctl tree at runtime. * Change KLD to find and register any sysctl nodes contained in the loaded file and to unregister them when the file is unloaded. Reviewed by: Archie Cobbs <archie@whistle.com>, Peter Wemm <peter@netplex.com.au> (well they looked at it anyway)
* General additional cleanup of VOP API for NFS ops - mainly NFS ignoringdillon1999-02-131-4/+13
| | | | | | | | the API for freeing up cnp's. This cleanup should not effect nominal operation one way or the other since NFS VOPs just happen to be called with flags that match what it actually does to the NAMEI components it gets. Still, if an NFS error occured, there was probably some memory leakage of NAMEI components with certain NFS VOP ops.
* PR: kern/9970dillon1999-02-131-2/+1
| | | | Remove incorrect vput() in nfs_link()
* Flush delayed-write data out prior to issuing a rename rpc. This appearsdillon1999-02-061-1/+14
| | | | | | to fix the problem w/ NFSV3 whereby a make installworld would get into high-network-bandwidth situations continuously trying to retry nfs writes that fail with a 'stale file handle' error.
* Fix warnings related to -Wall -Wcast-qualdillon1999-01-281-3/+3
|
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-281-8/+8
| | | | kernel compile
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-272-6/+6
| | | | | | | kernel compile. This commit includes significant work to proper handle const arguments for the DDB symbol routines.
* Fix nasty bug in nfs_access(). A conditional was if (a = b) instead ofdillon1999-01-271-2/+2
| | | | if (a == b).
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-6/+6
| | | | kernel compile
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-272-5/+5
| | | | kernel compile
* This is a rather large commit that encompasses the new swapper,dillon1999-01-213-13/+35
| | | | | | | | | | changes to the VM system to support the new swapper, VM bug fixes, several VM optimizations, and some additional revamping of the VM code. The specific bug fixes will be documented with additional forced commits. This commit is somewhat rough in regards to code cleanup issues. Reviewed by: "John S. Dyson" <root@dyson.iquest.net>, "David Greenman" <dg@root.com>
* Remove two cases of unused variable sp3.eivind1999-01-121-3/+1
|
* Remove the 'waslocked' parameter to vfs_object_create().eivind1999-01-051-2/+2
|
* Silence -Wtrigraph.hoek1998-12-301-4/+4
| | | | Submitted by: Bradley Dunn <bradley@dunn.org> (pr: kern/8817)
* Fix for creating files on a Solaris 7 server with NFSv3 (the request wasdfr1998-12-252-90/+77
| | | | | | slightly garbled but older servers seemed to understand it). Reviewed by: David O'Brien <obrien@nuxi.ucdavis.edu>
* Added 3 new errno values, requred by various standards: EOVERFLOW,dt1998-12-141-2/+3
| | | | | | | ECANCELED, EILSEQ. Fixed ibcs2 and especially linux EIDRM and ENOMSG errno mapping. Reviewed by: Dan Nelson <dnelson@emsphone.com>
* (Hopefully) fix support for "large" files. Mostly cast block numbers to off_tdt1998-12-141-13/+13
| | | | before they multiplied to block sizes.
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-075-14/+6
| | | | and local variables, goto labels, and functions declared but not defined.
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-042-6/+7
| | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
* Make bootp error message slightly more verbosedillon1998-12-031-2/+2
|
* Reimplement the NFS ACCESS RPC cache as an "accelerator" rather than a truemsmith1998-11-152-44/+14
| | | | | | | | | | | | | | | | | | | | cache. If the cached result lets us say "yes", then go with that. If we're not sure, or we think the answer might be "no", go to the wire to be certain. This avoids all of the possible false veto cases, and allows us to key the cached value with just the UID for which the cached value holds, reducing the bloat of the nfsnode structure from 104 bytes to just 12 bytes. Since the "yes" case is by far the most common, this should still provide a substantial performance improvement. Also default the cache to on, with a conservative timeout (2 seconds). This improves performance if NFS is loaded as a KLD module, as there's not (yet) code to parse an option out of the module arguments to set it, and sysctl doesn't work (yet) for OIDs in modules. The 'accelerator' mode was suggested by Bjoern Groenvall (bg@sics.se) Feedback on this would be appreciated as testing has been necessarily limited by Comdex, and it would be valuable to have this in 2.2.8.
* Avoid a null pointer reference if the target of an NFS rename has beenmsmith1998-11-131-7/+10
| | | | | | sillrenamed, or if the source vnode doesn't have an associated nfsnode. Bug report from Andrew Gallatin <gallatin@cs.duke.edu>
* Fix a panic in nfsrv_dorec() where a NULL pointer could be passed todfr1998-11-131-2/+4
| | | | | | free() sometimes. Reviewed by: Eric Haug <ejh@eas.slu.edu>
* Implement NFS ACCESS RPC result caching.msmith1998-11-132-24/+98
| | | | | | | | | | | | | | | | | | This yields startling performance increases for NFS clients for many access profiles, due to the fact that ACCESS results are persistently cached in the namecache in many cases. Note that the code is somewhat conservative in that it requires an exact credential match for a cache hit. This bloats the nfsnode structure by sizeof(struct ucred) (96 bytes). Any less conservative approach opens the possibility for a false veto in eg. setuid applications. Alternative suggestions would be welcomed. The cache is normally disabled, to activate set the sysctl variable vfs.nfs.access_cache_timeout to a nonzero value. This is the time in seconds that a cached entry will be considered valid; useful values appear to be 2-10 seconds. Performance of the cache can be monitored with the vfs.nfs.access_cache_hits and vfs.nfs.access_cache_hits variables.
* Remove [apparently] bogus casts to u_long for the vnode_pager_setsize()peter1998-11-093-9/+9
| | | | | | | second argument. np_size is a 64 bit int, so is the second arg. This might have caused needless 2G/4G file size problems. I believe it was Bruce who queried this.
* Use TAILQ macros for clean/dirty block list processing. Set b_xflagspeter1998-10-313-13/+13
| | | | rather than abusing the list next pointer with a magic number.
* In nfs_link(), check for a cross-device mount *before* lookingmckusick1998-09-291-2/+3
| | | | | in the v_data field. Obtained from: Charles Hannum, via Frank van der Linden <frank@wins.uva.nl>
* Missing vput when cross-device link error is detected in nfs_link.mckusick1998-09-291-0/+1
|
* During truncation, have to notify the VM about the new sizemckusick1998-09-291-3/+5
| | | | | of the NFS file *before* doing the nfs_vinvalbuf operation. Otherwise some invalid data may show up in an mmap.
* Frank sez: 'It fixes a problem with servers that return 0 valuesmckusick1998-09-291-7/+10
| | | | | | | | for some of the fsinfo RPC fields. It is strictly speaking not wrong to do this, as the spec says that "it is expected that a server will make a best effort at supporting all the attributes", but pretty unusual. You guessed it, it's NT servers that do it.' Obtained from: Frank van der Linden <frank@wins.uva.nl>
* Do not need (or want) to take a reference on an NFS file thatmckusick1998-09-291-6/+12
| | | | | | | | | is being deleted due to an forcible unmount. The problem is that vgone calls vclean() which then calls calls nfs_inactive() with VXLOCK set on the vnode. Nfs_inactive() was calling vget() to get a reference on the vnode, which in turn hung on VXLOCK. Nfs_inactive() now checks v_usecount to make sure that the vnode is not coming from vclean() before it does a vget().
* The code checks each fragment mark to see if it's valid; if the fragmentmckusick1998-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | | is less than NFS_MINPACKET or greater than NFS_MAXPACKET in size, it barfs and, I think, drops the connection. However, there's no guarantee that in a multi-fragment RPC, all the fragments will be at least as large as NFS_MINPACKET. In fact, with the version of "tclnfs" we have here, which supports NFS over TCP, at least when built under SunOS 4.1.3 (i.e., with 4.1.3's user-mode ONC RPC library), I can *repeatably* cause "tclnfs" to send a request with more than one fragment, one of which is only 8 bytes long. I just do a 3877-byte write to a file, at an offset of 0. The check that "slp->ns_reclen" is greater than or equal to NFS_MINPACKET serves no useful purpose - if the NFS server code can't handle packets < NFS_MINPACKET bytes, it can't handle them over *any* protocol, so the check has to be done above the RPC-over-TCP layer - and should be removed. Obtained from: Fix from Guy Harris, forwarded by Rick Macklem.
* Mark directory buffers that have no valid data with B_INVALmckusick1998-09-291-1/+6
| | | | so that they are not put in the cache.
* When adding data to a buffer, we need to clear the B_NEEDCOMMIT flagmckusick1998-09-291-1/+2
| | | | which says that the data is on server but not committed.
* Removed statically configured mount type numbers (MOUNT_*) and allbde1998-09-071-4/+4
| | | | | | | | | references to them. The change a couple of days ago to ignore these numbers in statically configured vfsconf structs was slightly premature because the cd9660, cfs, devfs, ext2fs, nfs vfs's still used MOUNT_* instead of the number in their vfsconf struct.
* Made unloading of the nfs LKM sort of work. This is mainly to testbde1998-09-076-10/+53
| | | | | | detachment of vfs sysctls. Unloading of vfs LKMs doesn't actually work for any vfs, since it leaves garbage pointers to memory allocation control structures.
* Ignore the statically configured vfs type numbers and assign vfsbde1998-09-051-2/+4
| | | | | | | | | | | type numbers in vfs attach order (modulo incomplete reuse of old numbers after vfs LKMs are unloaded). This requires reinitializing the sysctl tree (or at least the vfs subtree) for vfs's that support sysctls (currently only nfs). sysctl_order() already handled reinitialization reasonably except it checked for annulled self references in the wrong place. Fixed sysctls for vfs LKMs.
* Instantiate `nfs_mount_type' in a standard file so that it is presentbde1998-09-051-2/+1
| | | | | | | | when nfs is an LKM. Declare it in a header file. Don't forget to use it in non-Lite2 code. Initialize it to -1 instead of to 0, since 0 will soon be the mount type number for the first vfs loaded. NetBSD uses strcmp() to avoid this ugly global.
* Cosmetic changes to the PAGE_XXX macros to make them consistent withdfr1998-09-041-2/+2
| | | | the other objects in vm.
* Check for NULL pointer before freeing a struct sockaddr. m_freem() can handleluoqi1998-09-011-2/+3
| | | | NULL, buf free() can't.
* Yow! Completely change the way socket options are handled, eliminatingwollman1998-08-237-75/+85
| | | | | | another specialized mbuf type in the process. Also clean up some of the cruft surrounding IPFW, multicast routing, RSVP, and other ill-explored corners.
OpenPOWER on IntegriCloud