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
@@ -486,7 +486,7 @@ static struct bio *dio_await_one(struct dio *dio)
|
||||
dio->waiter = current;
|
||||
spin_unlock_irqrestore(&dio->bio_lock, flags);
|
||||
if (!(dio->iocb->ki_flags & IOCB_HIPRI) ||
|
||||
!blk_mq_poll(dio->bio_disk->queue, dio->bio_cookie))
|
||||
!blk_poll(dio->bio_disk->queue, dio->bio_cookie))
|
||||
io_schedule();
|
||||
/* wake up sets us TASK_RUNNING */
|
||||
spin_lock_irqsave(&dio->bio_lock, flags);
|
||||
|
Reference in New Issue
Block a user