linux/block
Ming Lei 24f5a90f0d blk-mq: quiesce queue during switching io sched and updating nr_requests
Dispatch may still be in-progress after queue is frozen, so we have to
quiesce queue before switching IO scheduler and updating nr_requests.

Also when switching io schedulers, blk_mq_run_hw_queue() may still be
called somewhere(such as from nvme_reset_work()), and io scheduler's
per-hctx data may not be setup yet, so cause oops even inside
blk_mq_hctx_has_pending(), such as it can be run just between:

        ret = e->ops.mq.init_sched(q, e);
AND
        ret = e->ops.mq.init_hctx(hctx, i)

inside blk_mq_init_sched().

This reverts commit 7a148c2fcff8330(block: don't call blk_mq_quiesce_queue()
after queue is frozen) basically, and makes sure blk_mq_hctx_has_pending
won't be called if queue is quiesced.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Fixes: 7a148c2fcff83309(block: don't call blk_mq_quiesce_queue() after queue is frozen)
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-01-06 09:25:36 -07:00
..
partitions
Kconfig
Kconfig.iosched
Makefile
badblocks.c
bfq-cgroup.c
bfq-iosched.c block, bfq: remove batches of confusing ifdefs 2018-01-05 09:32:59 -07:00
bfq-iosched.h block, bfq: let a queue be merged only shortly after starting I/O 2018-01-05 09:26:09 -07:00
bfq-wf2q.c block, bfq: let a queue be merged only shortly after starting I/O 2018-01-05 09:26:09 -07:00
bio-integrity.c
bio.c block: move bio_alloc_pages() to bcache 2018-01-06 09:18:00 -07:00
blk-cgroup.c
blk-core.c blk-mq: quiesce queue before freeing queue 2018-01-06 09:25:36 -07:00
blk-exec.c
blk-flush.c
blk-integrity.c
blk-ioc.c
blk-lib.c
blk-map.c Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 12:08:18 -08:00
blk-merge.c block: blk-merge: remove unnecessary check 2018-01-06 09:18:00 -07:00
blk-mq-cpumap.c
blk-mq-debugfs.c
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c blk-mq: remove confusing comment of blk_mq_sched_dispatch_requests 2018-01-05 08:36:33 -07:00
blk-mq-sched.h
blk-mq-sysfs.c
blk-mq-tag.c blk-mq: improve heavily contended tag case 2017-12-22 11:09:37 -07:00
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c blk-mq: quiesce queue during switching io sched and updating nr_requests 2018-01-06 09:25:36 -07:00
blk-mq.h
blk-settings.c
blk-softirq.c
blk-stat.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
blk-stat.h
blk-sysfs.c blk-sysfs: remove NULL pointer checking in queue_wb_lat_store 2017-11-23 22:00:17 -07:00
blk-tag.c
blk-throttle.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
blk-timeout.c
blk-wbt.c blk-wbt: fix comments typo 2017-11-23 22:00:20 -07:00
blk-wbt.h
blk-zoned.c block: introduce zoned block devices zone write locking 2018-01-05 09:22:17 -07:00
blk.h
bounce.c block: bounce: don't access bio->bi_io_vec in copy_to_high_bio_irq 2018-01-06 09:18:00 -07:00
bsg-lib.c
bsg.c
cfq-iosched.c
cmdline-parser.c
compat_ioctl.c
deadline-iosched.c deadline-iosched: Introduce zone locking support 2018-01-05 09:22:17 -07:00
elevator.c blk-mq: quiesce queue during switching io sched and updating nr_requests 2018-01-06 09:25:36 -07:00
genhd.c block: genhd.c: fix message typo 2017-11-19 11:02:19 -07:00
ioctl.c
ioprio.c
kyber-iosched.c
mq-deadline.c mq-deadline: make it clear that __dd_dispatch_request() works on all hw queues 2018-01-06 09:23:11 -07:00
noop-iosched.c
opal_proto.h
partition-generic.c
scsi_ioctl.c
sed-opal.c
t10-pi.c