diff options
| author | yamt <yamt@NetBSD.org> | 2005-10-15 17:29:10 +0000 |
|---|---|---|
| committer | yamt <yamt@NetBSD.org> | 2005-10-15 17:29:10 +0000 |
| commit | aec75b1cc6f7fcd41709ce0aa7e7ade322def5a3 (patch) | |
| tree | 3d8326f9f2afd0eaa46aa8ff839b0971179ffb68 /sys/dev/raidframe | |
| parent | 9a9aac907941a0004579a71d85ffbe3d7c4c4b1c (diff) | |
- 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)
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index b16d3b1032c..0c6057302d5 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.190 2005/09/25 19:47:17 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.191 2005/10/15 17:29:25 yamt Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -146,7 +146,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.190 2005/09/25 19:47:17 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.191 2005/10/15 17:29:25 yamt Exp $"); #include <sys/param.h> #include <sys/errno.h> @@ -253,7 +253,7 @@ struct raid_softc { size_t sc_size; /* size of the raid device */ char sc_xname[20]; /* XXX external name */ struct disk sc_dkdev; /* generic disk device info */ - struct bufq_state buf_queue; /* used for the device queue */ + struct bufq_state *buf_queue; /* used for the device queue */ }; /* sc_flags */ #define RAIDF_INITED 0x01 /* unit has been initialized */ @@ -395,7 +395,7 @@ raidattach(int num) } for (raidID = 0; raidID < num; raidID++) { - bufq_alloc(&raid_softc[raidID].buf_queue, BUFQ_FCFS); + bufq_alloc(&raid_softc[raidID].buf_queue, "fcfs", 0); pseudo_disk_init(&raid_softc[raidID].sc_dkdev); raidrootdev[raidID].dv_class = DV_DISK; @@ -733,7 +733,7 @@ raidstrategy(struct buf *bp) bp->b_resid = 0; /* stuff it onto our queue */ - BUFQ_PUT(&rs->buf_queue, bp); + BUFQ_PUT(rs->buf_queue, bp); /* scheduled the IO to happen at the next convenient time */ wakeup(&(raidPtrs[raidID]->iodone)); @@ -1701,7 +1701,7 @@ raidstart(RF_Raid_t *raidPtr) RF_UNLOCK_MUTEX(raidPtr->mutex); /* get the next item, if any, from the queue */ - if ((bp = BUFQ_GET(&rs->buf_queue)) == NULL) { + if ((bp = BUFQ_GET(rs->buf_queue)) == NULL) { /* nothing more to do */ return; } @@ -3343,7 +3343,7 @@ rf_pool_init(struct pool *p, size_t size, const char *w_chan, int rf_buf_queue_check(int raidid) { - if ((BUFQ_PEEK(&(raid_softc[raidid].buf_queue)) != NULL) && + if ((BUFQ_PEEK(raid_softc[raidid].buf_queue) != NULL) && raidPtrs[raidid]->openings > 0) { /* there is work to do */ return 0; |
