From: Jens Axboe Date: Mon, 12 Jun 2017 14:30:13 +0000 (-0600) Subject: Merge tag 'v4.12-rc5' into for-4.13/block X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8f66439eec46d652255b9351abebb540ee5b2fd9;p=openwrt%2Fstaging%2Fblogic.git Merge tag 'v4.12-rc5' into for-4.13/block We've already got a few conflicts and upcoming work depends on some of the changes that have gone into mainline as regression fixes for this series. Pull in 4.12-rc5 to resolve these conflicts and make it easier on down stream trees to continue working on 4.13 changes. Signed-off-by: Jens Axboe --- 8f66439eec46d652255b9351abebb540ee5b2fd9 diff --cc block/blk-mq.c index 7af78b1e9db9,bb66c96850b1..da2f21961525 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@@ -1435,8 -1504,9 +1441,8 @@@ static void __blk_mq_try_issue_directly return; } - __blk_mq_requeue_request(rq); insert: - blk_mq_sched_insert_request(rq, false, true, false, may_sleep); + blk_mq_sched_insert_request(rq, false, run_queue, false, may_sleep); } static void blk_mq_try_issue_directly(struct blk_mq_hw_ctx *hctx, diff --cc drivers/nvme/host/rdma.c index 58d311e704e5,24397d306d53..131d76306e05 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@@ -1441,14 -1443,25 +1443,25 @@@ static inline int nvme_rdma_queue_is_re if (!blk_rq_is_passthrough(rq) || cmd->common.opcode != nvme_fabrics_command || - cmd->fabrics.fctype != nvme_fabrics_type_connect) - return false; + cmd->fabrics.fctype != nvme_fabrics_type_connect) { + /* + * reconnecting state means transport disruption, which + * can take a long time and even might fail permanently, + * so we can't let incoming I/O be requeued forever. + * fail it fast to allow upper layers a chance to + * failover. + */ + if (queue->ctrl->ctrl.state == NVME_CTRL_RECONNECTING) + return -EIO; + else + return -EAGAIN; + } } - return true; + return 0; } -static int nvme_rdma_queue_rq(struct blk_mq_hw_ctx *hctx, +static blk_status_t nvme_rdma_queue_rq(struct blk_mq_hw_ctx *hctx, const struct blk_mq_queue_data *bd) { struct nvme_ns *ns = hctx->queue->queuedata;