summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_aio.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix the #ifdef VFS_AIO to not compile a whole bunch of unused stuff in thepeter2000-07-281-7/+34
| | | | | | !VFS_AIO case. Lots of things have hooks into here (kqueue, exit(), sockets, etc), I elected to keep the external interfaces the same rather than spread more #ifdefs around the kernel.
* Back out the previous change to the queue(3) interface.jake2000-05-261-14/+14
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-14/+14
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-05-051-0/+1
| | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
* Introduce kqueue() and kevent(), a kernel event notification facility.jlemon2000-04-161-3/+104
|
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.phk2000-04-021-3/+3
| | | | | | | | | | | | | (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde.
* Rename the existing BUF_STRATEGY() to DEV_STRATEGY()phk2000-03-201-1/+1
| | | | | | | | substitute BUF_WRITE(foo) for VOP_BWRITE(foo->b_vp, foo) substitute BUF_STRATEGY(foo) for VOP_STRATEGY(foo->b_vp, foo) This patch is machine generated except for the ccd.c and buf.h parts.
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newphk2000-03-201-4/+3
| | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful.
* Add the VFS_AIO config option and leave it off by default. Unless thejasone2000-02-231-7/+153
| | | | | | | | | VFS_AIO option is specified, all aio-related syscalls return ENOSYS. The aio code is very fragile right now, and is unsuitable for default inclusion in a production shell box. Approved by: jkh
* Back out the previous spl change, since it opens a race window.jasone2000-01-201-1/+1
| | | | Reviewed by: alfred, dillon, peter
* Don't tsleep() while at splbio().jasone2000-01-201-2/+12
| | | | | | | Correctly return EINPROGRESS from aio_error() even when an aio request is still in the socket queue. Submitted by: Adrian Chadd <adrian@bofh.co.uk>
* Fix vn_isdisk() usage to make AIO work on non-disk-files again, rathergreen2000-01-171-2/+11
| | | | | | | than just return ENOTBLK. PR: 16163 Submitted by: Adrian Chadd <adrian@FreeBSD.org>
* Add aio_waitcomplete(). Make aio work correctly for socket descriptors.jasone2000-01-141-502/+633
| | | | | | | | Make gratuitous style(9) fixes (me, not the submitter) to make the aio code more readable. PR: kern/12053 Submitted by: Chris Sedore <cmsedore@maxwell.syr.edu>
* Give vn_isdisk() a second argument where it can return a suitable errno.phk2000-01-101-2/+2
| | | | Suggested by: bde
* Convert various pieces of code to use vn_isdisk() rather than checkingphk1999-11-221-4/+1
| | | | | | | | for vp->v_type == VBLK. In ccd: we don't need to call VOP_GETATTR to find the type of a vnode. Reviewed by: sos
* Simplify and de-bogotify check for raw disk.phk1999-11-071-31/+15
|
* Change useracc() and kernacc() to use VM_PROT_{READ|WRITE|EXECUTE} for thephk1999-10-301-18/+13
| | | | | | | | | "rw" argument, rather than hijacking B_{READ|WRITE}. Fix two bugs (physio & cam) resulting by the confusion caused by this. Submitted by: Tor.Egge@fast.no Reviewed by: alc, ken (partly)
* Trim unused options (or #ifdef for undoc options).peter1999-10-111-3/+0
| | | | Submitted by: phk
* This is what was "fdfix2.patch," a fix for fd sharing. It's prettygreen1999-09-191-4/+4
| | | | | | | | | | | | | | | | | far-reaching in fd-land, so you'll want to consult the code for changes. The biggest change is that now, you don't use fp->f_ops->fo_foo(fp, bar) but instead fo_foo(fp, bar), which increments and decrements the fp refcount upon entry and exit. Two new calls, fhold() and fdrop(), are provided. Each does what it seems like it should, and if fdrop() brings the refcount to zero, the fd is freed as well. Thanks to peter ("to hell with it, it looks ok to me.") for his review. Thanks to msmith for keeping me from putting locks everywhere :) Reviewed by: peter
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Spring cleaning around strategy and disklabels/slices:phk1999-08-141-10/+3
| | | | | | | | | | | | | | Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout. please see comment in sys/conf.h about the flag argument. Remove strategy argument from all the diskslice/label/bad144 implementations, it should be found from the dev_t. Remove bogus and unused strategy1 routines. Remove open/close arguments from dssize(). Pick them up from dev_t. Remove unused and unfinished setgeom support from diskslice/label/bad144 code.
* s/v_specinfo/v_rdev/phk1999-08-131-2/+2
|
* Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,phk1999-08-081-2/+1
| | | | | | a few lines into <sys/vnode.h>. Add a few fields to struct specinfo, paving the way for the fun part.
* Slight reorganization of kernel thread/process creation. Instead of usingpeter1999-07-011-3/+3
| | | | | | | | | | | | | | | SYSINIT_KT() etc (which is a static, compile-time procedure), use a NetBSD-style kthread_create() interface. kproc_start is still available as a SYSINIT() hook. This allowed simplification of chunks of the sysinit code in the process. This kthread_create() is our old kproc_start internals, with the SYSINIT_KT fork hooks grafted in and tweaked to work the same as the NetBSD one. One thing I'd like to do shortly is get rid of nfsiod as a user initiated process. It makes sense for the nfs client code to create them on the fly as needed up to a user settable limit. This means that nfsiod doesn't need to be in /sbin and is always "available". This is a fair bit easier to do outside of the SYSINIT_KT() framework.
* Slight tweak to fork1() calling conventions. Add a third argument sopeter1999-06-301-3/+2
| | | | | | | | the caller can easily find the child proc struct. fork(), rfork() etc syscalls set p->p_retval[] themselves. Simplify the SYSINIT_KT() code and other kernel thread creators to not need to use pfind() to find the child based on the pid. While here, partly tidy up some of the fork1() code for RF_SIGSHARE etc.
* Convert buffer locking from using the B_BUSY and B_WANTED flags to usingmckusick1999-06-261-2/+2
| | | | | | | lockmgr locks. This commit should be functionally equivalent to the old semantics. That is, all buffer locking is done with LK_EXCLUSIVE requests. Changes to take advantage of LK_SHARED and LK_RECURSIVE will be done in future commits.
* Introduce the makebdev() function, it does the same as the makedev()phk1999-06-011-2/+2
| | | | function for now, but that will change.
* major(something) can never become NODEV.phk1999-05-091-4/+2
|
* I got tired of seeing all the cdevsw[major(foo)] all over the place.phk1999-05-081-2/+2
| | | | | | | | Made a new (inline) function devsw(dev_t dev) and substituted it. Changed to the BDEV variant to this format as well: bdevsw(dev_t dev) DEVFS will eventually benefit from this change too.
* remove b_proc from struct buf, it's (now) unused.phk1999-05-061-3/+3
| | | | Reviewed by: dillon, bde
* Fix up a few easy 'assignment used as truth value' and 'suggest parenspeter1999-05-061-2/+3
| | | | | around && within ||' type warnings. I'm pretty sure I have not masked any problems here, I've committed real problem fixes seperately.
* Enable vmspace sharing on SMP. Major changes are,luoqi1999-04-281-43/+5
| | | | | | | | | | | | | | | | | - %fs register is added to trapframe and saved/restored upon kernel entry/exit. - Per-cpu pages are no longer mapped at the same virtual address. - Each cpu now has a separate gdt selector table. A new segment selector is added to point to per-cpu pages, per-cpu global variables are now accessed through this new selector (%fs). The selectors in gdt table are rearranged for cache line optimization. - fask_vfork is now on as default for both UP and SMP. - Some aio code cleanup. Reviewed by: Alan Cox <alc@cs.rice.edu> John Dyson <dyson@iquest.net> Julian Elischer <julian@whistel.com> Bruce Evans <bde@zeta.org.au> David Greenman <dg@root.com>
* Add standard padding argument to pread and pwrite syscall. That should make themdt1999-04-041-5/+5
| | | | | | | | | NetBSD compatible. Add parameter to fo_read and fo_write. (The only flag FOF_OFFSET mean that the offset is set in the struct uio). Factor out some common code from read/pread/write/pwrite syscalls.
* Added a used #include (don't depend on "vnode_if.h" including <sys/buf.h>).bde1999-02-251-1/+2
|
* Hide access to vmspace:vm_pmap with inline function vmspace_pmap(). Thisluoqi1999-02-191-2/+2
| | | | | | | is the preparation step for moving pmap storage out of vmspace proper. Reviewed by: Alan Cox <alc@cs.rice.edu> Matthew Dillion <dillon@apollo.backplane.com>
* More const fixes for -Wall, -Wcast-qualdillon1999-01-291-3/+3
|
* Removed bogus casts to c_caddr_t. This is part of terminatingbde1999-01-291-2/+2
| | | | | | c_caddr_t with extreme prejudice. Here the original casts to caddr_t were to support K&R compilers (or missing prototypes), but the relevant source files require an ANSI compiler.
* Fix warnings related to -Wall -Wcast-qualdillon1999-01-281-2/+2
|
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-281-5/+6
| | | | kernel compile
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-8/+8
| | | | kernel compile
* This is a rather large commit that encompasses the new swapper,dillon1999-01-211-5/+5
| | | | | | | | | | changes to the VM system to support the new swapper, VM bug fixes, several VM optimizations, and some additional revamping of the VM code. The specific bug fixes will be documented with additional forced commits. This commit is somewhat rough in regards to code cleanup issues. Reviewed by: "John S. Dyson" <root@dyson.iquest.net>, "David Greenman" <dg@root.com>
* Wrap two macros into do { ... } while (0), and fix the way they're useddes1998-12-151-2/+2
| | | | | | in the kernel. Reviewed by: bde
* Don't forget to update the pmap associated with aio daemons when addingtegge1998-11-271-2/+2
| | | | new page directory entries for a growing kernel virtual address space.
* Nitpicking and dusting performed on a train. Removes trivial warningsphk1998-10-251-5/+2
| | | | about unused variables, labels and other lint.
* Fixed nonsense overflow checking (checking that a long variable is lessbde1998-08-171-7/+5
| | | | | | | | than INT_MAX after it has possibly overflowed). Removed an unused variable and its associated 2 style bugs. Removed unused includes.
* Cast between longs and pointers via intptr_t. There shouldn't bebde1998-07-151-17/+17
| | | | | | nearly so many casts here. Casting an pointer that was an integer back to an integer just to compare it with -1 is bad, and casting it back just to compare it with NULL is just wrong.
* fix braino from yesterdays' megacommitjulian1998-07-051-2/+2
| | | | | | Not sure of the result of it.. (may or may not effect anything) but it's fixed now. (found by: comparing what cvsup sent back to me with what I tested..)
* There is no such thing any more as "struct bdevsw".julian1998-07-041-4/+5
| | | | | | | | | | | | | | | | | | There is only cdevsw (which should be renamed in a later edit to deventry or something). cdevsw contains the union of what were in both bdevsw an cdevsw entries. The bdevsw[] table stiff exists and is a second pointer to the cdevsw entry of the device. it's major is in d_bmaj rather than d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw). rawread()/rawwrite() went away as part of this though it's not strictly the same patch, just that it involves all the same lines in the drivers. cdroms no longer have write() entries (they did have rawwrite (?)). tapes no longer have support for bdev operations. Reviewed by: Eivind Eklund and Mike Smith Changes suggested by eivind.
* 64bit fixes: don't cast pointers to int.dfr1998-06-101-14/+14
|
* Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108.des1998-04-171-4/+4
|
OpenPOWER on IntegriCloud