summaryrefslogtreecommitdiffstats
path: root/sys/nfs
Commit message (Collapse)AuthorAgeFilesLines
* Even though this looks like it, this is not a complex code change.dyson1996-08-215-258/+150
| | | | | | | | | | | | | | | | | 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-164-25/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-232-6/+6
|
* Fix for NFS_NOSERVERphk1996-06-143-12/+15
| | | | | | | | | | | | | | | | | | | | 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>
* Moved the fsnode MALLOC to before the call to getnewvnode() so that thedg1996-06-121-2/+9
| | | | | | | | process won't possibly block before filling in the fsnode pointer (v_data) which might be dereferenced during a sync since the vnode is put on the mnt_vnodelist by getnewvnode. Pointed out by Matt Day <mday@artisoft.com>
* 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
* Clear flags before using an inactive buffer. This is a kludge, butpst1996-06-081-1/+2
| | | | | | matches the code in bread(). Reviewed by: bde
* removed:phk1996-05-021-2/+2
| | | | | | | | | CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei() ptei() kvtopte() ptetov() ispt() ptetoav() &c &c new: NPDEPG Major macro cleanup.
* #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-302-5/+5
| | | | Lite2. This broke nfsstat.
* Kill XNS.wollman1996-02-132-4/+6
| | | | | 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-301-3/+3
| | | | a bunch of system include files.
* Fixed spelling of s_namlen so that this compiles again.bde1996-01-251-2/+2
|
* Use new printf features rather than local kludges.phk1996-01-241-8/+2
|
* Add a check to prevent a computation from underflowing and causingmpp1996-01-241-3/+4
| | | | | | | | | | | | | a panic due to an attaempt to allocate a buffer for a terabyte or so of data when an attempt is made to create sparse data (e.g. a holey file) more than 1 block past the end of the file. Note: some other areas of this code need to be looked at, since they might cause problems when the file size exceeds 2GB, due to storing results in ints when the computations are being done with quad sized variables. Reviewed by: bde
* Eliminated many redundant vm_map_lookup operations for vm_mmap.dyson1996-01-192-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 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-137-19/+97
| | | | any other kernel that uses it). Use with option NFS.
* Don't print swap server as root server.phk1995-12-281-2/+2
| | | | Submitted by: Mattias.Gronlund@sa.erisoft.se (Mattias Gronlund)
* Move fs.nfs.nfsstats sysctl var back to it's old OID.phk1995-12-221-2/+2
|
* Staticize.phk1995-12-1713-183/+124
|
* Untangled the vm.h include file spaghetti.dg1995-12-076-6/+21
|
* Completed function declarations and/or added prototypes and/or movedbde1995-12-035-86/+71
| | | | prototypes to the right place.
* Completed function declarations, added prototypes and removed redundantbde1995-11-214-48/+129
| | | | declarations.
* Completed function declarations and/or added prototypes.bde1995-11-213-4/+12
|
* Get rid of hostnamelen variable.phk1995-11-141-2/+1
|
* Included <sys/sysproto.h> to get central declarations for syscall argsbde1995-11-141-1/+6
| | | | | | | | | | structs and prototypes for syscalls. Ifdefed duplicated decentralized declarations of args structs. It's convenient to have this visible but they are hard to maintain. Some are already different from the central declarations. 4.4lite2 puts them in comments in the function headers but I wanted to avoid the large changes for that.
* Introduced a type `vop_t' for vnode operation functions and usedbde1995-11-092-143/+143
| | | | | | | | | | | | | | | it 1138 times (:-() in casts and a few more times in declarations. This change is null for the i386. The type has to be `typedef int vop_t(void *)' and not `typedef int vop_t()' because `gcc -Wstrict-prototypes' warns about the latter. Since vnode op functions are called with args of different (struct pointer) types, neither of these function types is any use for type checking of the arg, so it would be preferable not to use the complete function type, especially since using the complete type requires adding 1138 casts to avoid compiler warnings and another 40+ casts to reverse the function pointer conversions before calling the functions.
* Replaced bogus macros for dummy devswitch entries by functions.bde1995-11-062-4/+27
| | | | | | | | | | | | | | | | | | These functions went away: enosys (hasn't been used for some time) enxio enodev enoioctl (was used only once, actually for a vop) if_tun.c: Continued cleaning up... conf.h: Probably fixed the type of d_reset_t. It is hard to tell the correct type because there are no non-dummy device reset functions. Removed last vestige of ambiguous sleep message strings.
* Include a prerequisite header (so this is consistent again with thejoerg1995-10-311-1/+3
| | | | NFSv2 state).
* Second batch of cleanup changes.phk1995-10-2911-177/+125
| | | | | This time mostly making a lot of things static and some unused variables here and there.
* Fix order problem: unbusy pages before releasing the buffer.dg1995-10-221-2/+2
| | | | Submitted by: John Dyson <dyson>
* Moved the filesystem read-only check out of the syscalls and into thedg1995-10-221-4/+45
| | | | | | | | filesystem layer, as was done in lite-2. Merged in some other cosmetic changes while I was at it. Rewrote most of msdosfs_access() to be more like ufs_access() and to include the FS read-only check. Obtained from: partially from 4.4BSD-lite2
* Added VOP_GETPAGES/VOP_PUTPAGES and also the "backwards" block countdyson1995-09-041-1/+4
| | | | for VOP_BMAP. Updated affected filesystems...
* Make nfs diskless work again.dfr1995-08-301-1/+3
| | | | Reviewed by: John Hay <jhay@mikom.csir.co.za>
* Added NFS_ASYNC kernel option. It only has an effect for NFSv2.dg1995-08-241-1/+11
|
* Killed redundant declarations of nfsm_rpchead().dg1995-08-242-4/+2
|
* Some fixes found using gcc -Wall:dfr1995-08-244-10/+22
| | | | | | | | | | nfsm_rpchead() has been called with the wrong number of args and misplaced args since someone added new args in the middle for nfsv3. Here's another one that would be important on 64-bit systems. VOP_READDIR takes a `u_int **cookies' arg. Submitted by: Bruce Evans <bde@zeta.org.au>
* Add support for amd direct maps.dfr1995-08-244-8/+14
| | | | Reviewed by: Thomas Graichen <graichen@sirius.physik.fu-berlin.de>
* Converted mountlist to a CIRCLEQ.dg1995-08-112-10/+2
| | | | Partially obtained from: 4.4BSD-Lite2
* Fixed bug where vnode_pager_uncache() wasn't always called when it shoulddg1995-08-061-3/+2
| | | | | | | be. The result was that the file's space wouldn't be properly freed when it was deleted. Submitted by: John Dyson
* Slight changes to locking around VOP_READRIR.dfr1995-08-031-2/+18
| | | | | Detect in nfsrv_readdirplus when a filesystem soes not support VFS_VGET and return NFSERR_NOTSUPP so that the client will use ordinary readdir instead.
* Lock the directory vnode before VOP_READDIR in nfsrv_readdirplusdfr1995-08-021-1/+3
|
* Removed my special-case hack for VOP_LINK and fixed the problem with thedg1995-08-012-5/+5
| | | | | | | wrong vp's ops vector being used by changing the VOP_LINK's argument order. The special-case hack doesn't go far enough and breaks the generic bypass routine used in some non-leaf filesystems. Pointed out by Kirk McKusick.
* Eliminate sloppy common-style declarations. There should be none left forbde1995-07-295-14/+34
| | | | the LINT configuation.
* Slightly better fix than previous revision.dfr1995-07-241-4/+3
| | | | Submitted by: Rick Macklem <rick@snowhite.cis.uoguelph.ca>
* Fix a problem which appeared to truncate a file to the nearest block boundarydfr1995-07-241-2/+3
| | | | | | | | | when it is moved to an NFS filesystem from from another filesystem and /bin/mv failed to set the file ownership during the move. I believe that this bug is present in STABLE but I have not tested it. The fix would be the same in STABLE even though the code has changed quite considerably in CURRENT.
* Correct my cut-'n-paste job from ffs_vfsops.c and fix up the formattingdg1995-07-221-14/+6
| | | | | | to be similar. Submitted by: Bruce Evans
* Implemented an nfs_node hash list lock, similar to what was implementeddg1995-07-211-1/+31
| | | | | in ffs_vget(), and for the same reason: to prevent a race condition that results in duplicate vnodes/NFSnodes being allocated.
* vnode_pager_alloc() never returns NULL, so don't check for it.dg1995-07-202-6/+4
|
OpenPOWER on IntegriCloud