summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_subr.c
AgeCommit message (Collapse)Author
2016-08-25pool_setiplDavid Gwynne
ok kettenis@
2016-07-22Prevent NULL-pointer call for filesystems that don't provide vfs_sysctlMark Kettenis
in their vfsops. Issue reported by Tim Newsham. ok claudio@, natano@
2016-06-19Remove the lockmgr() API. It is only used by filesystems, where it is aMartin Natano
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
2016-05-26The doforce variable isn't modified anywhere. Also, the only filesystemMartin Natano
left using it is fuse. It has been removed from all other filesystems. ok millert deraadt
2016-04-26copy_statfs_info() is not only used by ufs, but by other filesystems too,Martin Natano
so make sure that all members of mp->mnt_stat.mount_info are copied. ok stefan
2016-04-26fix off by one in vfs_vnode_print - found by miodBob Beck
ok deraadt@, krw@
2016-04-07Share clone bitmap between aliased vnodes. This prevents duplicate cloneMartin Natano
instance numbers being handed out for the same minor device. ok mikeb
2016-04-05Increase size of the clone bitmap (revised diff after revert). I haveMartin Natano
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
2016-04-01Revert the clone bitmap enlargement changeMike Belopuhov
2016-03-31Increase size of the clone bitmap. A limit of only 64 device clonesMartin Natano
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
2016-03-19Remove the unused flags argument from VOP_UNLOCK().natano
torture tested on amd64, i386 and macppc ok beck mpi stefan "the change looks right" deraadt
2016-03-14Change a bunch of (<blah> *)0 to NULL.Kenneth R Westerback
ok beck@ deraadt@
2015-12-05remove stale lint annotationsTed Unangst
2015-11-16In getdevvp() set the VISTTY flag on a vnode to indicate the underlyingTheo de Raadt
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
2015-10-13Initialize va_filerev in vattr_null() to avoid leaking stack garbage;Philip Guenther
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@
2015-10-08Use the radix API directly and get rid of the function pointers. ThereMartin Pieuchot
is no point in keeping an unused level of abstraction. ok mikeb@, claudio@
2015-10-07rn_inithead() offset argument is now specified in byte, missed in previous.Martin Pieuchot
2015-09-04Make every subsystem using a radix tree call rn_init() and pass theMartin Pieuchot
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@
2015-07-16Fix rn_match and there for the expoerted lookup functions in radix.cClaudio Jeker
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@
2015-05-12Drop and reacquire the kernel lock in the vfs_shutdown and "cold"Mike Belopuhov
portions of msleep and tsleep to give interrupts a chance to run on other CPUs. Tweak and OK kettenis
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2015-03-02Return EINVAL if the creds supplied for NFS export have a cr_ngroups lessPhilip Guenther
than zero or greater than NGROUPS_MAX Fixes panic seen by henning@
2015-01-09rename desiredvnodes to initialvnodes. less of a lie. ok beck deraadtTed Unangst
2014-12-19start retiring the nointr allocator. specify PR_WAITOK as a flag as aTed Unangst
marker for which pools are not interrupt safe. ok dlg
2014-12-17remove lock.h from uvm_extern.h. another holdover from the simpletonlockTed Unangst
era. fix uvm including c files to include lock.h or atomic.h as necessary. ok deraadt
2014-12-16primary change: move uvm_vnode out of vnode, keeping only a pointer.Ted Unangst
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
2014-12-10convert bcopy to memcpy. ok millertTed Unangst
2014-11-21simple lock is long deadTed Unangst
2014-11-19delete the KERN_VNODE sysctl. it fails to provide any isolation from theTed Unangst
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
2014-11-14prefer sizeof(*ptr) to sizeof(struct) for malloc and freeTed Unangst
2014-11-03pass size argument to free()Theo de Raadt
ok doug tedu
2014-09-13Replace all queue *_END macro calls except CIRCLEQ_END with NULL.Doug Hogan
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@
2014-07-13pass the size to free in some of the obvious casesTed Unangst
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-10Stop using a shutdown hook for softraid(4) and explicitly shutdownMartin Pieuchot
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@
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hTheo de Raadt
don't need to be married. ok guenther miod beck jsing kettenis
2014-06-04While it may be smart to use the radix tree for exports it is not OK toClaudio Jeker
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@
2014-04-10pull the bufcache freelist code out into separate functions to allow newTed Unangst
algorithms to be tested. in the process, drop support for unused B_AGE and b_synctime options. previous versions ok beck deraadt
2014-03-24Split the API: struct ucred remains the kernel internal structure whilePhilip Guenther
struct xucred becomes the structure for syscalls (mount(2) and nfssvc(2)). ok deraadt@ beck@
2014-01-21bzero -> memsetTed Unangst
2013-12-01Change 'mountlist' from CIRCLEQ to TAILQ. Be paranoid andKenneth R Westerback
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@
2013-11-27Defer the v_type initialisation until after the vnode has been purged fromJoel Sing
the namecache. Changing the v_type between cache_enter() and cache_purge() results in bad things happening. ok beck@
2013-10-02format string fix: b_flags is longStefan Fritsch
2013-10-01Format string fixes: Cast time_t to long longStefan Fritsch
and mnt_stat.f_ctime is long long, too
2013-08-08Uncomment kprintf format attributes for sys/kernSylvestre Gallon
tested on vax (gcc3) ok miod@
2013-07-30The previous change was made while chasing nfs performance issuesBob Beck
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
2013-06-24Manipulating buffers after sleeping is dangerous. Instead of attemptingBob Beck
to cheat and VOP_BWRITE a buffer, restart the vinvalbuf if we have to wait for a busy buffer to complete ok tedu@ guenther@
2013-04-15Add an f_mntfromspec member to struct statfs, which specifies the name ofJoel Sing
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@
2013-02-17Comment out recently added __attribute__((__format__(__kprintf__))) annotationsMiod Vallat
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.
2013-02-09Add explicit __attribute__ ((__format__(__kprintf__)))) to the functions andMiod Vallat
function pointer arguments which are {used as,} wrappers around the kernel printf function. No functional change.