summaryrefslogtreecommitdiffstats
path: root/sys/nfs/nfsnode.h
Commit message (Collapse)AuthorAgeFilesLines
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-3/+3
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Introduce NDFREE (and remove VOP_ABORTOP)eivind1999-12-151-1/+0
|
* Fix two problems: First, fix the append seek position race that candillon1999-12-141-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | occur due to np->n_size potentially changing if nfs_getcacheblk() blocks in nfs_write(). Second, under -current we must supply the proper bufsize when obtaining buffers that straddle the EOF, but due to the fact that np->n_size can change out from under us it is possible that we may specify the wrong buffer size and wind up truncating dirty data written by another process. Both problems are solved by implementing nfs_rslock(), which allows us to lock around sensitive buffer cache operations such as those that occur when appending to a file. It is believed that this race is responsible for causing dirtyoff/dirtyend and (in stable) validoff/validend to exceed the buffer size. Therefore we have now added a warning printf for the dirtyoff/end case in current. However, we have introduced a new problem which we need to fix at some point, and that is that soft or intr NFS mounts may become uninterruptable from the point of view of process A which is stuck waiting on rslock while process B is stuck doing the rpc. To unstick process A, process B would have to be interrupted first. Reviewed by: Alfred Perlstein <bright@wintelcom.net>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Reimplement the NFS ACCESS RPC cache as an "accelerator" rather than a truemsmith1998-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | 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.
* Implement NFS ACCESS RPC result caching.msmith1998-11-131-1/+4
| | | | | | | | | | | | | | | | | | 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.
* NFS_SMALLFH is defined in nfsproto.h, not sys/mount.hpeter1998-05-311-2/+2
| | | | Obtained from: NetBSD
* Trivial filesystem getpages/putpages implementations, set the second.msmith1998-03-061-1/+2
| | | | | These should be considered the first steps in a work-in-progress. Submitted by: Terry Lambert <terry@freebsd.org>
* Don't #include <nfs/nfs.h> in <nfs/nfs_node.h> if KERNEL is defined.bde1997-10-281-2/+2
| | | | Fixed everything that depended on the nested include.
* VFS mega cleanup commit (x/N)phk1997-10-161-7/+1
| | | | | | | | | | | | | | | | | | | | | | | 1. Add new file "sys/kern/vfs_default.c" where default actions for VOPs go. Implement proper defaults for ABORTOP, BWRITE, LEASE, POLL, REVOKE and STRATEGY. Various stuff spread over the entire tree belongs here. 2. Change VOP_BLKATOFF to a normal function in cd9660. 3. Kill VOP_BLKATOFF, VOP_TRUNCATE, VOP_VFREE, VOP_VALLOC. These are private interface functions between UFS and the underlying storage manager layer (FFS/LFS/MFS/EXT2FS). The functions now live in struct ufsmount instead. 4. Remove a kludge of VOP_ functions in all filesystems, that did nothing but obscure the simplicity and break the expandability. If a filesystem doesn't implement VOP_FOO, it shouldn't have an entry for it in its vnops table. The system will try to DTRT if it is not implemented. There are still some cruft left, but the bulk of it is done. 5. Fix another VCALL in vfs_cache.c (thanks Bruce!)
* When the default vnops funtion is vn_default_error(), there is no reason tophk1997-10-151-3/+1
| | | | | | implement small functions that just return EOPNOTSUPP for things we don't do. The removed functions only apply to UFS based filesystems anyway.
* Fix a few bugs with NFS and mmap caused by NFS' use of b_validoffdfr1997-05-191-1/+2
| | | | | | | | 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
* Fix various bugs in the locking protocol, allowing proper shared locksdfr1997-04-041-2/+2
| | | | to be used. This should fix the lock panics that people are seeing.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-02-101-19/+6
| | | | | | | | | | | | | | | 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-141-1/+1
| | | | | | | | 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-061-1/+3
| | | | | | | | | | | | | | | | | | 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.
* Staticize.phk1995-12-171-2/+1
|
* Introduced a type `vop_t' for vnode operation functions and usedbde1995-11-091-4/+4
| | | | | | | | | | | | | | | 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-061-3/+1
| | | | | | | | | | | | | | | | | | 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.
* Second batch of cleanup changes.phk1995-10-291-40/+1
| | | | | This time mostly making a lot of things static and some unused variables here and there.
* Eliminate sloppy common-style declarations. There should be none left forbde1995-07-291-2/+2
| | | | the LINT configuation.
* Changes to support version 3 of the NFS protocol.dfr1995-06-271-26/+90
| | | | | | | | | | | | | | | | | | 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>
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-1/+5
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* This is a bunch of changes from NetBSD. There are a couple of bug-fixes.phk1994-10-171-6/+4
| | | | | | | But mostly it is changes to use the list-maintenance macros instead of doing the pointer-gymnastics by hand. Obtained from: NetBSD
* Prototyping and general gcc-shutting up. Gcc has one warning now which looksphk1994-10-021-1/+8
| | | | bad, I will get to it eventually, unless somebody beats me to it.
* More loadable VFS changes:wollman1994-09-221-5/+1
| | | | | | | | - Make a number of filesystems work again when they are statically compiled (blush) - FIFOs are no longer optional; ``options FIFO'' removed from distributed config files.
* More idempotency....... this is fun :-)paul1994-08-211-1/+6
|
* Removed some padding bytes from the nfsnode struct to make the structuredg1994-08-091-2/+1
| | | | | size a power of 2 again. The system complains otherwise - probably because it wastes space with our malloc scheme otherwise.
* Made lockf advisory locking code generic (rather than ufs specific), anddg1994-08-081-1/+2
| | | | | | | use it in NFS. This is required both for diskless support and for POSIX compliance. Note: the support in NFS is only for the local node. Submitted by: based on work originally done by Yuval Yurom
* Added $Id$dg1994-08-021-0/+1
|
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+166
OpenPOWER on IntegriCloud