summaryrefslogtreecommitdiffstats
path: root/sys/tmpfs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Tweaks utimensat/futimens handling to always update ctime, even when bothguenther2015-04-172-10/+14
| | | | | | | atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and to correctly handle a timestamp of -1. ok millert@
* Remove some includes include-what-you-use claims don'tjsg2015-03-142-4/+2
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* First step towards making uiomove() take a size_t size argument:miod2015-02-102-7/+7
| | | | | | | - 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-216-36/+6
|
* change pool allocator to null and pass waitok to indicate nointrtedu2014-12-231-5/+5
|
* 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
* 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@
* primary change: move uvm_vnode out of vnode, keeping only a pointer.tedu2014-12-161-1/+3
| | | | | | 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
* 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
* tmpfs free sizestedu2014-11-022-4/+4
|
* unnecessary malloc.h includetedu2014-11-021-2/+1
|
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-122-4/+4
| | | | after discussions with beck deraadt kettenis.
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-082-4/+3
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* Reduce uvm include madness. Use <uvm/uvm_extern.h> instead ofmpi2014-03-282-4/+4
| | | | | | <uvm/uvm.h> if possible and remove double inclusions. ok beck@, mlarkin@, deraadt@
* guenther's addition of filechk didn't take into account the differentespie2014-02-281-9/+7
| | | | | | | | | structure of tmpfs_write. rewrite the opening tests to conform more to ffs's code, so that overrun is not used unitialized. Patch by kettenis@ (on the road) deraadt@ "do it right away"
* Check for offset wraparound and enforce RLIMIT_FSIZE.guenther2014-02-251-1/+14
| | | | | problem reported by brad@ ok kettenis@ millert@
* bring over kqfilter code from ufs which works better than thetedu2014-01-221-2/+105
| | | | generic flavor. problems noted and tested by ajacoutot
* Delay checking the vnode locking of the target vnodes in tmpfs_rename()guenther2014-01-071-3/+8
| | | | | | | | until we've confirmed they're on the same filesystem as the source: not all filesystems do locking the same. problem report and testing chrisz@ ok espie@
* zap defines that don't make any sense for usespie2013-12-251-4/+1
| | | | okay tedu@
* sync specvops with ffs (fixing spec_open along the way)tedu2013-12-231-12/+14
| | | | ok espie
* Move KASSERT a bit further down because it can apparently be triggered bykettenis2013-12-231-2/+3
| | | | | | | | | trying to hardlink a directory. While this is not allowed on tmpfs, this allows us to reach the code that checks for this such that we can return the appropriate error. Cluestick from Pedro Martelletto. ok espie@
* bring in a few improvements from pedro, guenther, me...espie2013-12-145-527/+360
| | | | | | | | | | | | | | 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@
* A few fixes from Pedro Martelletto, adapted fromespie2013-10-103-27/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/bitrig/bitrig/commits/pedro_tmpfs_fixes 7efd381ac3: # mkdir -p x/y # mv x/y/. z (or mv x/y/.. z) (panic) 264ecd2c7b: # mknod x b 100 100 (can be any block/character device) # ls -lR / (panic) 7da08d22fd: # mkfifo x (or mknod x) # mv x y (panic) af0666c65a: # mount -t tmpfs -o -n16 tmpfs /mnt (create tmpfs with 16 inodes limit) # cd /mnt # touch x # for i in `jot 100 1 100`; do ln -s x $i; done (create 100 symlinks, = they "succeed" even though they failed) # ls -lart 7e9296a6f8: # mkdir x # touch x/y # chflags uappnd x (or sappnd) # rm x/y 936b9cf257: # mkdir -p x/y # rmdir x/y/.. (panic) de541406ef: # touch x # ln x y # stat -f %c x # sleep 10 # rm y # stat -f %c x okay guenther@, krw@
* The readdir vop should set uio_offset to the cookie of the entryguenther2013-09-223-19/+17
| | | | | | | | | | 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-012-68/+31
| | | | Prodding and initial diff from espie@
* plug name_ipool leak in tmpfs_link()espie2013-06-051-1/+2
| | | | from pedro.
* on drugs, did not read pedro's patch and just zapped the comment.espie2013-06-051-2/+2
| | | | Obviously will not do... fixed
* restore code commented out while debugging. From pedroespie2013-06-041-2/+2
|
* fix include guard locations (from pedro)espie2013-06-042-8/+8
|
* Update pathconf handling for -current..brad2013-06-041-11/+5
| | | | | | | | - Remove _PC_PATH_MAX, _PC_PIPE_BUF and _PC_SYNC_IO. - Add _PC_TIMESTAMP_RESOLUTION. - Change _PC_FILESIZEBITS from using "sizeof(off_t) * CHAR_BIT" to returning 64. With input from and Ok guenther@
* sprinkle $OpenBSD$, pointed out by pedroespie2013-06-038-0/+8
|
* import tmpfs code, originally from netbsd.espie2013-06-018-0/+5325
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@