summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Manipulating buffers after sleeping is dangerous. Instead of attemptingbeck2013-06-241-15/+4
| | | | | | to cheat and VOP_BWRITE a buffer, restart the vinvalbuf if we have to wait for a busy buffer to complete ok tedu@ guenther@
* Add an f_mntfromspec member to struct statfs, which specifies the name ofjsing2013-04-151-4/+6
| | | | | | | | | | | | | the special provided when the mount was requested. This may be the same as the special that was actually used for the mount (e.g. in the case of a device node) or it may be different (e.g. in the case of a DUID). Whilst here, change f_ctime to a 64 bit type and remove the pointless f_spare members. Compatibility goo courtesy of guenther@ ok krw@ millert@
* Comment out recently added __attribute__((__format__(__kprintf__))) annotationsmiod2013-02-171-4/+4
| | | | | | in MI code; gcc 2.95 does not accept such annotation for function pointer declarations, only function prototypes. To be uncommented once gcc 2.95 bites the dust.
* Add explicit __attribute__ ((__format__(__kprintf__)))) to the functions andmiod2013-02-091-5/+8
| | | | | | function pointer arguments which are {used as,} wrappers around the kernel printf function. No functional change.
* Don't map a buffer (and potentially sleep) when invalidating it in vinvalbuf.beck2012-11-171-2/+3
| | | | | | | | | | This fixes a problem where we could sleep for kva and then our pointers would not be valid on the next pass through the loop. We do this by adding buf_acquire_nomap() - which can be used to busy up the buffer without changing its mapped or unmapped state. We do not need to have the buffer mapped to invalidate it, so it is sufficient to acquire it for that. In the case where we write the buffer, we do map the buffer, and potentially sleep.
* Make groupmember() check the effective gid too, so that the checks areguenther2012-10-011-2/+2
| | | | | | consistent when the effective gid isn't also a supplementary group. ok beck@
* vhold() and vdrop() are prototyped in vnode.h, so don't repeat them hereguenther2012-09-191-3/+1
| | | | ok beck@
* oops, need sys/acct.h tooderaadt2012-07-161-1/+2
|
* Put acct_shutdown() proto in a better placederaadt2012-07-161-3/+1
|
* move the specfs code to a place people can see it; ok guenther thib krwderaadt2011-07-041-3/+2
|
* rename VFSDEBUG to VFLCKDEBUG;thib2011-07-021-3/+3
| | | | prompted by tedu@
* Bring back the "End the VOP experiment." diff, naddy's issues wherethib2010-12-211-6/+5
| | | | | | unrelated, and his alpha is much happier now. OK deraadt@
* - drop NENTS(), which was yet another copy of nitems().jasper2010-12-061-4/+3
| | | | | | | no binary change ok deraadt@
* Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)thib2010-09-101-5/+6
| | | | have been resolved.
* End the VOP experiment. Instead of the ridicolusly complicated operationthib2010-09-061-6/+5
| | | | | | | | | | | | | | | | | | | vector setup that has questionable features (that have, as far as I can tell never been used in practice, atleast not in OpenBSD), remove all the gunk and favor a simple struct full of function pointers that get set directly by each of the filesystems. Removes gobs of ugly code and makes things simpler by a magnitude. The only downside of this is that we loose the vnoperate feature so the spec/fifo operations of the filesystems need to be kept in sync with specfs and fifofs, this is no big deal as the API it self is pretty static. Many thanks to armani@ who pulled an earlier version of this diff to current after c2k10 and Gabriel Kihlman on tech@ for testing. Liked by many. "come on, find your balls" deraadt@.
* Nuke extra (typoed) extern declaration and a spare newline from the lastoga2010-08-121-3/+1
| | | | | | commit. "fix it -- free commit" beck@
* Make the number of vnodes to correspond to the number of buffers inbeck2010-08-111-5/+14
| | | | | | | | | buffer cache - we grow them dynamically, but do not attempt to shrink them if the buffer cache shrinks after growing. Tested by very many for a long time. ok oga@ todd@ phessler@ tedu@
* makefstype was only used in ported from freebsd filesystems. fix themtedu2010-06-291-18/+1
| | | | and remove the function. ok thib
* 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