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>
This commit is contained in:
@@ -1896,7 +1896,7 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
|
||||
if (!(iocb->ki_flags & IOCB_HIPRI) ||
|
||||
!dio->submit.last_queue ||
|
||||
!blk_poll(dio->submit.last_queue,
|
||||
dio->submit.cookie))
|
||||
dio->submit.cookie, true))
|
||||
io_schedule();
|
||||
}
|
||||
__set_current_state(TASK_RUNNING);
|
||||
|
Reference in New Issue
Block a user