From: Jens Axboe Date: Mon, 10 Dec 2018 00:45:40 +0000 (-0700) Subject: Merge tag 'v4.20-rc6' into for-4.21/block X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=96f774106ed48808a5e314741e3414c617d14460;p=openwrt%2Fstaging%2Fblogic.git Merge tag 'v4.20-rc6' into for-4.21/block Pull in v4.20-rc6 to resolve the conflict in NVMe, but also to get the two corruption fixes. We're going to be overhauling the direct dispatch path, and we need to do that on top of the changes we made for that in mainline. Signed-off-by: Jens Axboe --- 96f774106ed48808a5e314741e3414c617d14460 diff --cc block/blk-mq.c index 7f478ae288af,6a7566244de3..b645275dfe5f --- a/block/blk-mq.c +++ b/block/blk-mq.c @@@ -1845,9 -1778,9 +1845,9 @@@ static void blk_mq_try_issue_directly(s hctx_lock(hctx, &srcu_idx); - ret = __blk_mq_try_issue_directly(hctx, rq, cookie, false); + ret = __blk_mq_try_issue_directly(hctx, rq, cookie, false, true); if (ret == BLK_STS_RESOURCE || ret == BLK_STS_DEV_RESOURCE) - blk_mq_sched_insert_request(rq, false, true, false); + blk_mq_request_bypass_insert(rq, true); else if (ret != BLK_STS_OK) blk_mq_end_request(rq, ret); diff --cc drivers/nvme/host/core.c index f90576862736,962012135b62..1310753a01e5 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@@ -856,8 -843,13 +858,14 @@@ static void nvme_keep_alive_end_io(stru return; } + ctrl->comp_seen = false; - schedule_delayed_work(&ctrl->ka_work, ctrl->kato * HZ); + spin_lock_irqsave(&ctrl->lock, flags); + if (ctrl->state == NVME_CTRL_LIVE || + ctrl->state == NVME_CTRL_CONNECTING) + startka = true; + spin_unlock_irqrestore(&ctrl->lock, flags); + if (startka) + schedule_delayed_work(&ctrl->ka_work, ctrl->kato * HZ); } static int nvme_keep_alive(struct nvme_ctrl *ctrl)