summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver
Commit message (Collapse)AuthorAgeFilesLines
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.phk1997-10-125-9/+31
| | | | | | | | Distribute all but the most fundamental malloc types. This time I also remembered the trick to making things static: Put "static" in front of them. A couple of finer points by: bde
* Distribute and statizice a lot of the malloc M_* types.phk1997-10-111-1/+3
| | | | Substantial input from: bde
* Change the M_NAMEI allocations to use the zone allocator. This changedyson1997-09-212-32/+33
| | | | | | | | plus the previous changes to use the zone allocator decrease the useage of malloc by half. The Zone allocator will be upgradeable to be able to use per CPU-pools, and has more intelligent usage of SPLs. Additionally, it has reasonable stats gathering capabilities, while making most calls inline.
* Remove a couple of stubborn NetBSD #if's.phk1997-09-101-5/+1
|
* unifdef -U__NetBSD__ -D__FreeBSD__phk1997-09-104-38/+4
|
* Added used #include - don't depend on <sys/mbuf.h> includingbde1997-09-022-2/+4
| | | | <sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags).
* Fix all areas of the system (or at least all those in LINT) to avoid storingwollman1997-08-167-197/+255
| | | | | | | | socket addresses in mbufs. (Socket buffers are the one exception.) A number of kernel APIs needed to get fixed in order to make this happen. Also, fix three protocol families which kept PCBs in mbufs to not malloc them instead. Delete some old compatibility cruft while we're at it, and add some new routines in the in_cksum family.
* Removed unused #includes.bde1997-08-021-7/+1
|
* Correct some dumb mistakes in the WebNFS stuff.dfr1997-07-221-8/+16
| | | | Submitted by: bde
* Allow NULL cookie verifiers for non-NULL offsets. This is needed fordfr1997-07-221-3/+3
| | | | Digital Unix boxes since they appear to always send null verifiers.
* Merge WebNFS changes from NetBSD.dfr1997-07-166-80/+340
| | | | Obtained from: NetBSD
* Clear nfs_iodwant[myiod] when the nfsiod process exits due to a signal.tegge1997-06-251-1/+2
|
* Don't require superuser privileges for creating fifos. The v2 case wasbde1997-06-141-3/+4
| | | | | | | | | broken when support for v3 was introduced in rev.1.16. The v3 case has always been broken in FreeBSD. Should be in 2.2. PR: 3838
* Various fixes from NetBSD:dfr1997-06-034-10/+11
| | | | | | | | | Use u_int for rpc procedure numbers. Some fixes to NQNFS. A rare NULL pointer dereference. Ignore NFSMNT_NOCONN for TCP mounts. Obtained from: NetBSD
* Implement the async mount option for NFSv3. This makes NFS pretend that alldfr1997-06-031-2/+5
| | | | | | | | | writes sent to the server were synchronous and therefore no commits are needed. This is the same as the vfs.nfs.async variable on the server but allows each client to choose whether to work this way. Also make the vfs.nfs.async variable do the 'right' thing for NFSv3, i.e. pretend that the write was synchronous.
* Fix a few bugs with NFS and mmap caused by NFS' use of b_validoffdfr1997-05-192-4/+4
| | | | | | | | and b_validend. The changes to vfs_bio.c are a bit ugly but hopefully can be tidied up later by a slight redesign. PR: kern/2573, kern/2754, kern/3046 (possibly) Reviewed by: dyson
* Don't keep addresses in mbuf chains. This should simplify the next rounddfr1997-05-134-41/+61
| | | | | | of network changes from Garret. Reviewed by: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
* Implement a separate control for write gathering on NFSv3. This is turneddfr1997-05-102-4/+14
| | | | | | | off for NFSv3 by default since write gathering seems to reduce performance for NFSv3 by up to 60%. Add sysctl knobs to control both variables.
* Fix a nasty hang connected with write gathering. Also add debug printdfr1997-05-104-4/+59
| | | | statements to bits of the server which helped me find the hang.
* Allow NULL rpcs on non-privileged ports at all times to work around brokendfr1997-04-301-2/+3
| | | | | | | clients. PR: kern/3298 Submitted by: Tor Egge <Tor.Egge@idi.ntnu.no>
* The long-awaited mega-massive-network-code- cleanup. Part I.wollman1997-04-272-25/+35
| | | | | | | | | | | | | | | | | | | | | | | | This commit includes the following changes: 1) Old-style (pr_usrreq()) protocols are no longer supported, the compatibility glue for them is deleted, and the kernel will panic on boot if any are compiled in. 2) Certain protocol entry points are modified to take a process structure, so they they can easily tell whether or not it is possible to sleep, and also to access credentials. 3) SS_PRIV is no more, and with it goes the SO_PRIVSTATE setsockopt() call. Protocols should use the process pointer they are now passed. 4) The PF_LOCAL and PF_ROUTE families have been updated to use the new style, as has the `raw' skeleton family. 5) PF_LOCAL sockets now obey the process's umask when creating a socket in the filesystem. As a result, LINT is now broken. I'm hoping that some enterprising hacker with a bit more time will either make the broken bits work (should be easy for netipx) or dike them out.
* Fix broken usage of nm_readdirsize and increase the socket buffers for UDPdfr1997-04-221-3/+3
| | | | | | | | | to prevent possible socket overflows. 2.2 candidate. PR: kern/3304 Reviewed by: Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
* Fix various bugs in the locking protocol, allowing proper shared locksdfr1997-04-041-9/+1
| | | | to be used. This should fix the lock panics that people are seeing.
* Removed #include of <ufs/ufs/dir.h>. Nfs no longer depends on any ufsbde1997-03-291-2/+1
| | | | | features, and the one thing that it depended on (DIRBLKSIZ) now has conflicting spelling.
* Define our own version of DIRBLKSIZ instead of (ab)using ufs's value.bde1997-03-292-86/+10
| | | | | | | | | | | | | | | | | | | Use the same value of 512 (ufs actually uses DEV_BSIZE). There are too many versions of DIRBLKSIZ, one for ufs, one for ext2fs, one for nfs, one for ibcs2, one for linux, one for applications, ... I think nfs's DIRBLKSIZ needs to be a divisor of the directory blocks sizes of all supported file systems. There is also NFS_DIRBLKSIZ, which is different from nfs's DIRBLKSIZ but is sometimes confused with it in comments. Removed a bogus #ifdef KERNEL that hid the tunable constants for nfs. This came in undocumented with the Lite2 merge although it isn't in Lite2. It required more-bogus #define KERNEL's in fstat and pstat to make the constants visible. Restored a spelling fix from rev.1.17. Removed duplicate #defines of all the the NFS mount option flags.
* Add code that will reject nfs requests in teh kernel from nonprivilegedguido1997-03-273-3/+28
| | | | | | ports. This option will be automatically set/cleraed when mount is run without/with the -n option. Reviewed by: Doug Rabson
* Use the correct (relative to the implementation) ordering of args inpeter1997-03-251-1/+5
| | | | | | the VOP_LINK() calls, Closes PR#3064 Submitted by: bde
* The local fs interface does not allow link()/unlink() of directories,peter1997-03-251-4/+7
| | | | do not allow a remote nfs client to cause local fs corruption either.
* Fixed some invalid (non-atomic) accesses to `time', mostly ones of thebde1997-03-222-6/+6
| | | | | | form `tv = time'. Use a new function gettime(). The current version just forces atomicicity without fixing precision or efficiency bugs. Simplified some related valid accesses by using the central function.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-2210-10/+10
| | | | ready for it yet.
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-02-109-137/+276
| | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-1410-10/+10
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Improve the queuing algorithms used by NFS' asynchronous i/o. Thedfr1996-11-064-48/+48
| | | | | | | | | | | | | | | | | | existing mechanism uses a global queue for some buffers and the vp->b_dirtyblkhd queue for others. This turns sequential writes into randomly ordered writes to the server, affecting both read and write performance. The existing mechanism also copes badly with hung servers, tending to block accesses to other servers when all the iods are waiting for a hung server. The new mechanism uses a queue for each mount point. All asynchronous i/o goes through this queue which preserves the ordering of requests. A simple mechanism ensures that the iods are shared out fairly between active mount points. This removes the sysctl variable vfs.nfs.dwrite since the new queueing mechanism removes the old delayed write code completely. This should go into the 2.2 branch.
* This fixes a problem with the nfs socket handling code which happensdfr1996-10-111-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | if a single process is performing a large number of requests (in this case writing a large file). The writing process could monopolise the recieve lock and prevent any other processes from recieving their replies. It also adds a new sysctl variable 'vfs.nfs.dwrite' which controls the behaviour which originally pointed out the problem. When a process writes to a file over NFS, it usually arranges for another process (the 'iod') to perform the request. If no iods are available, then it turns the write into a 'delayed write' which is later picked up by the next iod to do a write request for that file. This can cause that particular iod to do a disproportionate number of requests from a single process which can harm performance on some NFS servers. The alternative is to perform the write synchronously in the context of the original writing process if no iod is avaiable for asynchronous writing. The 'delayed write' behaviour is selected when vfs.nfs.dwrite=1 and the non-delayed behaviour is selected when vfs.nfs.dwrite=0. The default is vfs.nfs.dwrite=1; if many people tell me that performance is better if vfs.nfs.dwrite=0 then I will change the default. Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
* In sys/time.h, struct timespec is defined as:nate1996-09-193-14/+14
| | | | | | | | | | | | | | /* * Structure defined by POSIX.4 to be like a timeval. */ struct timespec { time_t ts_sec; /* seconds */ long ts_nsec; /* and nanoseconds */ }; The correct names of the fields are tv_sec and tv_nsec. Reminded by: James Drobina <jdrobina@infinet.com>
* Release an unneeded reference to a vnode that was gained in a VFS_VGET().dg1996-09-051-1/+2
| | | | | | Fixes a readdirplus panic. Submitted by: Doug Rabson <dfr@render.com>
* Eliminated nested include of <sys/unistd.h> in <sys/file.h> in the kernel.bde1996-09-031-2/+2
| | | | | | | Include it directly in the few places where it is used. Reduced some #includes of <sys/file.h> to #includes of <sys/fcntl.h> or nothing.
* Even though this looks like it, this is not a complex code change.dyson1996-08-214-210/+143
| | | | | | | | | | | | | | | | | The interface into the "VMIO" system has changed to be more consistant and robust. Essentially, it is now no longer necessary to call vn_open to get merged VM/Buffer cache operation, and exceptional conditions such as merged operation of VBLK devices is simpler and more correct. This code corrects a potentially large set of problems including the problems with ktrace output and loaded systems, file create/deletes, etc. Most of the changes to NFS are cosmetic and name changes, eliminating a layer of subroutine calls. The direct calls to vput/vrele have been re-instituted for better cross platform compatibility. Reviewed by: davidg
* Various fixes from frank@fwi.uva.nl (Frank van der Linden) viadfr1996-07-161-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rick@snowhite.cis.uoguelph.ca: 1. Clear B_NEEDCOMMIT in nfs_write to make sure that dirty data is correctly send to the server. If a buffer was dirtied when it was in the B_DELWRI+B_NEEDCOMMIT state, the state of the buffer was left unchanged and when the buffer was later cleaned, just a commit rpc was made to the server to complete the previous write. Clearing B_NEEDCOMMIT ensures that another write is made to the server. 2. If a server returned a server (for whatever reason) returned an answer to a write RPC that implied that fewer bytes than requested were written, bad things would happen. 3. The setattr operation passed on the atime in stead of the mtime to the server. The fix is trivial. 4. XIDs always started at 0, but this caused some servers (older DEC OSF/1 3.0 so I've been told) who had very long-lasting XID caches to get confused if, after a reboot of a BSD client, RPCs came in with a XID that had in the past been used before from that client. Patch is to use the current time in seconds as a starting point for XIDs. The patch below is not perfect, because it requires the root fs to be mounted first. This is because of the check BSD systems do, comparing FS time to system time. Reviewed by: Bruce Evans, Terry Lambert. Obtained from: frank@fwi.uva.nl (Frank van der Linden) via rick@snowhite.cis.uoguelph.ca
* Modify the kernel to use the new pr_usrreqs interface rather than the oldwollman1996-07-111-5/+6
| | | | | | | | | | | | | | pr_usrreq mechanism which was poorly designed and error-prone. This commit renames pr_usrreq to pr_ousrreq so that old code which depended on it would break in an obvious manner. This commit also implements the new interface for TCP, although the old function is left as an example (#ifdef'ed out). This commit ALSO fixes a longstanding bug in the TCP timer processing (introduced by davidg on 1995/04/12) which caused timer processing on a TCB to always stop after a single timer had expired (because it misinterpreted the return value from tcp_usrreq() to indicate that the TCB had been deleted). Finally, some code related to polling has been deleted from if.c because it is not relevant t -current and doesn't look at all like my current code.
* Don't truncate minor or major numbers in the nfsv3 client.bde1996-06-231-3/+3
|
* Fix for NFS_NOSERVERphk1996-06-142-9/+12
| | | | | | | | | | | | | | | | | | | | Poul mentioned that he thought this was some kind of timing problem, and that started me thinking. After a little poking around, I found that nfs_timer() was completely disabled when NFS_NOSERVER was #defined. But after looking at nfs_timer(), it seemed like it was something required by both the client and server code, and disabling it outright just didn't seem to make any sense. Parts of it relate only to the NFS server side code, so I disabled those, but I re-enabled the rest of the function and made sure that it would be called from nfs_init() (in nfs_subs.c). With nfs_timer() re-enabled, everything seems to work again. The only other changes I made were to #ifdef away some variable declarations in the NFS_NOSERVER case so that gcc would stop complaining about unused variables. Reviewed by: phk Submitted by: Bill Paul <wpaul@skynet.ctr.columbia.edu>
* Fixed a vnode reference leak in nfsrv_rename(). The target inode wasn'tbde1996-06-081-1/+2
| | | | | | | released until the file system was unmounted. This bug also affected kern/vfs_syscalls.c but was fixed in rev.1.18 and rev.1.20 there. Reviewed by: davidg
* #include <sys/filedesc.h> explicitly instead of depending on it beingbde1996-04-301-1/+2
| | | | bogusly included by <sys/socketvar.h>.
* Fixed nfs sysctls. They missed out on the fs -> vfs name changes frombde1996-04-301-2/+2
| | | | Lite2. This broke nfsstat.
* Kill XNS.wollman1996-02-131-2/+4
| | | | | While we're at it, fix socreate() to take a process argument. (This was supposed to get committed days ago...)
* Fix a bunch of spelling errors in the comment fields ofmpp1996-01-302-6/+6
| | | | a bunch of system include files.
* Eliminated many redundant vm_map_lookup operations for vm_mmap.dyson1996-01-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Speed up for vfs_bio -- addition of a routine bqrelse to greatly diminish overhead for merged cache. Efficiency improvement for vfs_cluster. It used to do alot of redundant calls to cluster_rbuild. Correct the ordering for vrele of .text and release of credentials. Use the selective tlb update for 486/586/P6. Numerous fixes to the size of objects allocated for files. Additionally, fixes in the various pagers. Fixes for proper positioning of vnode_pager_setsize in msdosfs and ext2fs. Fixes in the swap pager for exhausted resources. The pageout code will not as readily thrash. Change the page queue flags (PG_ACTIVE, PG_INACTIVE, PG_FREE, PG_CACHE) into page queue indices (PQ_ACTIVE, PQ_INACTIVE, PQ_FREE, PQ_CACHE), thereby improving efficiency of several routines. Eliminate even more unnecessary vm_page_protect operations. Significantly speed up process forks. Make vm_object_page_clean more efficient, thereby eliminating the pause that happens every 30seconds. Make sequential clustered writes B_ASYNC instead of B_DELWRI even in the case of filesystems mounted async. Fix a panic with busy pages when write clustering is done for non-VMIO buffers.
* Add an option NFS_NOSERVER which saves 100K in the install kernel (orphk1996-01-135-17/+66
| | | | any other kernel that uses it). Use with option NFS.
* Staticize.phk1995-12-177-55/+60
|
OpenPOWER on IntegriCloud