Commit graph

74 commits

Author SHA1 Message Date
Poul-Henning Kamp 936cc4614b Rename bio_linkage to the more obvious bio_parent.
Add bio_t0 timestamp, and include <sys/time.h> where needed
2003-02-07 21:09:51 +00:00
Poul-Henning Kamp e39d70d4fd Put the checks we perform on a bio before calling ::start in their
own function, handle all validation and truncation at the time we
process the bio instead of when it gets scheduled.
2003-02-06 21:01:36 +00:00
Alfred Perlstein 44956c9863 Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
Poul-Henning Kamp 5ab413bf6e white-space changes 2002-12-26 21:02:50 +00:00
Poul-Henning Kamp 0ae8896ed2 Balk at unaligned requests.
MFC candidate.
2002-12-18 19:53:59 +00:00
Poul-Henning Kamp 3432e4fd03 malloc(9) with M_NOWAIT seems to return NULL a lot more than I would have
expected under -current.  This is a problem for GEOM because the up/down
threads cannot sleep waiting for memory to become free.  The reason they
cannot sleep is that paging things out to disk may be the only way we can
clear up some RAM.  Nice catch-22 there.

Implement a rudimentary ENOMEM recovery strategy:  If an I/O request
fails with an error code of ENOMEM, schedule it for a retry, and
tell the down-thread to sleep hz/10 to get other parts of the system
a chance to free up some memory, in particular the up-path in GEOM.

All caches should probably start to monitor malloc(9) failures using the new
malloc_last_fail() function, and release when it indicates congestion.

Sponsored by:	DARPA & NAI Labs.
2002-11-02 11:08:07 +00:00
Poul-Henning Kamp 0355b86e33 Don't track bio allocation in debug output.
Sponsored by:	DARPA & NAI Labs.
2002-10-20 08:45:17 +00:00
Poul-Henning Kamp d0e17c1b91 Add more KASSERTS.
Sponsored by:	DARPA & NAI Labs.
2002-10-14 10:02:24 +00:00
Poul-Henning Kamp 3f521b6022 Add support g_clone_bio() and g_std_done() to spawn multiple children
of a bio and correctly gather status when done.

Sponsored by:	DARPA & NAI Labs.
2002-10-09 07:11:59 +00:00
Poul-Henning Kamp 068088370c For now, don't wait for drives to stop returning EBUSY. There is too
much broken harware around it seems.

Sponsored by:	DARPA & NAI Labs.
2002-10-08 07:03:58 +00:00
Poul-Henning Kamp 430e557d3d Put a printf under #ifdef DIAGNOSTIC.
Sponsored by: DARPA & NAI Labs.
2002-10-07 06:57:00 +00:00
Poul-Henning Kamp 72840432e0 Retire g_io_fail() and let g_io_deliver() take an error argument instead.
Sponsored by:	DARPA & NAI Labs.
2002-09-30 08:54:46 +00:00
Poul-Henning Kamp 90b1cd5615 Introduce g_write_data() function.
Sponsored by:	DARPA & NAI Labs
2002-09-30 08:50:47 +00:00
Poul-Henning Kamp eadf0ffdce Void functions cannot use return(foo) even if foo is also returning void.
Sponsored by:	DARPA & NAI Labs.
2002-09-28 11:43:20 +00:00
Poul-Henning Kamp d4c4a6f165 Setattr should not retry on EBUSY, we could get EBUSY back because
a disklabel modification tries to change an open device, and no
counter-examples exists.

Be less facist about when we can do Setattr, the openmodes of devices
are so loosely managed that the "exclusive" count is almost useless.

Sponsored by:   DARPA & NAI Labs.
2002-09-27 21:12:47 +00:00
Poul-Henning Kamp a1bd3ee20c Allocate bio's with M_NOWAIT and let the caller deal with the problems.
Sponsored by:	DARPA & NAI Labs.
2002-09-27 20:53:47 +00:00
Poul-Henning Kamp 53706245bb Use biowait() rather than DIY.
Sponsored by:	DARPA & NAI Labs
2002-09-13 11:39:11 +00:00
Poul-Henning Kamp 4b8374a778 Don't grab Giant around malloc(9) and free(9).
Don't grab Giant around wakeup(9).
Don't print verbose messages about each device found in geom_dev.
Various cleanups.

Sponsored by: DARPA & NAI Labs.
2002-05-20 10:03:15 +00:00
Poul-Henning Kamp 0d3f37a804 Constifixation of attribute argument to g_io_[gs]etattr()
Sponsored by:	DARPA & NAI Labs
2002-04-09 15:12:05 +00:00
John Baldwin 6008862bc2 Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64
2002-04-04 21:03:38 +00:00
Poul-Henning Kamp 2fccec19e9 Centralize EOF handling and improve access controls for bio scheduling.
Sponsored by:	DARPA & NAI Labs
2002-04-04 09:58:20 +00:00
Poul-Henning Kamp b1876192f0 Eliminate some thread pointers which do not make sense anymore.
Split private parts of geom.h into geom_int.h.  The latter should
never be included in class implemtations.
2002-03-26 22:07:38 +00:00
Poul-Henning Kamp d306122d60 Push BIO_FORMAT into a local hack inside the floppy drivers where
it belongs.
2002-03-26 19:16:37 +00:00
Poul-Henning Kamp dd84a43c1d First commit of the GEOM subsystem to make it easier for people to
test and play with this.

This is not yet production quality and should be run only on dedicated
test boxes.

For people who want to develop transformations for GEOM there exist a
set of shims to run geom in userland (ask phk@freebsd.org).

Reports of all kinds to: phk@freebsd.org
Please include in report:
        dmesg
        sysctl debug.geomdot
        sysctl debug.geomconf

Known significant limitations:
        no kernel dump facility.
        ioctls severely restricted.

Sponsored by:   DARPA, NAI Labs
2002-03-11 21:42:35 +00:00