summaryrefslogtreecommitdiffstats
path: root/sys/tmpfs/tmpfs_subr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use -1 to indicate an invalid uid/gid, not UID_MAX and GID_MAX.millert2019-10-171-2/+1
| | | | | This is clearer and more consistent with the rest of the kernel. OK deraadt@ sashan@
* Call vput(dvp) in vnode operation functions instead of calling it invisa2018-05-281-2/+1
| | | | | | | the file allocation routine. This allows stepwise changing of the vnode locking discipline. OK mpi@
* Drop unnecessary `p' parameter from vget(9).visa2018-05-271-2/+2
| | | | OK mpi@
* Remove proc from the parameters of vn_lock(). The parameter isvisa2018-05-021-2/+2
| | | | | | unnecessary because curproc always does the locking. OK mpi@
* Use RWL_IS_VNODE with locks that are acquired through VOP_LOCK(),visa2018-03-281-2/+2
| | | | | | | | to appease WITNESS. ext2fs and ffs already use the flag. The same locking pattern appears with other file systems too, so this patch addresses the remaining cases. OK mpi@
* Tweak lock inits to make the system runnable with witness(4)visa2017-04-201-2/+2
| | | | on amd64 and i386.
* Fix indentation. No binary change.jsg2016-09-221-5/+5
|
* 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
* Convert to uiomove. From Martin Natano.stefan2016-02-061-5/+5
|
* Tweaks utimensat/futimens handling to always update ctime, even when bothguenther2015-04-171-3/+8
| | | | | | | atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and to correctly handle a timestamp of -1. ok millert@
* First step towards making uiomove() take a size_t size argument:miod2015-02-101-5/+5
| | | | | | | - rename uiomove() to uiomovei() and update all its users. - introduce uiomove(), which is similar to uiomovei() but with a size_t. - rewrite uiomovei() as an uiomove() wrapper. ok kettenis@
* remove #if 0 cdefs.h blocksderaadt2015-01-211-6/+1
|
* Prefer MADV_* over POSIX_MADV_* in kernel for consistency: the latterguenther2014-12-171-4/+4
| | | | | | doesn't have all the values and therefore can't be used everywhere. ok deraadt@ kettenis@
* Use MAP_INHERIT_* for the 'inh' argument to the UMV_MAPFLAG() macro,guenther2014-12-151-3/+3
| | | | | | eliminating the must-be-kept-in-sync UVM_INH_* macros ok deraadt@ tedu@
* Disallow file allocations on directories that have been removeddcoppa2014-12-041-1/+6
| | | | | | | | | | | (tn_links == 0). Failure to enforce such a check can lead to the violation of the assumption that removed directories should not contain directory entries and thus trigger a kernel diagnostic assertion (panic). Fix provided by Pedro Martelletto, thanks! OK millert@
* move arc4random prototype to systm.h. more appropriate for most codetedu2014-11-181-3/+1
| | | | to include that than rdnvar.h. ok deraadt dlg
* Replace a plethora of historical protection options with justderaadt2014-11-161-7/+7
| | | | | | | PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
* Reduce uvm include madness. Use <uvm/uvm_extern.h> instead ofmpi2014-03-281-2/+2
| | | | | | <uvm/uvm.h> if possible and remove double inclusions. ok beck@, mlarkin@, deraadt@
* bring in a few improvements from pedro, guenther, me...espie2013-12-141-227/+241
| | | | | | | | | | | | | | thanks to krw@ for the original cherry-picking, millert@ for useful comment. so: - no longer expose internal kernel addresses, uses seq numbers instead - make sure the numbers don't overflow (millert@ UINT64_MAX)... a conservative estimate is that tmpfs will run out of seqs in >600 years... - don't malloc dents, put them on the stack and zero them - gc whiteout code - gc getpage/putpage code (shrink uvm instead) okay krw@, millert@
* The readdir vop should set uio_offset to the cookie of the entryguenther2013-09-221-11/+13
| | | | | | | | | | after the last entry that fit, but I had it setting it to the cookier of the entry after that, so it would skip one entry for each block required. Remove the no-longer-needed cnt/cntp variable while we're touching things. prodding and testing by espie@
* Update to match VOP_READDIR() changes: no more cookies, but d_off instead.guenther2013-09-011-27/+29
| | | | Prodding and initial diff from espie@
* sprinkle $OpenBSD$, pointed out by pedroespie2013-06-031-0/+1
|
* import tmpfs code, originally from netbsd.espie2013-06-011-0/+1262
heavy lifting by Pedro Martelletto, timestamp fixes by me. THIS IS NOT ENABLED YET, AND REQUIRES UVM CHANGES AND REVIEW. Imported, so that working on it can be mostly done in tree with less painful diff exchanges, and that we have history of further changes. okay tedu@, deraadt@