summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Initialize va_filerev in vattr_null() to avoid leaking stack garbage;guenther2015-10-131-9/+23
| | | | | | | | | | | | | problem pointed out by Martin Natano (natano (at) natano.net) Also, stop chaining assignments (foo = bar = baz) in vattr_null(). The exact meaning of those depends on the order of the sizes-and- signednesses of the lvalues, making them fragile: a statement here mixed *six* types, but managed to get them in a safe order. Delete a 20+ year old XXX comment that was almost certainly bemoaning a bug from when they were in an unsafe order. ok deraadt@ miod@
* Use the radix API directly and get rid of the function pointers. Therempi2015-10-081-10/+6
| | | | | | is no point in keeping an unused level of abstraction. ok mikeb@, claudio@
* rn_inithead() offset argument is now specified in byte, missed in previous.mpi2015-10-071-2/+2
|
* Make every subsystem using a radix tree call rn_init() and pass thempi2015-09-041-1/+3
| | | | | | | | | | | | | | | length of the key as argument. This way every consumer of the radix tree has a chance to explicitly initialize the shared data structures and no longer rely on another subsystem to do the initialization. As a bonus ``dom_maxrtkey'' is no longer used an die. ART kernels should now be fully usable because pf(4) and IPSEC properly initialized the radix tree. ok chris@, reyk@
* Fix rn_match and there for the expoerted lookup functions in radix.cclaudio2015-07-161-3/+1
| | | | | | to never return the internal RNF_ROOT nodes. This removes the checks in the callee to verify that not an RNF_ROOT node was returned. OK mpi@
* Drop and reacquire the kernel lock in the vfs_shutdown and "cold"mikeb2015-05-121-1/+14
| | | | | | | portions of msleep and tsleep to give interrupts a chance to run on other CPUs. Tweak and OK kettenis
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* Return EINVAL if the creds supplied for NFS export have a cr_ngroups lessguenther2015-03-021-3/+7
| | | | | | than zero or greater than NGROUPS_MAX Fixes panic seen by henning@
* rename desiredvnodes to initialvnodes. less of a lie. ok beck deraadttedu2015-01-091-2/+2
|
* start retiring the nointr allocator. specify PR_WAITOK as a flag as atedu2014-12-191-5/+5
| | | | marker for which pools are not interrupt safe. ok dlg
* remove lock.h from uvm_extern.h. another holdover from the simpletonlocktedu2014-12-171-1/+2
| | | | | era. fix uvm including c files to include lock.h or atomic.h as necessary. ok deraadt
* primary change: move uvm_vnode out of vnode, keeping only a pointer.tedu2014-12-161-1/+9
| | | | | | objective: vnode.h doesn't include uvm_extern.h anymore. followup changes: include uvm_extern.h or lock.h where necessary. ok and help from deraadt
* convert bcopy to memcpy. ok millerttedu2014-12-101-6/+6
|
* simple lock is long deadtedu2014-11-211-2/+1
|
* delete the KERN_VNODE sysctl. it fails to provide any isolation from thetedu2014-11-191-65/+1
| | | | | | | kernel struct vnode defintion, and the only consumer (pstat) still needs kvm to read much of the required information. no great loss to always use kvm until there's a better replacement interface. ok deraadt millert uebayasi
* prefer sizeof(*ptr) to sizeof(struct) for malloc and freetedu2014-11-141-2/+2
|
* pass size argument to free()deraadt2014-11-031-5/+5
| | | | ok doug tedu
* Replace all queue *_END macro calls except CIRCLEQ_END with NULL.doug2014-09-131-3/+2
| | | | | | | | CIRCLEQ_* is deprecated and not called in the tree. The other queue types have *_END macros which were added for symmetry with CIRCLEQ_END. They are defined as NULL. There's no reason to keep the other *_END macro calls. ok millert@
* pass the size to free in some of the obvious casestedu2014-07-131-3/+3
|
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-6/+6
| | | | after discussions with beck deraadt kettenis.
* Stop using a shutdown hook for softraid(4) and explicitly shutdownmpi2014-07-101-1/+9
| | | | | | | | | | | | | | | | | | | the disciplines right after vfs_shutdown(). This change is required in order to be able to set `cold' to 1 before traversing the device (mainbus) tree for DVACT_POWERDOWN when halting a machine. Yes, this is ugly because sr_shutdown() needs to sleep. But at least it is obvious and hopefully somebody will be ofended and fix it. In order to properly flush the cache of the disks under softraid0, sr_shutdown() now propagates DVACT_POWERDOWN for this particular subtree of devices which are not under mainbus. As a side effect sd(4) shutdown hook should no longer be necessary. Tested by stsp@ and Jean-Philippe Ouellet. ok deraadt@, stsp@, jsing@
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-081-4/+2
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* While it may be smart to use the radix tree for exports it is not OK toclaudio2014-06-041-28/+28
| | | | | | | | | | use the domain specific tree initialisation method for this since that one is multipath enabled and assumes that the radix node is part of a struct rtentry. This code uses a different struct and so the multipath modifies wrong fields and breaks stuff in mysterious ways. Since we only support AF_INET here anyway simplify the code and only have one radix_node_head pointer instead of AF_MAX ones. Fixes NFS server issues reported by rpe@, OK rpe@, guenther@, sthen@
* pull the bufcache freelist code out into separate functions to allow newtedu2014-04-101-3/+3
| | | | | | algorithms to be tested. in the process, drop support for unused B_AGE and b_synctime options. previous versions ok beck deraadt
* Split the API: struct ucred remains the kernel internal structure whileguenther2014-03-241-7/+5
| | | | | | struct xucred becomes the structure for syscalls (mount(2) and nfssvc(2)). ok deraadt@ beck@
* bzero -> memsettedu2014-01-211-2/+2
|
* Change 'mountlist' from CIRCLEQ to TAILQ. Be paranoid andkrw2013-12-011-22/+10
| | | | | | | | | use TAILQ_*_SAFE more than might be needed. Bulk ports build by sthen@ showed nobody sticking their fingers so deep into the kernel. Feedback and suggestions from millert@. ok jsing@
* Defer the v_type initialisation until after the vnode has been purged fromjsing2013-11-271-2/+2
| | | | | | | the namecache. Changing the v_type between cache_enter() and cache_purge() results in bad things happening. ok beck@
* format string fix: b_flags is longsf2013-10-021-2/+2
|
* Format string fixes: Cast time_t to long longsf2013-10-011-5/+6
| | | | and mnt_stat.f_ctime is long long, too
* Uncomment kprintf format attributes for sys/kernsyl2013-08-081-4/+4
| | | | tested on vax (gcc3) ok miod@
* The previous change was made while chasing nfs performance issuesbeck2013-07-301-4/+15
| | | | | | on Theo's servers - however this was in the context of the buffer flipper changes and this is now suspect in a continues performance issue with NFS so back it out for now
* 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