block: add a poll_fn callback to struct request_queue
That we we can also poll non blk-mq queues. Mostly needed for the NVMe multipath code, but could also be useful elsewhere. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:

committed by
Jens Axboe

parent
8ddcd65325
commit
ea435e1b93
@@ -407,7 +407,7 @@ int swap_readpage(struct page *page, bool do_poll)
|
||||
if (!READ_ONCE(bio->bi_private))
|
||||
break;
|
||||
|
||||
if (!blk_mq_poll(disk->queue, qc))
|
||||
if (!blk_poll(disk->queue, qc))
|
||||
break;
|
||||
}
|
||||
__set_current_state(TASK_RUNNING);
|
||||
|
Reference in New Issue
Block a user