summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_subr.c
AgeCommit message (Collapse)Author
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
2006-04-19Remove unused mount list simple_lock() gooPedro Martelletto
2006-01-09Put vprint() under DIAGNOSTIC, as to save space in generated ramdisks.Pedro Martelletto
Inspiration from miod@, okay deraadt@. Tested on i386, macppc and amd64.
2005-11-30No need for vfs_busy() and vfs_unbusy() to take a process pointerPedro Martelletto
anymore. Testing by jolan@, thanks.
2005-11-24Remove kernfs, okay deraadt@.Pedro Martelletto
2005-11-19Remove unnecessary lockmgr() archaism that was costing too much in termsPedro Martelletto
of panics and bugfixes. Access curproc directly, do not expect a process pointer as an argument. Should fix many "process context required" bugs. Incentive and okay millert@, okay marc@. Various testing, thanks.
2005-11-18Work around yet another race on non-locking file systems: when callingPedro Martelletto
VOP_INACTIVE() in vrele() and vput(), we may sleep. Since there's no locking of any kind, someone can vget() the vnode and vrele() it while we sleep, beating us in getting the vnode on the free list.
2005-11-08Missed one use of 'register'Pedro Martelletto
2005-11-07Use ANSI function declarations and deregister, no binary changePedro Martelletto
2005-10-19Remove v_vnlock from struct vnode, okay krw@ tedu@Pedro Martelletto
2005-05-26RIP stackable filesystems, ok marius@ tedu@, discussed with deraadt@Pedro Martelletto
2005-05-24when a device vnode associated with a mount point disappears, mark thePedro Martelletto
filesystem as doomed and unmount it
2005-05-22put VLOCKSWORK stuff under a single option, VFSDEBUGPedro Martelletto
2005-05-01check for VBIOONFREELIST and VBIOONSYNCLIST in vprint(), okay marius@Pedro Martelletto
2005-03-24always good to check for invalid values. ok marius pedroTed Unangst
2005-01-10change vget() to only put a vnode back on the free lists if it actuallyPedro Martelletto
was there. should fix a (rare) corner case introduced by my last commit. ok tedu@, testing by joris, moritz@, danh@, otto@ and krw@. many thanks.