linux/block
Jens Axboe c616cbee97 blk-mq: punt failed direct issue to dispatch list
After the direct dispatch corruption fix, we permanently disallow direct
dispatch of non read/write requests. This works fine off the normal IO
path, as they will be retried like any other failed direct dispatch
request. But for the blk_insert_cloned_request() that only DM uses to
bypass the bottom level scheduler, we always first attempt direct
dispatch. For some types of requests, that's now a permanent failure,
and no amount of retrying will make that succeed. This results in a
livelock.

Instead of making special cases for what we can direct issue, and now
having to deal with DM solving the livelock while still retaining a BUSY
condition feedback loop, always just add a request that has been through
->queue_rq() to the hardware queue dispatch list. These are safe to use
as no merging can take place there. Additionally, if requests do have
prepped data from drivers, we aren't dependent on them not sharing space
in the request structure to safely add them to the IO scheduler lists.

This basically reverts ffe81d4532 and is based on a patch from Ming,
but with the list insert case covered as well.

Fixes: ffe81d4532 ("blk-mq: fix corruption with direct issue")
Cc: stable@vger.kernel.org
Suggested-by: Ming Lei <ming.lei@redhat.com>
Reported-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Ming Lei <ming.lei@redhat.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-12-07 08:16:11 -07:00
..
partitions
Kconfig
Kconfig.iosched
Makefile
badblocks.c
bfq-cgroup.c blkcg: revert blkcg cleanups series 2018-11-01 19:59:53 -06:00
bfq-iosched.c block, bfq: fix decrement of num_active_groups 2018-12-07 07:40:07 -07:00
bfq-iosched.h block, bfq: fix decrement of num_active_groups 2018-12-07 07:40:07 -07:00
bfq-wf2q.c block, bfq: fix decrement of num_active_groups 2018-12-07 07:40:07 -07:00
bio-integrity.c
bio.c block: copy ioprio in __bio_clone_fast() and bounce 2018-11-12 10:35:25 -07:00
blk-cgroup.c blkcg: revert blkcg cleanups series 2018-11-01 19:59:53 -06:00
blk-core.c SCSI: fix queue cleanup race before queue initialization is done 2018-11-14 08:19:10 -07:00
blk-exec.c
blk-flush.c blk-mq: change gfp flags to GFP_NOIO in blk_mq_realloc_hw_ctxs 2018-10-13 15:42:01 -06:00
blk-integrity.c
blk-ioc.c
blk-iolatency.c for-linus-20181102 2018-11-02 11:25:48 -07:00
blk-lib.c block: fix 32 bit overflow in __blkdev_issue_discard() 2018-11-14 08:17:18 -07:00
blk-map.c
blk-merge.c block: fix single range discard merge 2018-11-30 10:07:57 -07:00
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c block: add a report_zones method 2018-10-25 11:17:40 -06:00
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c
blk-mq-sched.h
blk-mq-sysfs.c
blk-mq-tag.c
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c blk-mq: punt failed direct issue to dispatch list 2018-12-07 08:16:11 -07:00
blk-mq.h
blk-pm.c
blk-pm.h
blk-rq-qos.c
blk-rq-qos.h
blk-settings.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
blk-softirq.c
blk-stat.c
blk-stat.h
blk-sysfs.c block: call rq_qos_exit() after queue is frozen 2018-10-31 08:40:36 -06:00
blk-tag.c
blk-throttle.c blkcg: revert blkcg cleanups series 2018-11-01 19:59:53 -06:00
blk-timeout.c
blk-wbt.c blk-wbt: wake up all when we scale up, not down 2018-10-11 13:31:28 -06:00
blk-wbt.h
blk-zoned.c block: Introduce blk_revalidate_disk_zones() 2018-10-25 11:17:40 -06:00
blk.h block: make sure discard bio is aligned with logical block size 2018-11-09 06:23:14 -07:00
bounce.c block: copy ioprio in __bio_clone_fast() and bounce 2018-11-12 10:35:25 -07:00
bsg-lib.c
bsg.c
cfq-iosched.c blkcg: revert blkcg cleanups series 2018-11-01 19:59:53 -06:00
cmdline-parser.c
compat_ioctl.c
deadline-iosched.c
elevator.c
genhd.c
ioctl.c block: Introduce BLKGETNRZONES ioctl 2018-10-25 11:17:40 -06:00
ioprio.c
kyber-iosched.c
mq-deadline.c
noop-iosched.c
opal_proto.h
partition-generic.c
scsi_ioctl.c
sed-opal.c
t10-pi.c