summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2003-07-17 19:28:24 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-07-17 19:28:24 -0700
commitc4aeb06d199f0da77b30bc1ecf8f474aa4b4703a (patch)
tree7637c371eb9c1f6a192f57e599a2c98e6516515d
parentc56671f74801b1ec75dc80198936426e7d917919 (diff)
[PATCH] "Fix" AS i/o hang with aacraid driver
From: Mark Haverkamp <markh@osdl.org> Mark says: "Daniel McNeil and I have been debugging a hang with the aacraid driver using the as I/O scheduler." We found that scsi_request_fn would de-queue a request and later re-queued it. This left the as_data->nr_dispatched variable in an inconsistent state (it was never being decremented back to zero). We added a call to elv_completed_request to clean up the state before re-adding the request. This has fixed our hang problem." It affects other SCSI drivers, but less frequently. We're assuming this is the cause of several "everything got stuck in D state" reports. A very long design discussion has ensued. We don't have a suitably tested fix ready so I think it is best to put Mark's one-liner in there for now, fix it for real when everyone gets back from OLS.
-rw-r--r--drivers/scsi/scsi_lib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 3997f09783e0..fd4eb8eb0be6 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1215,6 +1215,7 @@ static void scsi_request_fn(struct request_queue *q)
spin_lock_irq(q->queue_lock);
if (blk_rq_tagged(req))
blk_queue_end_tag(q, req);
+ elv_completed_request(q, req);
__elv_add_request(q, req, 0, 0);
sdev->device_busy--;
if(sdev->device_busy == 0)