summaryrefslogtreecommitdiff
path: root/sys/kern/spec_vnops.c
AgeCommit message (Collapse)Author
2017-12-30Don't pull in <sys/file.h> just to get fcntl.hPhilip Guenther
ok deraadt@ krw@
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-01-19Convert min() and uiomovei() to ulmin() and uiomove(),Stefan Kempf
preventing integer truncation. Diff from Martin Natano ok kettenis@
2015-12-05remove stale lint annotationsTed Unangst
2015-02-10First step towards making uiomove() take a size_t size argument:Miod Vallat
- 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@
2014-12-29Explicitely include <uvm/uvm_extern.h> in order to build on variable page sizeMiod Vallat
architectures.
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-11-03include sys/unistd.h where needed instead of indirect reliance. ok jsgTed Unangst
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@
2013-10-30Use local variables for ap->a_p where appropriate.Philip Guenther
ok deraadt@
2013-10-29Unlock the vnode while calling a device's d_close routine, except whenPhilip Guenther
it's locked for changing the type (i.e., revoke()). We already unlock it while calling the d_open, d_read, and d_write routines and this is safe for the same reason: the device routines operate at a lower level and don't need the protection of the vnode locks. This is important as the device close routine may block indefinitely. "don't see anything wrong" tedu@
2013-08-06Make it possible to have multiple clonable devices per major.Mark Kettenis
2013-07-29Do a proper cleanup in the error path when opening a clonable device fails.Mark Kettenis
ok guenther@
2013-07-09back out the cache flipper temporarily to work out of tree.Bob Beck
will come back soon. ok deraadt@
2013-06-11High memory page flipping for the buffer cache.Bob Beck
This change splits the buffer cache free lists into lists of dma reachable buffers and high memory buffers based on the ranges returned by pmemrange. Buffers move from dma to high memory as they age, but are flipped to dma reachable memory if IO is needed to/from and high mem buffer. The total amount of buffers allocated is now bufcachepercent of both the dma and the high memory region. This change allows the use of large buffer caches on amd64 using more than 4 GB of memory ok tedu@ krw@ - testing by many.
2013-06-11final removal of daddr64_t. daddr_t has been 64 bit for a long enoughTheo de Raadt
test period; i think 3 years ago the last bugs fell out. ok otto beck others
2013-03-28Add support for _PC_TIMESTAMP_RESOLUTION for ffs/mfs, cd9600, ext2,Philip Guenther
msdos, NFS, fifos and devices, plus support for querying it in getconf(2) and the requisite pathconf(2) manpage blurb ok tedu@
2013-03-28Handle the pathconf _PC_PATH_MAX, _PC_PIPE_BUF, _PC_ASYNC_IO,Philip Guenther
_PC_PRIO_IO, and _PC_SYNC_IO names in VOP_PATHCONF(), as they're fs-independent for us. Since we don't support latter three on any fs, we can also define the related _POSIX_{ASYNC,PRIO,SYNC}_IO symbols in <unistd.h> (via sys/unistd.h) with value -1. Also, zap pointless tty-only values from procfs(!). ok beck@, deraadt@
2012-06-20Cleanup our filesystem pathconf() code a little bit to make it easierMatthew Dempsky
to diff against FreeBSD's. From Brad; no object file change on amd64.
2011-07-30When using rthreads, the thread that calls exit will be the last one toJoel Sing
actually exit. This means that the main thread will exit and free the process group, which results in the thread dereferencing a null pointer when it is woken back up. Avoid this by checking that the ps_pgrp is not null before deferefencing it. Also expand the ps_session macro to avoid hiding the dereference. ok tedu@
2011-07-05clean up some left over decls from before the code moved to one fileTheo de Raadt
ok guenther
2011-07-04move the specfs code to a place people can see it; ok guenther thib krwTheo de Raadt
2011-07-04Fix another kqfilter return value.Nicholas Marriott
ok deraadt
2011-07-04Nuke the useless D_KQFILTER flag and just check that d_kqfilter isNicholas Marriott
filled in. Move D_CLONE down to 0x0001 as suggested by thib. ok deraadt thib
2011-07-04bread does nothing with its ucred argument. remove it. ok matthewTed Unangst
2011-04-05Every single vop_default is set to eopnotsupp, so retire itThordur I. Bjornsson
and return EOPNOTSUPP directly from the VOP_* functions. Filesystems should, at some point fill in every function in the vop_default struct so we can get rid of the 'if' statements in VOP_*.
2010-12-21Bring back the "End the VOP experiment." diff, naddy's issues whereThordur I. Bjornsson
unrelated, and his alpha is much happier now. OK deraadt@
2010-09-10Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)Thordur I. Bjornsson
have been resolved.
2010-09-06End the VOP experiment. Instead of the ridicolusly complicated operationThordur I. Bjornsson
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@.
2010-07-26Correct the links between threads, processes, pgrps, and sessions,Philip Guenthe
so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
2010-05-18dont let sys/ioctl.h imply that you get the ioctls in dkio.h. thisDavid Gwynne
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include <sys/dkio.h> to the places that actually want and use the disk ioctls. this became an issue when krw@'s X build failed when he was testing a change to dkio.h. tested by krw@ help from and ok miod@
2009-08-13- remove super-obvious comments from $fs_vnodeop_entries[]Jasper Lievisse Adriaanse
prodded by and ok thib@ agreed by art@ and blambert@
2009-06-25backout the buf_acquire() does the bremfree() since all callersThordur I. Bjornsson
where doing bremfree() befure calling buf_acquire(). This is causing us headache pinning down a bug that showed up when deraadt@ too cvs to current, and will have to be done anyway as a preperation for backouts. OK deraadt@
2009-06-06All caller of buf_acquire were doing bremfree before the call.Artur Grabowski
Just put it in the buf_acquire function. oga@ ok
2008-07-24remove a bunch of bogus ARGSUSEDThordur I. Bjornsson
2008-06-12Bring biomem diff back into the tree after the nfs_bio.c fix went in.Theo de Raadt
ok thib beck art
2008-06-11back out biomem diff since it is not right yet. Doing very largeTheo de Raadt
file copies to nfsv2 causes the system to eventually peg the console. On the console ^T indicates that the load is increasing rapidly, ddb indicates many calls to getbuf, there is some very slow nfs traffic making none (or extremely slow) progress. Eventually some machines seize up entirely.
2008-06-10Buffer cache revampBob Beck
1) remove multiple size queues, introduced as a stopgap. 2) decouple pages containing data from their mappings 3) only keep buffers mapped when they actually have to be mapped (right now, this is when buffers are B_BUSY) 4) New functions to make a buffer busy, and release the busy flag (buf_acquire and buf_release) 5) Move high/low water marks and statistics counters into a structure 6) Add a sysctl to retrieve buffer cache statistics Tested in several variants and beat upon by bob and art for a year. run accidentally on henning's nfs server for a few months... ok deraadt@, krw@, art@ - who promises to be around to deal with any fallout
2008-05-08retire vn_default_error() and replace all instancesThordur I. Bjornsson
with eopnotsupp() instead; ok blambert@
2008-05-03Introduce vop_generic_bmap(); use it where applicable.Thordur I. Bjornsson
one thing of note, fifofs changes in that its bmap now sets the runp too 0, but that was an oversight in the old code. ok art@
2008-04-14garbage collect the now unused spec_ebadf();Thordur I. Bjornsson
ok dlg@
2008-04-12remove useless defines for the vnode operations, and insteadThordur I. Bjornsson
init the op array functions with whatever the define was set too. ok dlg@,blambert@
2008-04-08bring cloning up too date; Munge it so it will work with atleastThordur I. Bjornsson
oga@'s upcoming DRM changes and too some degree ratchov@'s audio work. It still works for bpf's though. Parts from ratchov@; fstat(1) parts from Pedro Martelletto; tested by many, ok'ed by a few; "get going with cloning" deraadt@
2007-12-27fifofs, deadfs and specfs all have the same "trivial lookup routine thatThordur I. Bjornsson
always fails". Introduce vop_generic_lookup(), which is a trivial lookup routine that always fails and use that instead, zap the redundant copies. ok toby@, tedu@, art@
2007-06-18ansify/de-register.Jasper Lievisse Adriaanse
no binary change
2007-06-02daddr_t -> daddr64_t for specfs. convert some variablesThordur I. Bjornsson
to proper types along the way (ints), fixes a subtle bug wich otto@ pointed me at. ok deraadt@
2007-06-01pedro ok'd this ~3500 line diff which removes the vop argumentTheo de Raadt
"ap = v" comments in under 8 seconds, so it must be ok. and it compiles too.