diff options
| author | Andrew Morton <akpm@osdl.org> | 2003-07-17 19:28:24 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-17 19:28:24 -0700 |
| commit | c4aeb06d199f0da77b30bc1ecf8f474aa4b4703a (patch) | |
| tree | 7637c371eb9c1f6a192f57e599a2c98e6516515d | |
| parent | c56671f74801b1ec75dc80198936426e7d917919 (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.c | 1 |
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) |
