summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_node.c
AgeCommit message (Collapse)Author
2020-05-01Resolve delayed truncation from nfs_inactive() too.hannken
Should prevent "locking against self" from nfs_unlock().
2020-02-24v_interlock -> vmobjlockad
2019-10-18 s/initalize/initialize/ in comment or printf message.msaitoh
2018-05-28add a genfs method to allow a file system to limit the range of pageschs
that are given to a single GOP_WRITE() call. needed by ZFS.
2017-05-26Eliminate crusty debugging sludge.riastradh
We have a mostly sane vnode lifecycle now. If this needs debugging, it should be done once at the call site of VOP_RECLAIM.
2017-05-26Make VOP_RECLAIM do the last unlock of the vnode.riastradh
VOP_RECLAIM naturally has exclusive access to the vnode, so having it locked on entry is not strictly necessary -- but it means if there are any final operations that must be done on the vnode, such as ffs_update, requiring exclusive access to it, we can now kassert that the vnode is locked in those operations. We can't just have the caller release the last lock because some file systems don't use genfs_lock, and require the vnode to remain valid for VOP_UNLOCK to work, notably unionfs.
2017-04-11Make VOP_INACTIVE preserve vnode lock on return.riastradh
Discussed on tech-kern: https://mail-index.netbsd.org/tech-kern/2017/04/01/msg021751.html Ride 7.99.68, a bumpy bus of incremental vfs improvements!
2016-08-20Remove now obsolete operation vcache_remove().hannken
Welcome to 7.99.36
2014-05-30Change NFS from rbtree to vcache.hannken
2014-02-27The current implementation of vn_lock() is racy. Modification ofhannken
the vnode operations vector for active vnodes is unsafe because it is not known whether deadfs or the original file system will be called. - Pass down LK_RETRY to the lock operation (hint for deadfs only). - Change deadfs lock operation to return ENOENT if LK_RETRY is unset. - Change all other lock operations to check for dead vnode once the vnode is locked and unlock and return ENOENT in this case. With these changes in place vnode lock operations will never succeed after vclean() has marked the vnode as VI_XLOCK and before vclean() has changed the operations vector. Adresses PR kern/37706 (Forced unmount of file systems is unsafe) Discussed on tech-kern. Welcome to 6.99.33
2011-06-12Welcome to 5.99.53! Merge rmind-uvmplock branch:rmind
- Reorganize locking in UVM and provide extra serialisation for pmap(9). New lock order: [vmpage-owner-lock] -> pmap-lock. - Simplify locking in some pmap(9) modules by removing P->V locking. - Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs). - Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner. Add TLBSTATS option for x86 to collect statistics about TLB shootdowns. - Unify /dev/mem et al in MI code and provide required locking (removes kernel-lock on some ports). Also, avoid cache-aliasing issues. Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches formed the core changes of this branch.
2011-05-19Remove cache_purge(9) calls from reclamation routines in the file systems,rmind
as vclean(9) performs it for us since Lite2 merge.
2010-09-24Fixes/improvements to RB-tree implementation:rmind
1. Fix inverted node order, so that negative value from comparison operator would represent lower (left) node, and positive - higher (right) node. 2. Add an argument (i.e. "context"), passed to comparison operators. 3. Change rb_tree_insert_node() to return a node - either inserted one or already existing one. 4. Amend the interface to manipulate the actual object, instead of the rb_node (in a similar way as Patricia-tree interface does). 5. Update all RB-tree users accordingly. XXX: Perhaps rename rb.h to rbtree.h, since cleaning-up.. 1-3 address the PR/43488 by Jeremy Huddleston. Passes RB-tree regression tests. Reviewed by: matt@, christos@
2010-07-21Make holding v_interlock mandatory for callers of vget().hannken
Announced some time ago on tech-kern.
2010-07-01Remove vlockmgr(). Generic vnode lock operations now use a rwlock locatedhannken
in the vnode. All LK_* flags move from sys/lock.h to sys/vnode.h. Calls to vlockmgr() in file systems get replaced with VOP_LOCK() or VOP_UNLOCK(). Welcome to 5.99.34. Discussed on tech-kern.
2010-06-24Clean up vnode lock operations pass 2:hannken
VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument. Welcome to 5.99.32. Discussed on tech-kern.
2009-03-15ansify function definitionscegger
2009-03-14Change about 4500 of the K&R function definitions to ANSI ones.dsl
There are still about 1600 left, but they have ',' or /* ... */ in the actual variable definitions - which my awk script doesn't handle. There are also many that need () -> (void). (The script does handle misordered arguments.)
2009-01-02- Don't vput() a vnode that we do not hold locked.ad
- Eliminate one of the few remaining uses of LK_CANRECURSE.
2008-11-19Make the emulations, exec formats, coredump, NFS, and the NFS serverad
into modules. By and large this commit: - shuffles header files and ifdefs - splits code out where necessary to be modular - adds module glue for each of the components - adds/replaces hooks for things that can be installed at runtime
2008-10-22Don't need nfs_vfs_reinit anymore since we don't resize tables anymore.matt
Move reinit code to init case.
2008-10-22Change NFS to use a RB-tree for its FH->nfsnode lookups.matt
2008-09-30Initialize nfsnode pools and malloc type dynamically in thepooka
constructor instead of depending on link sets. Consequently, rename nfs_nh{init,reinit,done} to nfs_node_{init,reinit,done}, respectively, to better convey the function.
2008-05-24Make sure that we flush the NFS directory cache in case of an NFS mounttron
using the translate cookie option during unmount. This fixes PR kern/38100. Patch suggested by Michael van Elst during Hackathon 11.
2008-05-05- Convert hashinit() to use kmem_alloc(). The hash tables can be largead
and it's better to not have them in kmem_map. - Convert a couple of minor items along the way to kmem_alloc(). - Fix some memory leaks.
2008-01-30Replace struct lock on vnodes with a simpler lock object built onad
krwlock_t. This is a step towards removing lockmgr and simplifying vnode locking. Discussed on tech-kern.
2008-01-26- Make nfsnode hash MPSAFE.ad
- Replace use of lockmgr().
2008-01-17Correct test of v_usecount.ad
2008-01-02use kmem_alloc instead of malloc.yamt
2008-01-02Merge vmlocking2 to head.ad
2007-11-26Remove the "struct lwp *" argument from all VFS and VOP interfaces.pooka
The general trend is to remove it from all kernel interfaces and this is a start. In case the calling lwp is desired, curlwp should be used. quick consensus on tech-kern
2007-08-06nfs_inactive: turn a panic into a printf for now, as it isn't critical.yamt
PR/36572 from Martin Husemann.
2007-06-12nfs_inactive: don't clear NTRUNCDELAYED erroneously.yamt
(fix cache consistency problems like NUL bytes near EOF.)
2007-03-12Pass an ipl argument to pool_init/POOL_INIT to be used when initializingad
the pool's lock.
2007-02-21Replace the Mach-derived boolean_t type with the C99 bool type. Athorpej
future commit will replace use of TRUE and FALSE with true and false.
2007-02-20Call genfs_node_destroy() where appropriate.ad
2007-02-15use mutex and rwlock rather than lockmgr.yamt
2006-12-28remove several nqnfs definitions.yamt
2006-12-27remove nqnfs.yamt
2006-11-09remove some __unused in function parameters.yamt
2006-10-12- sprinkle __unused on function decls.christos
- fix a couple of unused bugs - no more -Wno-unused for i386
2006-07-23Use the LWP cached credentials where sane.ad
2006-05-14integrate kauth.elad
2006-03-30some cleanups after the introduction of GOP_SIZE_MEM flag.yamt
- remove GOP_SIZE_READ/GOP_SIZE_WRITE flags. they have not been used since the change. - ufs_balloc_range: remove code which has been no-op since the change. thanks Konrad Schroder for explaining the original intention of the code. - ffs_gop_size: don't extend past eof, in the case of GOP_SIZE_MEM. otherwise genfs_getpages end up to allocate pages past eof unnecessarily.
2006-01-02nfs_inactive:yamt
- use LK_CANRECURSE instead of LK_RECURSEFAIL. PR/32435 from Valeriy E. Ushakov. - panic explicitly if the parent directory has been revoked. add an XXX comment.
2005-12-11merge ktrace-lwp.christos
2005-06-28- constify genfs_ops.yamt
- use member designators.
2005-02-26nuke trailing whitespaceperry
2005-01-27keep directory eof cache when inactivating vnodeyamt
because there's no reason to throw it away. (fix an unintended side effect of nfs_subs.c rev.1.144.)
2004-04-25Initialise (most) pools from a link set instead of explicit callssimonb
to pool_init. Untouched pools are ones that either in arch-specific code, or aren't initialiased during initial system startup. Convert struct session, ucred and lockf to pools.