summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-11-15 13:54:31 +0000
committerbde <bde@FreeBSD.org>1998-11-15 13:54:31 +0000
commit7d319d0a3e8f9d38f58d991c6472f7135e8c4660 (patch)
tree4c99f88300b089e91f7bba695bbc55e7bab3b508 /sys
parentd1f01d4b14713d18ea7040b5dbdc0a2072e6b3df (diff)
downloadFreeBSD-src-7d319d0a3e8f9d38f58d991c6472f7135e8c4660.zip
FreeBSD-src-7d319d0a3e8f9d38f58d991c6472f7135e8c4660.tar.gz
Fixed the bug that caused negative busycounts in devstat. The
devstart_start_transaction() call is misplaced - it is after the wdustart() call that queues the transaction on the controller queue. Normally this doesn't matter because we're running at splbio() so nothing will look at the controller queue. However, obsolescent code for syncing labels sometimes slept after the transaction was started, so the transaction sometimes completed before it was [recorded as] started. This code was misplaced even for syncing labels. Move it to the right place. It should go away, but something may depend on its side effects.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/isa/wd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/i386/isa/wd.c b/sys/i386/isa/wd.c
index 5c17abf..85745cb 100644
--- a/sys/i386/isa/wd.c
+++ b/sys/i386/isa/wd.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
- * $Id: wd.c,v 1.177 1998/10/13 08:24:39 dg Exp $
+ * $Id: wd.c,v 1.178 1998/10/22 05:58:41 bde Exp $
*/
/* TODO:
@@ -664,17 +664,17 @@ wdstrategy(register struct buf *bp)
/* queue transfer on drive, activate drive and controller if idle */
s = splbio();
- bufqdisksort(&drive_queue[lunit], bp);
-
- if (wdutab[lunit].b_active == 0)
- wdustart(du); /* start drive */
-
/* Pick up changes made by readdisklabel(). */
if (du->dk_flags & DKFL_LABELLING && du->dk_state > RECAL) {
wdsleep(du->dk_ctrlr, "wdlab");
du->dk_state = WANTOPEN;
}
+ bufqdisksort(&drive_queue[lunit], bp);
+
+ if (wdutab[lunit].b_active == 0)
+ wdustart(du); /* start drive */
+
#ifdef CMD640
if (wdtab[du->dk_ctrlr_cmd640].b_active == 0)
#else
OpenPOWER on IntegriCloud