summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_subr.c
AgeCommit message (Collapse)Author
2008-07-05re-introduce vdrop() to signal a lost intrest in a vnode;Thordur I. Bjornsson
ok art@
2008-06-14A bunch of pool_get() + bzero() -> pool_get(..., .. | PR_ZERO)Michael Knudsen
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.
2008-06-13back out stupid vnode change that was unintentionally includedBob Beck
with biomem and art has no idea how it got there. ok art@ thib@
2008-06-12Bring biomem diff back into the tree after the nfs_bio.c fix went in.Theo de Raadt
ok thib beck art
2008-06-11back out biomem diff since it is not right yet. Doing very largeTheo de Raadt
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.
2008-06-10Buffer cache revampBob Beck
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
2008-06-09Update access(2) to have modern semantics with respect to X_OK andTodd C. Miller
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@
2008-05-07remove the vfc_mountroot member from vfsconf andThordur I. Bjornsson
do appropriate cleanup; OK deraadt@
2008-05-07Implement routing priorities. Every route inserted has a priority assignedClaudio Jeker
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
2008-05-06retire vfs_mountroot();Thordur I. Bjornsson
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@
2008-03-23Wrong printf construct.Miod Vallat
2008-03-16Widen some struct statfs fields to support large filesystem stataOtto Moerbeek
and add some to be able to support statvfs(2). Do the compat dance to provide backward compatibility. ok thib@ miod@
2007-12-13replace calls to ltsleep with tsleepBret Lambert
remove PNORELOCK flag, as PNORELOCK is used for msleep ok art@ thib@
2007-11-16er, the newline is wrong. dissapointing.Theo de Raadt
2007-11-15newline before syncing disks is way prettierTheo de Raadt
2007-10-29MALLOC/FREE -> malloc/freeCharles Longeau
replace an hard coded value with M_WAITOK ok krw@
2007-09-15Allow to pull out an usb stick with ffs filesystem while mountedAlexander Bluhm
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@
2007-09-07Use M_ZERO in a few more places to shave bytes from the kernel.Artur Grabowski
eyeballed and ok dlg@
2007-08-07 A few changes to deal with multi-user performance issues seen. thisBob Beck
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
2007-06-01decouple the allocated number of vnodes from the "desiredvnodes" variableBob Beck
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@
2007-05-31remove some silly casts, no real changeTed Unangst
2007-05-31NFSv2 cannot cope with a big number of vnodes, so revert to NPROC-basedPedro Martelletto
calculation until the problem is fixed, okay beck@ art@
2007-05-30back out vfs change - todd fries has seen afs issues, and I'm suspiciousBob Beck
this can cause other problems.
2007-05-29 Step one of some vnode improvements - change getnewvnode toBob Beck
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@
2007-05-28de-inline vref();Thordur I. Bjornsson
ok pedro@
2007-05-26Dynamic buffer cache. Initial diff from mickey@, okay art@ beck@ toby@Pedro Martelletto
deraadt@ dlg@.
2007-05-26Nuke a bunch of simpelocks and associated goo.Thordur I. Bjornsson
ok art@
2007-05-17Collapse struct v_selectinfo in struct vnode, remove theThordur I. Bjornsson
simplelock and reuse the name for the selinfo member. Clean-up accordingly. ok tedu@,art@
2007-05-09kinfo_vgetfailed has not been used for > 8 yearsTheo de Raadt
2007-04-13Move the declaration of VN_KNOTE() into vnode.h instead of havingThordur I. Bjornsson
multiple defines all over; ok tedu@
2007-04-13Remove comments talking about vnode interlock. No binary change.Alexander Bluhm
ok thib
2007-04-11Remove the simplelock argument from vrecycle();Thordur I. Bjornsson
ok pedro@, sturm@
2007-03-21Remove the v_interlock simplelock from the vnode structure.Thordur I. Bjornsson
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@
2007-03-12better desiredvnodes not based on maxusers; pedro@ deraadt@ okMichael Shalayeff
2007-02-20for vfsconf sysctl, do not leak kernel sensors out to userlandTheo de Raadt
ok art thib
2007-02-17fix ddb buf printing for daddr_t growth to 64bit;Michael Shalayeff
from juan hernandez gonzalez; tested by bluhm@
2007-02-14Consistently spell FALLTHROUGH to appease lint.Jonathan Gray
ok kettenis@ cloder@ tom@ henning@
2007-02-13fix ddb buf printMichael Shalayeff
2006-11-20vprint() should be defined if DIAGNOSTIC || DEBUG. Noticed by (andTom Cosgrove
original diff from) Jake < antipsychic (at) hotmail.com >. Discussed with Mickey and Miod. ok miod@ pedro@
2006-10-30use vp->v_type to index into vtypes rather then vp->v_tag,Thordur I. Bjornsson
fixing odd output in the 'show vnode' ddb code. ok mickey@
2006-07-11add mount/vnode/buf and softdep printing commands; tested on a few archs and ↵Michael Shalayeff
will make pedro happy too (;
2006-07-09Fix tab where space was meantPedro Martelletto
2006-07-08vinvalbuf() debugging aid, under VFSDEBUG.Thordur I. Bjornsson
ok pedro@
2006-07-03also print vp in vprint (useful for debugging); pedro@ okMichael Shalayeff
2006-06-25rename vfs_busy() flags VB_UMIGNORE/VB_UMWAIT to VB_NOWAIT/VB_WAITNikolay Sturm
requested by and ok pedro
2006-06-14move vfs_busy() to rwlocks and properly hide the locking api from vfsNikolay Sturm
ok tedu, pedro
2006-06-02Add a clonable devices implementation. Hacked along with thib@, inputPedro Martelletto
from krw@ and toby@, subliminal prodding from dlg@, okay deraadt@.
2006-05-28Spacing in vfs_sysctl()Pedro Martelletto
2006-05-07forgot to remove this sentence from the commentNikolay Sturm
ok pedro
2006-04-30remove the simplelock argument from vfs_busy() which is currently notNikolay Sturm
used and will never be used this way in VFS requested by and ok pedro, ok krw, biorn