blk-mq: Allow blocking queue tag iter callbacks
Keith Busch authored
commit 530ca2c9 upstream.

A recent commit runs tag iterator callbacks under the rcu read lock,
but existing callbacks do not satisfy the non-blocking requirement.
The commit intended to prevent an iterator from accessing a queue that's
being modified. This patch fixes the original issue by taking a queue
reference instead of reading it, which allows callbacks to make blocking
calls.

Fixes: f5bbbbe4

 ("blk-mq: sync the update nr_hw_queues with blk_mq_queue_tag_busy_iter")
Acked-by: default avatarJianchao Wang <jianchao.w.wang@oracle.com>
Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGiuliano Procida <gprocida@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
4764810c
Name Last commit Last update
..
partitions partitions/aix: fix usage of uninitialized lv_info and lvname structures
Kconfig block: Add T10 Protection Information functions
Kconfig.iosched blkcg: make CONFIG_BLK_CGROUP bool
Makefile block: Add T10 Protection Information functions
bio-integrity.c bio-integrity: Do not allocate integrity context for bio w/o data
bio.c block: do not leak memory in bio_copy_user_iov()
blk-cgroup.c block,blkcg: use __GFP_NOWARN for best-effort allocations in blkcg
blk-core.c blktrace: Fix potential deadlock between delete & sysfs ops
blk-exec.c block: move PM request support to IDE
blk-flush.c Revert "blk-flush: Queue through IO scheduler when flush not required"
blk-integrity.c block: fix blk_integrity_register to use template's interval_exp if not 0
blk-ioc.c mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd
blk-iopoll.c Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next
blk-lib.c block: re-add discard_granularity and alignment checks
blk-map.c Don't feed anything but regular iovec's to blk_rq_map_user_iov
blk-merge.c block: don't use bio->bi_vcnt to figure out segment number
blk-mq-cpu.c blk-mq: add file comments and update copyright notices
blk-mq-cpumap.c blk-mq: avoid inserting requests before establishing new mapping
blk-mq-sysfs.c blk-mq: make sure that line break can be printed
blk-mq-tag.c blk-mq: Allow blocking queue tag iter callbacks
blk-mq-tag.h blk-mq: factor out a helper to iterate all tags for a request_queue
blk-mq.c blk-mq: Allow timeouts to run while queue is freezing
blk-mq.h blk-mq: mark __blk_mq_complete_request() static
blk-settings.c block: fix an integer overflow in logical block size
blk-softirq.c block: fix regression with block enabled tagging
blk-sysfs.c
blk-tag.c
blk-throttle.c
blk-timeout.c
blk.h
bounce.c
bsg-lib.c
bsg.c
cfq-iosched.c
cmdline-parser.c
compat_ioctl.c
deadline-iosched.c
elevator.c
genhd.c
ioctl.c
ioprio.c
noop-iosched.c
partition-generic.c
scsi_ioctl.c
t10-pi.c