]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - block/blk-mq.c
block: make blk_poll() take a parameter on whether to spin or not
authorJens Axboe <axboe@kernel.dk>
Mon, 26 Nov 2018 15:24:43 +0000 (08:24 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Nov 2018 15:25:53 +0000 (08:25 -0700)
commit0a1b8b87d064a47fad9ec475316002da28559207
tree9bc87a52b3fcc1f476d52ae94d6bb7e69e2bfd94
parente7d943910719b44738e86f91a26a64e3b61ae419
block: make blk_poll() take a parameter on whether to spin or not

blk_poll() has always kept spinning until it found an IO. This is
fine for SYNC polling, since we need to find one request we have
pending, but in preparation for ASYNC polling it can be beneficial
to just check if we have any entries available or not.

Existing callers are converted to pass in 'spin == true', to retain
the old behavior.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk-mq.c
drivers/nvme/host/multipath.c
fs/block_dev.c
fs/direct-io.c
fs/iomap.c
include/linux/blkdev.h
mm/page_io.c