block: make blk_poll() take a parameter on whether to spin or not
authorJens Axboe <axboe@kernel.dk>
Mon, 19 Nov 2018 15:32:34 +0000 (08:32 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 19 Nov 2018 19:06:55 +0000 (12:06 -0700)
commit3c38ce3929edebfcdcd55029ddb812312b731f29
tree13cefff206a5bc04238d5c03b6077ba3f32fa682
parent7aadcc37e4e73ff722b4a2bcb9ac08f93cba51f7
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