summaryrefslogtreecommitdiffstats
path: root/block/blk.h
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2021-12-03 21:15:31 +0800
committerJens Axboe <axboe@kernel.dk>2021-12-03 14:51:29 -0700
commit2a904d00855f94cb85751e45fa494f225d44ae0d (patch)
tree0bcc141b19e61b4d536115e274c68da183ae9ff2 /block/blk.h
parent0a467d0fdd9594fbb449ebc93852533332c528fd (diff)
downloadlinux-2a904d00855f94cb85751e45fa494f225d44ae0d.tar.bz2
blk-mq: remove hctx_lock and hctx_unlock
Remove hctx_lock and hctx_unlock, and add one helper of blk_mq_run_dispatch_ops() to run code block defined in dispatch_ops with rcu/srcu read held. Compared with hctx_lock()/hctx_unlock(): 1) remove 2 branch to 1, so we just need to check (hctx->flags & BLK_MQ_F_BLOCKING) once when running one dispatch_ops 2) srcu_idx needn't to be touched in case of non-blocking 3) might_sleep_if() can be moved to the blocking branch Also put the added blk_mq_run_dispatch_ops() in private header, so that the following patch can use it out of blk-mq.c. Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20211203131534.3668411-2-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
0 files changed, 0 insertions, 0 deletions