summaryrefslogtreecommitdiffstats
path: root/sys/nfs
Commit message (Collapse)AuthorAgeFilesLines
* #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
|
* I believe that the following fix to nfs_vnops.c should do the trick w.r.t.dfr1995-07-131-10/+8
| | | | | | | | | | | | | | | the problem "when a file is truncated on the server after being written on a client under NFSv3, the client doesn't see the size drop to zero". (As you noted, the problem is that NMODIFIED wasn't being cleared by nfs_close when it flushed the buffers. After checking through the code, the only place where NMODIFIED was used to test for the possibility of dirty blocks was in nfs_setattr(). The two cases are safe to do when there aren't dirty blocks, so I just took out the tests. Unfortunately, testing for v_dirtyblkhd.lh_first being non-null is not sufficient, since there are times when the code moves blocks to the clean list and then back to the dirty list.) Submitted by: rick@snowhite.cis.uoguelph.ca
* NOTE: libkvm, w, ps, 'top', and any other utility which depends on structdg1995-07-133-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | proc or any VM system structure will have to be rebuilt!!! Much needed overhaul of the VM system. Included in this first round of changes: 1) Improved pager interfaces: init, alloc, dealloc, getpages, putpages, haspage, and sync operations are supported. The haspage interface now provides information about clusterability. All pager routines now take struct vm_object's instead of "pagers". 2) Improved data structures. In the previous paradigm, there is constant confusion caused by pagers being both a data structure ("allocate a pager") and a collection of routines. The idea of a pager structure has escentially been eliminated. Objects now have types, and this type is used to index the appropriate pager. In most cases, items in the pager structure were duplicated in the object data structure and thus were unnecessary. In the few cases that remained, a un_pager structure union was created in the object to contain these items. 3) Because of the cleanup of #1 & #2, a lot of unnecessary layering can now be removed. For instance, vm_object_enter(), vm_object_lookup(), vm_object_remove(), and the associated object hash list were some of the things that were removed. 4) simple_lock's removed. Discussion with several people reveals that the SMP locking primitives used in the VM system aren't likely the mechanism that we'll be adopting. Even if it were, the locking that was in the code was very inadequate and would have to be mostly re-done anyway. The locking in a uni-processor kernel was a no-op but went a long way toward making the code difficult to read and debug. 5) Places that attempted to kludge-up the fact that we don't have kernel thread support have been fixed to reflect the reality that we are really dealing with processes, not threads. The VM system didn't have complete thread support, so the comments and mis-named routines were just wrong. We now use tsleep and wakeup directly in the lock routines, for instance. 6) Where appropriate, the pagers have been improved, especially in the pager_alloc routines. Most of the pager_allocs have been rewritten and are now faster and easier to maintain. 7) The pagedaemon pageout clustering algorithm has been rewritten and now tries harder to output an even number of pages before and after the requested page. This is sort of the reverse of the ideal pagein algorithm and should provide better overall performance. 8) Unnecessary (incorrect) casts to caddr_t in calls to tsleep & wakeup have been removed. Some other unnecessary casts have also been removed. 9) Some almost useless debugging code removed. 10) Terminology of shadow objects vs. backing objects straightened out. The fact that the vm_object data structure escentially had this backwards really confused things. The use of "shadow" and "backing object" throughout the code is now internally consistent and correct in the Mach terminology. 11) Several minor bug fixes, including one in the vm daemon that caused 0 RSS objects to not get purged as intended. 12) A "default pager" has now been created which cleans up the transition of objects to the "swap" type. The previous checks throughout the code for swp->pg_data != NULL were really ugly. This change also provides the rudiments for future backing of "anonymous" memory by something other than the swap pager (via the vnode pager, for example), and it allows the decision about which of these pagers to use to be made dynamically (although will need some additional decision code to do this, of course). 13) (dyson) MAP_COPY has been deprecated and the corresponding "copy object" code has been removed. MAP_COPY was undocumented and non- standard. It was furthermore broken in several ways which caused its behavior to degrade to MAP_PRIVATE. Binaries that use MAP_COPY will continue to work correctly, but via the slightly different semantics of MAP_PRIVATE. 14) (dyson) Sharing maps have been removed. It's marginal usefulness in a threads design can be worked around in other ways. Both #12 and #13 were done to simplify the code and improve readability and maintain- ability. (As were most all of these changes) TODO: 1) Rewrite most of the vnode pager to use VOP_GETPAGES/PUTPAGES. Doing this will reduce the vnode pager to a mere fraction of its current size. 2) Rewrite vm_fault and the swap/vnode pagers to use the clustering information provided by the new haspage pager interface. This will substantially reduce the overhead by eliminating a large number of VOP_BMAP() calls. The VOP_BMAP() filesystem interface should be improved to provide both a "behind" and "ahead" indication of contiguousness. 3) Implement the extended features of pager_haspage in swap_pager_haspage(). It currently just says 0 pages ahead/behind. 4) Re-implement the swap device (swstrategy) in a more elegant way, perhaps via a much more general mechanism that could also be used for disk striping of regular filesystems. 5) Do something to improve the architecture of vm_object_collapse(). The fact that it makes calls into the swap pager and knows too much about how the swap pager operates really bothers me. It also doesn't allow for collapsing of non-swap pager objects ("unnamed" objects backed by other pagers).
* Moved call to VOP_GETATTR() out of vnode_pager_alloc() and into the placesdg1995-07-092-6/+20
| | | | | | that call vnode_pager_alloc() so that a failure return can be dealt with. This fixes a panic seen on NFS clients when a file being opened is deleted on the server before the open completes.
* Use a consistent blocksize for sizing bufs to avoid panicing the bio system.dfr1995-07-072-7/+23
|
* Use the correct cred for nfs_commit operations.dfr1995-06-281-2/+31
|
* 1) Converted v_vmdata to v_object.dg1995-06-283-59/+51
| | | | | | | 2) Removed unnecessary vm_object_lookup()/pager_cache(object, TRUE) pairs after vnode_pager_alloc() calls - the object is already guaranteed to be persistent. 3) Removed some gratuitous casts.
* Fixed VOP_LINK argument order botch.dg1995-06-282-4/+4
|
* Changes to support version 3 of the NFS protocol.dfr1995-06-2724-3021/+8402
| | | | | | | | | | | | | | | | | | The version 2 support has been tested (client+server) against FreeBSD-2.0, IRIX 5.3 and FreeBSD-current (using a loopback mount). The version 2 support is stable AFAIK. The version 3 support has been tested with a loopback mount and minimally against an IRIX 5.3 server. It needs more testing and may have problems. I have patched amd to support the new variable length filehandles although it will still only use version 2 of the protocol. Before booting a kernel with these changes, nfs clients will need to at least build and install /usr/sbin/mount_nfs. Servers will need to build and install /usr/sbin/mountd. NFS diskless support is untested. Obtained from: Rick Macklem <rick@snowhite.cis.uoguelph.ca>
* The duplicate information returned in fa_type and fa_modejoerg1995-06-142-4/+42
| | | | | | | | | | | | | | | | | | | | | | | is an ambiguity in the NFS version 2 protocol. VREG should be taken literally as a regular file. If a server intents to return some type information differently in the upper bits of the mode field (e.g. for sockets, or FIFOs), NFSv2 mandates fa_type to be VNON. Anyway, we leave the examination of the mode bits even in the VREG case to avoid breakage for bogus servers, but we make sure that there are actually type bits set in the upper part of fa_mode (and failing that, trust the va_type field). NFSv3 cleared the issue, and requires fa_mode to not contain any type information (while also introduing sockets and FIFOs for fa_type). The fix has been tested against a variety of NFS servers. It fixes problems with the ``Tropic'' NFS server for Windows, while apparently not breaking anything. Pointed-out by: scott@zorch.sf-bay.org (Scott Hazen Mueller)
OpenPOWER on IntegriCloud