summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Cast enum to u_int when doing a bounds check to avoid a clang warning thatkettenis2016-09-281-3/+4
| | | | | | the comparison is always true. ok jca@, tedu@
* move the namecache_rb_tree from RB macros to RBT functions.dlg2016-09-161-2/+2
| | | | | | i had to shuffle the includes a bit. all the knowledge of the RB tree is now inside vfs_cache.c, and all accesses are via cache_* functions.
* move buf_rb_bufs from RB macros to RBT functionsdlg2016-09-161-6/+6
| | | | | i had to shuffle the order of some header bits cos RBT_PROTOTYPE needs to see what RBT_HEAD produces.
* all pools have their ipl set via pool_setipl, so fold it into pool_init.dlg2016-09-151-7/+5
| | | | | | | | | | | | | | | | | | | | | | the ioff argument to pool_init() is unused and has been for many years, so this replaces it with an ipl argument. because the ipl will be set on init we no longer need pool_setipl. most of these changes have been done with coccinelle using the spatch below. cocci sucks at formatting code though, so i fixed that by hand. the manpage and subr_pool.c bits i did myself. ok tedu@ jmatthew@ @ipl@ expression pp; expression ipl; expression s, a, o, f, m, p; @@ -pool_init(pp, s, a, o, f, m, p); -pool_setipl(pp, ipl); +pool_init(pp, s, a, ipl, f, m, p);
* pool_setipldlg2016-08-251-1/+3
| | | | ok kettenis@
* Prevent NULL-pointer call for filesystems that don't provide vfs_sysctlkettenis2016-07-221-2/+2
| | | | | | | | in their vfsops. Issue reported by Tim Newsham. ok claudio@, natano@
* Remove the lockmgr() API. It is only used by filesystems, where it is anatano2016-06-191-2/+2
| | | | | | | | trivial change to use rrw locks instead. All it needs is LK_* defines for the RW_* flags. tested by naddy and sthen on package building infrastructure input and ok jmc mpi tedu
* The doforce variable isn't modified anywhere. Also, the only filesystemnatano2016-05-261-2/+1
| | | | | | left using it is fuse. It has been removed from all other filesystems. ok millert deraadt
* copy_statfs_info() is not only used by ufs, but by other filesystems too,natano2016-04-261-3/+3
| | | | | so make sure that all members of mp->mnt_stat.mount_info are copied. ok stefan
* fix off by one in vfs_vnode_print - found by miodbeck2016-04-261-3/+3
| | | | ok deraadt@, krw@
* Share clone bitmap between aliased vnodes. This prevents duplicate clonenatano2016-04-071-8/+11
| | | | | instance numbers being handed out for the same minor device. ok mikeb
* Increase size of the clone bitmap (revised diff after revert). I havenatano2016-04-051-2/+13
| | | | | | | | | | | | | | | | | | tested this with fuse _and_ drm on amd64 and macppc. Also tested with cloning bpf (not in the tree) on macppc. ok mikeb "looks correct to me" millert The original commit message is as follows: Increase size of the clone bitmap. A limit of only 64 device clones turned out to be too low for the upcoming work on cloning bpf. The new limit is 1024 device clones. As part of the size increase, the bitmap has been changed to be allocated separately to avoid bloating all device nodes, as suggested by guenther, millert and deraadt. ok millert mikeb
* Revert the clone bitmap enlargement changemikeb2016-04-011-13/+2
|
* Increase size of the clone bitmap. A limit of only 64 device clonesnatano2016-03-311-2/+13
| | | | | | | | | turned out to be too low for the upcoming work on cloning bpf. The new limit is 1024 device clones. As part of the size increase, the bitmap has been changed to be allocated separately to avoid bloating all device nodes, as suggested by guenther, millert and deraadt. ok millert mikeb
* Remove the unused flags argument from VOP_UNLOCK().natano2016-03-191-4/+4
| | | | | | torture tested on amd64, i386 and macppc ok beck mpi stefan "the change looks right" deraadt
* Change a bunch of (<blah> *)0 to NULL.krw2016-03-141-6/+6
| | | | ok beck@ deraadt@
* remove stale lint annotationstedu2015-12-051-2/+1
|
* In getdevvp() set the VISTTY flag on a vnode to indicate the underlyingderaadt2015-11-161-1/+4
| | | | | | device is a D_TTY device. (Like spec_open, but this sets the flag to satisfy pre-VOP_OPEN situations) ok millert semarie tedu guenther
* 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