From c6c52f4a71f50ff04a26ec657d2dedd602336bae Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 7 May 2015 02:21:35 +0000 Subject: [PATCH] Fix FAILFAST for pass-through requests It seems that REQ_QUIET and REQ_FAILFAST flags were confused. We want both printed information in the logs about backend devices IO faulires and fail fast pass-through requests without extra retries. Setting rq->retries along is not sufficient, because in the kernel code retries and the FAILFAST bitfields control behavior of different kernel pieces, so they need to be used together. For instance, blk_noretry_request() has no idea about rq->retries. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6204 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 79e1a9588..8f6b598a1 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -7422,7 +7422,9 @@ int scst_scsi_exec_async(struct scst_cmd *cmd, void *data, rq->timeout = cmd->timeout; rq->retries = cmd->retries; rq->end_io_data = sioc; - rq->cmd_flags |= REQ_QUIET; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35) + rq->cmd_flags |= REQ_FAILFAST_MASK; +#endif blk_execute_rq_nowait(rq->q, NULL, rq, (cmd->queue_type == SCST_CMD_QUEUE_HEAD_OF_QUEUE), scsi_end_async);