Add a 'BLK_EH_SCHEDULED' return code for blk-timeout to indicate that a delayed error recovery has been initiated. Signed-off-by: Hannes Reinecke <hare@xxxxxxx> --- drivers/scsi/scsi_error.c | 3 +++ include/linux/blkdev.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index f43de1e..96b4bb6 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -146,6 +146,9 @@ enum blk_eh_timer_return scsi_times_out(struct request *req) rtn = host->hostt->eh_timed_out(scmd); scmd->result |= DID_TIME_OUT << 16; + /* Check for delayed EH scheduling */ + if (rtn == BLK_EH_SCHEDULED) + return BLK_EH_NOT_HANDLED; if (unlikely(rtn == BLK_EH_NOT_HANDLED && !scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD))) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 2fdb4a4..d846e2b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -238,6 +238,7 @@ enum blk_eh_timer_return { BLK_EH_NOT_HANDLED, BLK_EH_HANDLED, BLK_EH_RESET_TIMER, + BLK_EH_SCHEDULED, }; typedef enum blk_eh_timer_return (rq_timed_out_fn)(struct request *); -- 1.7.12.4 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html