[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0810271605190.2190-100000@iolanthe.rowland.org>
Date: Mon, 27 Oct 2008 16:10:02 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Luciano Rocha <luciano@...otux.com>
cc: James Bottomley <James.Bottomley@...senPartnership.com>,
"Rafael J. Wysocki" <rjw@...k.pl>,
Linux-Kernel <linux-kernel@...r.kernel.org>,
USB list <linux-usb@...r.kernel.org>,
SCSI development list <linux-scsi@...r.kernel.org>
Subject: Re: usb hdd problems with 2.6.27.2
On Mon, 27 Oct 2008, Luciano Rocha wrote:
> > The patches are here:
> >
> > http://marc.info/?l=linux-scsi&m=122443015406309&w=2
> >
> > They are based on 2.6.27, not 2.6.28-rc.
>
> I've tested them (on 2.6.27.4), but I still get the bug. That email mentions:
> "Neither patch addresses the infinite-retry problem; I wanted
> to keep the issues separate."
>
> So am I missing some other patch?
>
> 2.6.28-rc2 is also buggy.
Okay, I tried the same sort of experiment in 2.6.27.4 and got the same
result as you did. I was able to fix it by applying the 8bfa24727
commit mentioned earlier together with the patch below.
Now, I'm pretty sure this is not the ideal solution. Fixing the block
core would be better. Still, it does indicate for sure that there's a
real problem.
It's worth noting that the test added to scsi_requeue_command()
succeeds every time, that is, req->retries is always 0. Clearly more
work is needed.
Alan Stern
Index: 2.6.27.4/drivers/scsi/scsi_lib.c
===================================================================
--- 2.6.27.4.orig/drivers/scsi/scsi_lib.c
+++ 2.6.27.4/drivers/scsi/scsi_lib.c
@@ -611,6 +611,11 @@ static void scsi_requeue_command(struct
struct request *req = cmd->request;
unsigned long flags;
+ if (--req->retries <= 0) {
+ blk_end_request(req, -EIO, blk_rq_bytes(req));
+ scsi_next_command(cmd);
+ return;
+ }
scsi_unprep_request(req);
spin_lock_irqsave(q->queue_lock, flags);
blk_requeue_request(q, req);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists