Commit Graph

21 Commits

Author SHA1 Message Date
yamt 9297401d54 - add ioctls to set/get disk bufq strategy.
- implement them for some drivers.
2005-12-26 10:36:47 +00:00
rpaulo 3b3e91ace3 More ktrace-lwp merge. 2005-12-11 23:42:33 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt 464cf44f6c dksubr: do b_blkno -> b_rawblkno translation earlier so that bufq can uses it. 2005-10-18 00:14:43 +00:00
yamt aec75b1cc6 - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)
2005-10-15 17:29:10 +00:00
yamt 5cb036f6e3 add wedge support to xbd and cgd. 2005-08-20 12:03:52 +00:00
drochner 9b0c17575e constification fallout 2005-06-28 20:23:02 +00:00
yamt 05f25dcc2a move buffer queue related stuffs from buf.h to their own header, bufq.h. 2004-10-28 07:07:35 +00:00
thorpej 1a4f23700c Sprinkle static in a few places. 2004-08-23 05:39:46 +00:00
hannken 3a7080244e Redo dk_start(). If di->di_diskstart() runs synchronous its biodone() will
call dk_start() via dk_iodone() before the buffer gets removed from queue.

Approved by: Roland Dowdeswell <elric@netbsd.org>

Fixes PR #25240
2004-04-19 16:04:07 +00:00
elric befeae8929 Modified the dksubr routines to:
o  expect the disk's start routine to return an int.  If the
	   int is non-zero, we enqueue the request and try again
	   later.
	o  have a dk_start() routine which runs the request queue.
	o  have a dk_iodone() function which should be called by the
	   driver using the framwork from its iodone.  dk_iodone will
	   retry the queue since presumably further progress may be
	   possible once a request is complete.  It is required that
	   the underlying driver have the resources to keep at least
	   one transaction in flight at any time.

Modified cgd to:

	o  be able to keep one transaction in flight at any time
	   (almost) by keeping a buffer of size MAXPHYS in its softc
	   and use it.

We still need to make the cgd_cbufpool per device rather than global
and provide a low water mark for it.

Addresses PR: kern/24715
(at least according to the submitter.)
2004-03-27 23:23:06 +00:00
lukem 365cbd9428 add missing __KERNEL_RCSID() 2003-07-14 15:47:00 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
atatat 7a309d7e64 make this compile again. 2003-05-12 00:19:00 +00:00
thorpej e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
dsl d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +00:00
elric 0e1a1badc4 Memset disklabel area to zero before beginning when constructing default
labels.  Problem noticed and tested by dan@.
2002-12-17 01:55:44 +00:00
elric bc24d33b67 We need to pass the dk_softc, not the osc. 2002-10-12 22:43:25 +00:00
elric 152dfaff5d We need to do biodone() if strategy is called on an unconfigured device. 2002-10-09 14:04:08 +00:00
elric 017f74d210 A slight abstraction for disks. This is mainly [right now] in
support of the cryptographic disk which I'll be checking in shortly.
2002-10-04 18:02:00 +00:00