summaryrefslogtreecommitdiffstats
path: root/sys/fs/pseudofs/pseudofs_vncache.c
Commit message (Collapse)AuthorAgeFilesLines
* - Don't cache_purge() in *_reclaim routines. vclean() does it for us sojeff2003-10-051-2/+0
| | | | this is redundant.
* Replace the at_fork, at_exec, and at_exit functions with the slightly morejhb2003-03-241-5/+7
| | | | | | | | | flexible process_fork, process_exec, and process_exit eventhandlers. This reduces code duplication and also means that I don't have to go duplicate the eventhandler locking three more times for each of at_fork, at_exec, and at_exit. Reviewed by: phk, jake, almost complete silence on arch@
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Do not allow a cached vnode to be shared among multiple mounts of the sametjr2003-01-281-1/+2
| | | | | | | | | kind of pseudofs-based filesystem. Fixes (at least) one problem where when procfs is mounted mupltiple times, trying to unmount one will often cause the wrong one to get unmounted, and other problem where mounting one procfs on top of another caused the kernel to lock up. Reviewed by: des
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Plug an infrequent (I think) memory leak.phk2002-10-151-1/+3
| | | | Spotted by: FlexeLint
* Regularize the vop_stdlock'ing protocol across all the filesystemsmckusick2002-10-141-2/+1
| | | | | | | | | | | | | | | | | | | | that use it. Specifically, vop_stdlock uses the lock pointed to by vp->v_vnlock. By default, getnewvnode sets up vp->v_vnlock to reference vp->v_lock. Filesystems that wish to use the default do not need to allocate a lock at the front of their node structure (as some still did) or do a lockinit. They can simply start using vn_lock/VOP_UNLOCK. Filesystems that wish to manage their own locks, but still use the vop_stdlock functions (such as nullfs) can simply replace vp->v_vnlock with a pointer to the lock that they wish to have used for the vnode. Such filesystems are responsible for setting the vp->v_vnlock back to the default in their vop_reclaim routine (e.g., vp->v_vnlock = &vp->v_lock). In theory, this set of changes cleans up the existing filesystem lock interface and should have no function change to the existing locking scheme. Sponsored by: DARPA & NAI Labs.
* Remove all use of vnode->v_tag, replacing with appropriate substitutes.njl2002-09-141-1/+7
| | | | | | | | | | | | v_tag is now const char * and should only be used for debugging. Additionally: 1. All users of VT_NTS now check vfsconf->vf_type VFCF_NETWORK 2. The user of VT_PROCFS now checks for the new flag VV_PROCDEP, which is propagated by pseudofs to all child vnodes if the fs sets PFS_PROCDEP. Suggested by: phk Reviewed by: bde, rwatson (earlier version)
* - Replace v_flag with v_iflag and v_vflagjeff2002-08-041-1/+1
| | | | | | | | | | | | | | | - v_vflag is protected by the vnode lock and is used when synchronization with VOP calls is needed. - v_iflag is protected by interlock and is used for dealing with vnode management issues. These flags include X/O LOCK, FREE, DOOMED, etc. - All accesses to v_iflag and v_vflag have either been locked or marked with mp_fixme's. - Many ASSERT_VOP_LOCKED calls have been added where the locking was not clear. - Many functions in vfs_subr.c were restructured to provide for stronger locking. Idea stolen from: BSD/OS
* Lock down pseudofs:jeff2002-07-081-0/+5
| | | | | | | - Initialize lock structure in vncache_alloc - Return locked vnodes from vncache_alloc - Setup vnode op vectors to use default lock, unlock, and islocked - Implement simple locking scheme required for lookup
* Gratuitous whitespace cleanup.des2002-06-061-3/+3
|
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-1/+2
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Staticise pfs_vncache, it's not used anywhere else.msmith2002-01-081-1/+1
| | | | Reviewed by: des
* Do not derefer null.tanimura2002-01-041-0/+4
| | | | Reviewed by: des
* Pseudofs was leaking VFS cache entries badly due to its cache and use ofdillon2001-12-191-3/+9
| | | | | | the wrong VOP descriptor. This misuse caused VFS-cached vnodes to be re-cached, resulting in the leak. This commit is an interim fix until DES has a chance to rework the code involved.
* Reduce the number of #include dependencies by declaring some of the structsdes2001-11-031-2/+0
| | | | used in pseudofs.h as opaque structs.
* Add a PFS_DISABLED flag; pfs_visible() automatically returns 0 if it is setdes2001-10-021-0/+38
| | | | | on the node in question. Also add two API functions for setting and clearing this flag; setting it also reclaims all vnodes associated with the node.
* YA pseudofs megacommit, part 1:des2001-10-011-28/+68
| | | | | | | | | | | | | | | | - Add a third callback to the pfs_node structure. This one simply returns non-zero if the specified requesting process is allowed to access the specified node for the specified target process. This is used in addition to the usual permission checks, e.g. when certain files don't make sense for certain (system) processes. - Make sure that pfs_lookup() and pfs_readdir() don't yap about files which aren't pfs_visible(). Also check pfs_visible() before performing reads and writes, to prevent the kind of races reported in SA-00:77 and SA-01:55 (fork a child, open /proc/child/ctl, have that child fork a setuid binary, and assume control of it). - Add some more trace points.
* KSE Milestone 2julian2001-09-121-1/+1
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* For some reason, though the module builds just fine without <sys/lock.h>,des2001-06-111-0/+1
| | | | LINT fails to build without it.
* Add support for process-dependent directories. This means that save fordes2001-06-101-24/+33
| | | | the lack of a man page, pseudofs is mostly complete now.
* Add missing #include of <sys/mutex.h>.des2001-06-101-0/+1
|
* Let pseudofs into the warmth of the FreeBSD CVS repo.des2001-04-071-0/+168
It's not finished yet (I still have to find a way to implement process- dependent nodes without consuming too much memory, and the permission system needs tightening up), but it's becoming hard to work on without a repo (I've accidentally almost nuked it once already), and it works (except for the lack of process-dependent nodes, that is). I was supposed to commit this a week ago, but timed out waiting for jkh to reply to some questions I had. Pass him a spoonful of bad karma :)
OpenPOWER on IntegriCloud