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 | 4 ++++ include/linux/blkdev.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index d708067..e76e895 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -163,6 +163,10 @@ enum blk_eh_timer_return scsi_times_out(struct request *req) else if (host->hostt->eh_timed_out) rtn = host->hostt->eh_timed_out(scmd); + /* Check for asynchronous command aborts */ + if (rtn == BLK_EH_SCHEDULED) + return BLK_EH_NOT_HANDLED; + scmd->result |= DID_TIME_OUT << 16; if (unlikely(rtn == BLK_EH_NOT_HANDLED && 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