summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* minor spacing/styling nitspedro2004-12-091-12/+8
|
* Uninline vputonfreelist.art2004-08-041-5/+4
|
* better commentspedro2004-08-041-10/+9
|
* - check for LK_NOWAIT on vget()pedro2004-08-021-5/+12
| | | | | | - use ltsleep() instead of the unlock + sleep combo ok art@, inspiration from free/net
* make acct(2) optional with ACCOUNTINGtedu2004-05-271-3/+5
| | | | ok art@ deraadt@
* shutdown accounting before shutting down vfs. should prevent some panics.tedu2004-05-271-1/+5
| | | | ok david@ millert@ (iirc)
* radix tree with multipath support. from kame. deraadt okitojun2004-04-251-2/+2
| | | | | | | | | | | | | user visible changes: - you can add multiple routes with same key (route add A B then route add A C) - you have to specify gateway address if there are multiple entries on the table (route delete A B, instead of route delete A) kernel change: - radix_node_head has an extra entry - rnh_deladdr takes extra argument TODO: - actually take advantage of multipath (rtalloc -> rtalloc_mpath)
* back out vnode parents. weird breakge found in ports treetedu2004-01-091-5/+1
|
* keep track of a vnode's parent dir. ufs only, and unused atm, buttedu2004-01-061-1/+5
| | | | the fun stuff is coming. testing by brad.
* remove caddr_t casts. it's just silly to cast something when the functiontedu2003-07-211-16/+15
| | | | takes a void *. convert uiomove to take a void * as well. ok deraadt@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Back out previous change that causes "vnode table full" for large-scalenaddy2003-05-131-1/+3
| | | | file operations.
* do reclaim LAYER vnodes, no good reason not totedu2003-05-131-3/+1
|
* attempt to put a process's cwd back in place after a forced umount.tedu2003-05-061-2/+2
| | | | | | | won't always work, but it's the best we can do for now. this covers at least some of the failure cases the previous commit to vfs_lookup.c checks for. ok weingart@
* several related changes:tedu2003-05-011-9/+14
| | | | | | | | | | | | | | | | | | | | | vfs_subr.c: add a missing simple_lock_init for vnode interlock try to avoid reclaiming locked or layered vnodes initialize vnlock pointer to NULL remove old code to free vnlock, never used lockinit the new vnode lock vfs_syscalls.c: support for VLAYER flag vnode_if.sh: support for splitting VDESC flags vnode_if.src: split VDESC flags WILLPUT is the combination of WILLRELE and WILLUNLOCK most uses for WILLRELE become WILLPUT vnode.h: add v_lock to struct vnode add VLAYER flag update for new VDESC flags
* strcat/strcpy/sprintf cleanup. krw@, anil@ ok. art@ tested sparc64.ho2003-04-061-8/+8
|
* Add two missing vfs_busy calls in the failure path of sysctl_vnode.art2002-08-111-2/+5
| | | | | | | Found by aaron@ NOTE - I think we need a mount-point iterator just like we have NOTE - vfs_mount_foreach_vnode. (btw. why don't we use foreach_vnode in here?)
* Change the locking on the mountpoint slightly. Instead of using mnt_lockart2002-07-121-26/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to get shared locks for lookup and get the exclusive lock only with LK_DRAIN on unmount and do the real exclusive locking with flags in mnt_flags, we now use shared locks for lookup and an exclusive lock for unmount. This is accomplished by slightly changing the semantics of vfs_busy. Old vfs_busy behavior: - with LK_NOWAIT set in flags, a shared lock was obtained if the mountpoint wasn't being unmounted, otherwise we just returned an error. - with no flags, a shared lock was obtained if the mountpoint was being unmounted, otherwise we slept until the unmount was done and returned an error. LK_NOWAIT was used for sync(2) and some statistics code where it isn't really critical that we get the correct results. 0 was used in fchdir and lookup where it's critical that we get the right directory vnode for the filesystem root. After this change vfs_busy keeps the same behavior for no flags and LK_NOWAIT. But if some other flags are passed into it, they are passed directly into lockmgr (actually LK_SLEEPFAIL is always added to those flags because if we sleep for the lock, that means someone was holding the exclusive lock and the exclusive lock is only held when the filesystem is being unmounted. More changes: dounmount must now be called with the exclusive lock held. (before this the caller was supposed to hold the vfs_busy lock, but that wasn't always true). Zap some (now) unused mount flags. And the highlight of this change: Add some vfs_busy calls to match some vfs_unbusy calls, especially in sys_mount. (lockmgr doesn't detect the case where we release a lock noone holds (it will do that soon)). If you've seen hangs on reboot with mfs this should solve it (I repeat this for the fourth time now, but this time I spent two months fixing and redesigning this and reading the code so this time I must have gotten this right).
* When processing the KERN_VNODE sysctl, the kernel builds a packed structure,miod2002-06-161-8/+10
| | | | | | | | | | while pstat(8) expects a C structure abiding the regular structure packing rules. This caused pstat -v to break on powerpc. Unbreak the confusion by defining the structure in a common header file, and having the kernel use it. ok millert@ deraadt@
* Use ltsleep in vfs_busy.art2002-06-081-6/+2
|
* sprinkle some splassert(IPL_BIO) in some functions that are commented as "should be called at splbio()"art2002-05-161-1/+13
|
* First round of __P removal in sysmillert2002-03-141-13/+13
|
* Cleanup mountroot-related definitions.miod2002-02-041-2/+1
|
* Pool deals fairly well with physical memory shortage, but it doesn't dealart2002-01-231-2/+2
| | | | | | | | | | | | | | | | | | well (not at all) with shortages of the vm_map where the pages are mapped (usually kmem_map). Try to deal with it: - group all information the backend allocator for a pool in a separate struct. The pool will only have a pointer to that struct. - change the pool_init API to reflect that. - link all pools allocating from the same allocator on a linked list. - Since an allocator is responsible to wait for physical memory it will only fail (waitok) when it runs out of its backing vm_map, carefully drain pools using the same allocator so that va space is freed. (see comments in code for caveats and details). - change pool_reclaim to return if it actually succeeded to free some memory, use that information to make draining easier and more efficient. - get rid of PR_URGENT, noone uses it.
* UBC was a disaster. It worked very good when it worked, but on someart2001-12-191-104/+46
| | | | | | | | | machines or some configurations or in some phase of the moon (we actually don't know when or why) files disappeared. Since we've not been able to track down the problem in two weeks intense debugging and we need -current to be stable, back out everything to a state it had before UBC. We apologise for the inconvenience.
* No need to initialize the uobj on every getnewvnode. Just doart2001-12-101-13/+11
| | | | it when allocating. Add some improved diagnostics.
* Big cleanup inspired by NetBSD with some parts of the code from NetBSD.art2001-12-101-2/+1
| | | | | | | | - get rid of VOP_BALLOCN and VOP_SIZE - move the generic getpages and putpages into miscfs/genfs - create a genfs_node which must be added to the top of the private portion of each vnode for filsystems that want to use genfs_{get,put}pages - rename genfs_mmap to vop_generic_mmap
* Merge in struct uvm_vnode into struct vnode.art2001-12-101-14/+14
|
* Break out the part that lowers v_holdcnt in brelvp into an own functionart2001-12-051-26/+33
| | | | and make it and vhold into public interfaces.
* Ooops. Revert part of the last commit that was completly wrong and wasn't supposed to be committed.art2001-11-291-5/+5
|
* Correctly handle b_vp with bgetvp and brelvp in {get,put}pages.art2001-11-291-5/+5
| | | | Prevents panics caused by vnodes being recycled under our feet.
* Merge in the unified buffer cache code as found in NetBSD 2001/03/10. Theart2001-11-271-17/+71
| | | | | | | code is written mostly by Chuck Silvers <chuq@chuq.com>/<chs@netbsd.org>. Tested for the past few weeks by many developers, should be in a pretty stable state, but will require optimizations and additional cleanups.
* Added vfs_isbusy. Useful for verifying that a mount point is lockedcsapuntz2001-11-211-63/+103
| | | | | | | Added vfs_mount_foreach_vnode. Several places in the code seem to want to traverse the mount list and they all seem to handle locking differently. Centralize traversing the mount list in one place so that we only need to get the locking right once.
* Don't zero v_bioflag when recycling a vnode in getnewvnode.art2001-11-151-2/+1
| | | | | | Sometimes the vnode can be on the syncers list. While that is a bug, it's just a minor annoyance. A vnode on a syncer worklist without VBIOONSYNCLIST set is a disaster.
* Remove unnecessary check for NULL vnode in reassignbuf.art2001-11-121-6/+2
|
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-4/+2
| | | | (Look ma, I might have broken the tree)
* Bounds check index into routing table. Thanks to Ken Ashcraft of Stanfordcsapuntz2001-10-021-1/+5
| | | | for finding this bug.
* Get rid of B_VFLUSH. Not relevant after the end of the AGE queue.csapuntz2001-09-191-3/+5
|
* Add some missing lengths checks when passing data from userland tomillert2001-09-161-1/+3
| | | | kernel. From based on NetBSD patches.
* (vput): make panic strings actually say vput instead of vreleassar2001-08-021-5/+5
|
* Typo.miod2001-07-261-2/+2
|
* remove old vmart2001-06-271-16/+1
|
* KNFderaadt2001-06-221-64/+58
|
* send note_revoke to knotes when vnode goes away, okay art@provos2001-06-051-1/+7
|
* indentation nit.art2001-05-161-2/+1
|
* cleanup, remove incorrect commentart2001-04-291-9/+3
|
* Use pool for allocating vnodes.art2001-03-221-3/+7
| | | | | Even though vnodes are never freed (could be) this gives us big memory and kmem_map savings.
* uvm_vnp_terminate expect the vnode to be locked.art2001-03-211-7/+7
| | | | Why didn't LOCKDEBUG catch this?
* Oops. fix thinko in last.art2001-03-161-2/+2
|
* Use CIRCLEQ macros for mountlist.art2001-03-161-9/+11
|