]> git.baikalelectronics.ru Git - kernel.git/commit
block: have ->poll_fn() return number of entries polled
authorJens Axboe <axboe@kernel.dk>
Tue, 6 Nov 2018 20:30:55 +0000 (13:30 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 19 Nov 2018 15:34:50 +0000 (08:34 -0700)
commit6150a72584a223d58d6a88d03c3a234f975110d8
tree8a87578fc6753431f9d698703ad0217392916f3e
parent39f3f4e69ba85268a116244fc10663203ad93cf9
block: have ->poll_fn() return number of entries polled

We currently only really support sync poll, ie poll with 1 IO in flight.
This prepares us for supporting async poll.

Note that the returned value isn't necessarily 100% accurate. If poll
races with IRQ completion, we assume that the fact that the task is now
runnable means we found at least one entry. In reality it could be more
than 1, or not even 1. This is fine, the caller will just need to take
this into account.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c
drivers/nvme/host/multipath.c
include/linux/blkdev.h