Thread (2 messages) 2 messages, 2 authors, 2002-09-12

Re: [PATCH 2/4] 2.4 SCSI error handling fixes

From: Mike Anderson <hidden>
Date: 2002-09-12 19:31:14

Russell King [rmk@arm.linux.org.uk] wrote:
On Thu, Sep 12, 2002 at 02:18:06PM -0400, Doug Ledford wrote:
quoted
On Thu, Sep 12, 2002 at 07:13:54PM +0100, Russell King wrote:
quoted
-	scsi_setup_cmd_retry(SCpnt);
-	scsi_send_eh_cmnd(SCpnt, SCpnt->timeout_per_command);
+	do {
+		scsi_setup_cmd_retry(SCpnt);
+		scsi_send_eh_cmnd(SCpnt, SCpnt->timeout_per_command);
+	} while (SCpnt->eh_state == NEEDS_RETRY);
quoted
+		 * If the SCSI device responded with "logical unit
+		 * is in process of becoming ready", we need to
+		 * retry this command.
+		 */
+	} while (SCpnt->eh_state == NEEDS_RETRY);
quoted
+		/*
+		 * If the SCSI device responded with "logical unit
+		 * is in process of becoming ready", we need to
+		 * retry this command.
+		 */
+	} while (SCpnt->eh_state == NEEDS_RETRY);
quoted
 		default:
-			SCpnt->eh_state = FAILED;
+			ret = FAILED;
+			/*FALLTHROUGH*/
+		case FAILED:
+		case NEEDS_RETRY:
+		case SUCCESS:
+			SCpnt->eh_state = ret;
 			break;
 		}
 	} else {
I don't see any bounding here.  You *have* to bound this.  It is not that 
uncommon for a device to report "logical unit is in the process of 
becoming ready" forever on certain types of hardware failures.  Without 
bounding, we won't ever give up on it.
Shrug.  I've not changed the behaviour here.  I've just fixed the ONE
problem where we reissue the command back to the HBA driver with stale
state information.  I never claimed that it fixed ALL bugs.

I'm afraid that I'm going to have to leave the other bugs are for
someone else to address; I've already spent too long on this issue.
In 2.5 we are carrying a change in scsi_eh_completed_normally (I believe
this came from  Andries.Brouwer@cwi.nl as I cannot find another
reference to it) that limits the number of retries. 

Though this is modifying the original cmds retry count which I do not
believe it is a good thing at least it stops the loop. I know retries
are going to change, but until then I made a similar adjustment to my
scsi_error cleanup and will repost shortly.

-andmike
-- 
Michael Anderson
andmike@us.ibm.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help