summaryrefslogtreecommitdiff
path: root/sys/scsi/sd.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-01-09 21:12:07 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-01-09 21:12:07 +0000
commitf530cae7088891a665f204338f63af142add258d (patch)
treefeb8d0b54b8095978b84e1bab3d58158530fdcaf /sys/scsi/sd.c
parent0acd547b2e00191799edec5d0d889e5a8cd99aa1 (diff)
dont try to prevent multiple concurrent runs of a devices start routine
by setting flags around the loop. there is a race which can prevent necessary work being completed by any of the currently running instances of xxstart. the caveat with the removal of this code is because multiple xxstarts can be running at the same time they can cause io reordering, but that is less of a problem than no io. found by and fix tested by claudio@ debugged with krw@ claudio@ beck@ deraadt@
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r--sys/scsi/sd.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 35ee5bfcf79..f00ca42ab28 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.175 2010/01/05 01:21:34 dlg Exp $ */
+/* $OpenBSD: sd.c,v 1.176 2010/01/09 21:12:06 dlg Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -693,15 +693,6 @@ sdstart(void *v)
SC_DEBUG(link, SDEV_DB2, ("sdstart\n"));
- mtx_enter(&sc->sc_start_mtx);
- if (ISSET(sc->flags, SDF_STARTING)) {
- mtx_leave(&sc->sc_start_mtx);
- return;
- }
-
- SET(sc->flags, SDF_STARTING);
- mtx_leave(&sc->sc_start_mtx);
-
CLR(sc->flags, SDF_WAITING);
while (!ISSET(sc->flags, SDF_WAITING) &&
(bp = sd_buf_dequeue(sc)) != NULL) {
@@ -768,10 +759,6 @@ sdstart(void *v)
scsi_xs_exec(xs);
}
-
- mtx_enter(&sc->sc_start_mtx);
- CLR(sc->flags, SDF_STARTING);
- mtx_leave(&sc->sc_start_mtx);
}
void