diff options
author | Peter Galbavy <peter@cvs.openbsd.org> | 2000-01-11 18:02:24 +0000 |
---|---|---|
committer | Peter Galbavy <peter@cvs.openbsd.org> | 2000-01-11 18:02:24 +0000 |
commit | 664e80aabbf998c4dced640f7a07dea3eb05d7fb (patch) | |
tree | 5ba16126a92bb54320f99edac4646428b8550b15 /sys/dev/raidframe/rf_sstf.c | |
parent | ac29646a074f429b933ff79144d97262e0bc0527 (diff) |
sync with NetBSD
- removed threadid stuff
- removed unused files
- general tidyup
- you can no longer configure the same unit twice (without
de-configuring first of course).
Again, this has only been tested locally on IDE disks. Further testing
and feedback would be appreciated.
Diffstat (limited to 'sys/dev/raidframe/rf_sstf.c')
-rw-r--r-- | sys/dev/raidframe/rf_sstf.c | 71 |
1 files changed, 30 insertions, 41 deletions
diff --git a/sys/dev/raidframe/rf_sstf.c b/sys/dev/raidframe/rf_sstf.c index 107190ce46b..e603b98b859 100644 --- a/sys/dev/raidframe/rf_sstf.c +++ b/sys/dev/raidframe/rf_sstf.c @@ -1,5 +1,5 @@ -/* $OpenBSD: rf_sstf.c,v 1.2 1999/02/16 00:03:27 niklas Exp $ */ -/* $NetBSD: rf_sstf.c,v 1.3 1999/02/05 00:06:17 oster Exp $ */ +/* $OpenBSD: rf_sstf.c,v 1.3 2000/01/11 18:02:23 peter Exp $ */ +/* $NetBSD: rf_sstf.c,v 1.4 2000/01/08 23:45:05 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -40,8 +40,9 @@ #include "rf_sstf.h" #include "rf_debugMem.h" #include "rf_general.h" -#include "rf_threadid.h" #include "rf_options.h" +#include "rf_raid.h" +#include "rf_types.h" #define DIR_LEFT 1 #define DIR_RIGHT 2 @@ -295,11 +296,11 @@ rf_SstfEnqueue(qptr, req, priority) if (priority == RF_IO_LOW_PRIORITY) { if (rf_sstfDebug || rf_scanDebug || rf_cscanDebug) { RF_DiskQueue_t *dq; - int tid; - rf_get_threadid(tid); dq = (RF_DiskQueue_t *) req->queue; - printf("[%d] ENQ lopri %d,%d queues are %d,%d,%d\n", - tid, dq->row, dq->col, sstfq->left.qlen, sstfq->right.qlen, + printf("raid%d: ENQ lopri %d,%d queues are %d,%d,%d\n", + req->raidPtr->raidid, + dq->row, dq->col, + sstfq->left.qlen, sstfq->right.qlen, sstfq->lopri.qlen); } do_sstf_ord_q(&sstfq->lopri.queue, &sstfq->lopri.qtail, req); @@ -323,9 +324,7 @@ do_dequeue(queue, req) RF_DiskQueueData_t *req2; if (rf_sstfDebug || rf_scanDebug || rf_cscanDebug) { - int tid; - rf_get_threadid(tid); - printf("[%d] do_dequeue\n", tid); + printf("raid%d: do_dequeue\n", req->raidPtr->raidid); } if (req == queue->queue) { DO_HEAD_DEQ(req2, queue); @@ -356,13 +355,11 @@ rf_SstfDequeue(qptr) if (rf_sstfDebug) { RF_DiskQueue_t *dq; - int tid; - rf_get_threadid(tid); dq = (RF_DiskQueue_t *) req->queue; RF_ASSERT(QSUM(sstfq) == dq->queueLength); - printf("[%d] sstf: Dequeue %d,%d queues are %d,%d,%d\n", tid, - dq->row, dq->col, sstfq->left.qlen, sstfq->right.qlen, - sstfq->lopri.qlen); + printf("raid%d: sstf: Dequeue %d,%d queues are %d,%d,%d\n", + req->raidPtr->raidid, dq->row, dq->col, + sstfq->left.qlen, sstfq->right.qlen, sstfq->lopri.qlen); } if (sstfq->left.queue == NULL) { RF_ASSERT(sstfq->left.qlen == 0); @@ -373,16 +370,14 @@ rf_SstfDequeue(qptr) return (NULL); } if (rf_sstfDebug) { - int tid; - rf_get_threadid(tid); - printf("[%d] sstf: check for close lopri", tid); + printf("raid%d: sstf: check for close lopri", + req->raidPtr->raidid); } req = closest_to_arm(&sstfq->lopri, sstfq->last_sector, &sstfq->dir, sstfq->allow_reverse); if (rf_sstfDebug) { - int tid; - rf_get_threadid(tid); - printf("[%d] sstf: closest_to_arm said %lx", tid, (long) req); + printf("raid%d: sstf: closest_to_arm said %lx", + req->raidPtr->raidid, (long) req); } if (req == NULL) return (NULL); @@ -419,13 +414,11 @@ rf_ScanDequeue(qptr) if (rf_scanDebug) { RF_DiskQueue_t *dq; - int tid; - rf_get_threadid(tid); dq = (RF_DiskQueue_t *) req->queue; RF_ASSERT(QSUM(scanq) == dq->queueLength); - printf("[%d] scan: Dequeue %d,%d queues are %d,%d,%d\n", tid, - dq->row, dq->col, scanq->left.qlen, scanq->right.qlen, - scanq->lopri.qlen); + printf("raid%d: scan: Dequeue %d,%d queues are %d,%d,%d\n", + req->raidPtr->raidid, dq->row, dq->col, + scanq->left.qlen, scanq->right.qlen, scanq->lopri.qlen); } if (scanq->left.queue == NULL) { RF_ASSERT(scanq->left.qlen == 0); @@ -476,12 +469,11 @@ rf_CscanDequeue(qptr) RF_ASSERT(cscanq->dir == DIR_RIGHT); if (rf_cscanDebug) { RF_DiskQueue_t *dq; - int tid; - rf_get_threadid(tid); dq = (RF_DiskQueue_t *) req->queue; RF_ASSERT(QSUM(cscanq) == dq->queueLength); - printf("[%d] scan: Dequeue %d,%d queues are %d,%d,%d\n", tid, - dq->row, dq->col, cscanq->left.qlen, cscanq->right.qlen, + printf("raid%d: scan: Dequeue %d,%d queues are %d,%d,%d\n", + req->raidPtr->raidid, dq->row, dq->col, + cscanq->left.qlen, cscanq->right.qlen, cscanq->lopri.qlen); } if (cscanq->right.queue) { @@ -643,10 +635,9 @@ rf_SstfPromote(qptr, parityStripeID, which_ru) n = 0; if (rf_sstfDebug || rf_scanDebug || rf_cscanDebug) { - int tid; - rf_get_threadid(tid); - printf("[%d] promote %ld %d queues are %d,%d,%d\n", - tid, (long) parityStripeID, (int) which_ru, + printf("raid%d: promote %ld %d queues are %d,%d,%d\n", + r->raidPtr->raidid, (long) parityStripeID, + (int) which_ru, sstfq->left.qlen, sstfq->right.qlen, sstfq->lopri.qlen); @@ -654,9 +645,8 @@ rf_SstfPromote(qptr, parityStripeID, which_ru) for (r = sstfq->lopri.queue; r; r = next) { next = r->next; if (rf_sstfDebug || rf_scanDebug || rf_cscanDebug) { - int tid; - rf_get_threadid(tid); - printf("[%d] check promote %lx\n", tid, (long) r); + printf("raid%d: check promote %lx\n", + r->raidPtr->raidid, (long) r); } if ((r->parityStripeID == parityStripeID) && (r->which_ru == which_ru)) { @@ -666,10 +656,9 @@ rf_SstfPromote(qptr, parityStripeID, which_ru) } } if (rf_sstfDebug || rf_scanDebug || rf_cscanDebug) { - int tid; - rf_get_threadid(tid); - printf("[%d] promoted %d matching I/Os queues are %d,%d,%d\n", - tid, n, sstfq->left.qlen, sstfq->right.qlen, sstfq->lopri.qlen); + printf("raid%d: promoted %d matching I/Os queues are %d,%d,%d\n", + r->raidPtr->raidid, n, sstfq->left.qlen, + sstfq->right.qlen, sstfq->lopri.qlen); } return (n); } |