summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add the rtable id as an argument to rn_walktree(). Functions likeclaudio2010-06-281-3/+3
| | | | | | | rt_if_remove_rtdelete() need to know the table id to be able to correctly remove nodes. Problem found by Andrea Parazzini and analyzed by Martin Pelikán. OK henning@
* Fix favail format string.mpf2010-05-061-2/+2
| | | | | From mickey. OK thib, otto.
* if anyone vref()s a VNON vnode, panic. This should not happen.oga2009-12-171-1/+3
| | | | | | | Written while trying to debug the nfs_inactive panics. Turns out it never got hit, but it's a useful check to have. ok beck@
* dd 'show all bufs' to show all the buffers in the systemjasper2009-08-171-2/+3
| | | | ok beck@ thib@
* add a show all vnodes command, use dlg's nice pool_walk() to accomplishthib2009-08-131-3/+3
| | | | | | this. ok beck@, dlg@
* Namecache revamp.beck2009-08-121-1/+3
| | | | | | | | | | | | | | | This eliminates the large single namecache hash table, and implements the name cache as a global lru of entires, and a redblack tree in each vnode. It makes cache_purge actually purge the namecache entries associated with a vnode when a vnode is recycled (very important for later on actually being able to resize the vnode pool) This commit does #if 0 out a bunch of procmap code that was already broken before this change, but needs to be redone completely. Tested by many, including in thib's nfs test setup. ok oga@,art@,thib@,miod@
* Dynamic buffer cache support - a re-commit of what was backed outbeck2009-08-021-1/+16
| | | | | | | | after c2k9 allows buffer cache to be extended and grow/shrink dynamically tested by many, ok oga@, "why not just commit it" deraadt@
* backout the buf_acquire() does the bremfree() since all callersthib2009-06-251-1/+4
| | | | | | | | | | where doing bremfree() befure calling buf_acquire(). This is causing us headache pinning down a bug that showed up when deraadt@ too cvs to current, and will have to be done anyway as a preperation for backouts. OK deraadt@
* Back out all the buffer cache changes I committed during c2k9. This reverts threebeck2009-06-151-16/+1
| | | | | | | | | | commits: 1) The sysctl allowing bufcachepercent to be changed at boot time. 2) The change moving the buffer cache hash chains to a red-black tree 3) The dynamic buffer cache (Which depended on the earlier too). ok on the backout from marco and todd
* All caller of buf_acquire were doing bremfree before the call.art2009-06-061-4/+1
| | | | | Just put it in the buf_acquire function. oga@ ok
* Change bufhash from the old grotty hash table to red-black trees hangingbeck2009-06-031-1/+16
| | | | | off the vnode. ok art@, oga@, miod@
* Fix typo in comment, okay jmc@.pedro2008-11-101-2/+2
|
* change vrele() to return an int. if it returns 0, it can gaurantee thatderaadt2008-11-011-4/+6
| | | | | | it did not sleep. this is used to avoid checkdirs() to avoid having to restart the allproc walk every time through idea from tedu, ok thib pedro
* re-introduce vdrop() to signal a lost intrest in a vnode;thib2008-07-051-23/+28
| | | | ok art@
* A bunch of pool_get() + bzero() -> pool_get(..., .. | PR_ZERO)mk2008-06-141-3/+2
| | | | | | | conversions that should shave a few bytes off the kernel. ok henning, krw, jsing, oga, miod, and thib (``even though i usually prefer FOO|BAR''; thanks for looking.
* back out stupid vnode change that was unintentionally includedbeck2008-06-131-2/+2
| | | | | with biomem and art has no idea how it got there. ok art@ thib@
* Bring biomem diff back into the tree after the nfs_bio.c fix went in.deraadt2008-06-121-6/+10
| | | | ok thib beck art
* back out biomem diff since it is not right yet. Doing very largederaadt2008-06-111-10/+6
| | | | | | | | file copies to nfsv2 causes the system to eventually peg the console. On the console ^T indicates that the load is increasing rapidly, ddb indicates many calls to getbuf, there is some very slow nfs traffic making none (or extremely slow) progress. Eventually some machines seize up entirely.
* Buffer cache revampbeck2008-06-101-6/+10
| | | | | | | | | | | | | | | | 1) remove multiple size queues, introduced as a stopgap. 2) decouple pages containing data from their mappings 3) only keep buffers mapped when they actually have to be mapped (right now, this is when buffers are B_BUSY) 4) New functions to make a buffer busy, and release the busy flag (buf_acquire and buf_release) 5) Move high/low water marks and statistics counters into a structure 6) Add a sysctl to retrieve buffer cache statistics Tested in several variants and beat upon by bob and art for a year. run accidentally on henning's nfs server for a few months... ok deraadt@, krw@, art@ - who promises to be around to deal with any fallout
* Update access(2) to have modern semantics with respect to X_OK andmillert2008-06-091-5/+10
| | | | | | the superuser. access(2) will now only indicate success for X_OK on non-directories if there is at least one execute bit set on the file. OK deraadt@ thib@ otto@
* remove the vfc_mountroot member from vfsconf andthib2008-05-071-2/+1
| | | | | | do appropriate cleanup; OK deraadt@
* Implement routing priorities. Every route inserted has a priority assignedclaudio2008-05-071-2/+2
| | | | | | | | | and the one route with the lowest number wins. This will be used by the routing daemons to resolve the synchronisations issue in case of conflicts. The nasty bits of this are in the multipath code. If no priority is specified the kernel will choose an appropriate priority. Looked at by a few people at n2k8 code is much older
* retire vfs_mountroot();thib2008-05-061-25/+1
| | | | | | | | | setroot() is now (and has been) responsible for setting the mountroot function pointer "to the right thing", or failing todo that, to ffs_mountroot; based on a discussion/diff from deraadt@. OK deraadt@
* Wrong printf construct.miod2008-03-231-2/+2
|
* Widen some struct statfs fields to support large filesystem stataotto2008-03-161-5/+33
| | | | | and add some to be able to support statvfs(2). Do the compat dance to provide backward compatibility. ok thib@ miod@
* replace calls to ltsleep with tsleepblambert2007-12-131-3/+3
| | | | | | remove PNORELOCK flag, as PNORELOCK is used for msleep ok art@ thib@
* er, the newline is wrong. dissapointing.deraadt2007-11-161-2/+2
|
* newline before syncing disks is way prettierderaadt2007-11-151-2/+2
|
* MALLOC/FREE -> malloc/freechl2007-10-291-4/+4
| | | | | | replace an hard coded value with M_WAITOK ok krw@
* Allow to pull out an usb stick with ffs filesystem while mountedbluhm2007-09-151-17/+1
| | | | | | | | | | | | | | | | and a file is written onto the stick. Without these fixes the machine panics or hangs. The usb fix calls the callback when the stick is pulled out to free the associated buffers. Otherwise we have busy buffers for ever and the automatic unmount will panic. The change in the scsi layer prevents passing down further dirty buffers to usb after the stick has been deactivated. In vfs the automatic unmount has moved from the function vgonel() to vop_generic_revoke(). Both are called when the sd device's vnode is removed. In vgonel() the VXLOCK is already held which can cause a deadlock. So call dounmount() earlier. ok krw@, I like this marco@, tested by ian@
* Use M_ZERO in a few more places to shave bytes from the kernel.art2007-09-071-5/+3
| | | | eyeballed and ok dlg@
* A few changes to deal with multi-user performance issues seen. thisbeck2007-08-071-7/+2
| | | | | | | | | | | | brings us back roughly to 4.1 level performance, although this is still far from optimal as we have seen in a number of cases. This change 1) puts a lower bound on buffer cache queues to prevent starvation 2) fixes the code which looks for a buffer to recycle 3) reduces the number of vnodes back to 4.1 levels to avoid complex performance issues better addressed after 4.2 ok art@ deraadt@, tested by many
* decouple the allocated number of vnodes from the "desiredvnodes" variablebeck2007-06-011-3/+11
| | | | | | | | | | | | which is used to size a zillion other things that increasing excessively has been shown to cause problems - so that we may incrementally look at increasing those other things without making the kernel unusable. This diff effectivly increases the number of vnodes back to the number of buffers, as in the earlier dynamic buffer cache commits, without increasing anything else (namecache, softdeps, etc. etc.) ok pedro@ tedu@ art@ thib@
* remove some silly casts, no real changetedu2007-05-311-6/+6
|
* NFSv2 cannot cope with a big number of vnodes, so revert to NPROC-basedpedro2007-05-311-4/+1
| | | | calculation until the problem is fixed, okay beck@ art@
* back out vfs change - todd fries has seen afs issues, and I'm suspiciousbeck2007-05-301-56/+37
| | | | this can cause other problems.
* Step one of some vnode improvements - change getnewvnode tobeck2007-05-291-37/+56
| | | | | | | | actually allocate "desiredvnodes" - add a vdrop to un-hold a vnode held with vhold, and change the name cache to make use of vhold/vdrop, while keeping track of which vnodes are referred to by which cache entries to correctly hold/drop vnodes when the cache uses them. ok thib@, tedu@, art@
* de-inline vref();thib2007-05-281-6/+4
| | | | ok pedro@
* Dynamic buffer cache. Initial diff from mickey@, okay art@ beck@ toby@pedro2007-05-261-4/+3
| | | | deraadt@ dlg@.
* Nuke a bunch of simpelocks and associated goo.thib2007-05-261-50/+1
| | | | ok art@
* Collapse struct v_selectinfo in struct vnode, remove thethib2007-05-171-3/+1
| | | | | | | simplelock and reuse the name for the selinfo member. Clean-up accordingly. ok tedu@,art@
* kinfo_vgetfailed has not been used for > 8 yearsderaadt2007-05-091-2/+1
|
* Move the declaration of VN_KNOTE() into vnode.h instead of havingthib2007-04-131-4/+1
| | | | | | multiple defines all over; ok tedu@
* Remove comments talking about vnode interlock. No binary change.bluhm2007-04-131-4/+2
| | | | ok thib
* Remove the simplelock argument from vrecycle();thib2007-04-111-4/+2
| | | | ok pedro@, sturm@
* Remove the v_interlock simplelock from the vnode structure.thib2007-03-211-61/+10
| | | | | | | | | Zap all calls to simple_lock/unlock() on it (those calls are #defined away though). Remove the LK_INTERLOCK from the calls to vn_lock() and cleanup the filesystems wich implement VOP_LOCK(). (by remvoing the v_interlock from there calls to lockmgr()). ok pedro@, art@, tedu@
* better desiredvnodes not based on maxusers; pedro@ deraadt@ okmickey2007-03-121-1/+4
|
* for vfsconf sysctl, do not leak kernel sensors out to userlandderaadt2007-02-201-4/+15
| | | | ok art thib
* fix ddb buf printing for daddr_t growth to 64bit;mickey2007-02-171-3/+3
| | | | from juan hernandez gonzalez; tested by bluhm@
* Consistently spell FALLTHROUGH to appease lint.jsg2007-02-141-2/+2
| | | | ok kettenis@ cloder@ tom@ henning@