When timer run, if BLK_EH_RESET_TIMER returned by LLD, the retries of
block request, though defined, is not checked in both scsi middle
later and block layer.

Regulation of BLK_EH_RESET_TIMER could help LLD fiddle timer in
reasonable manner.

Signed-off-by: Hillf Danton <[email protected]>
---

--- a/drivers/scsi/scsi_error.c 2010-11-01 19:54:12.000000000 +0800
+++ b/drivers/scsi/scsi_error.c 2010-12-01 22:26:36.000000000 +0800
@@ -138,8 +138,15 @@ enum blk_eh_timer_return scsi_times_out(
        else if (scmd->device->host->hostt->eh_timed_out)
                rtn = scmd->device->host->hostt->eh_timed_out(scmd);

+       if (rtn == BLK_EH_RESET_TIMER)
+               if (req->retries-- > 0)
+                       return rtn;
+               else
+                       goto handled;
+
        if (unlikely(rtn == BLK_EH_NOT_HANDLED &&
                     !scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD))) {
+ handled:
                scmd->result |= DID_TIME_OUT << 16;
                rtn = BLK_EH_HANDLED;
        }
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to