If we want to support async IO polling, then we have to allow finding completions that aren't just for the one we are looking for. Always pass in -1 to the mq_ops->poll() helper, and have that return how many events were found in this poll loop.
Showing the changes to include/linux/blkdev.h (1 of 5 files). Show all
Unified · Split
| @@ -867,7 +867,7 @@ extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, · 866 unmodified lines | ||
| 867 | 867 | int blk_status_to_errno(blk_status_t status); |
| 868 | 868 | blk_status_t errno_to_blk_status(int errno); |
| 869 | 869 | |
| 870 | −bool blk_poll(struct request_queue *q, blk_qc_t cookie); | |
| 870 | +int blk_poll(struct request_queue *q, blk_qc_t cookie); | |
| 871 | 871 | |
| 872 | 872 | static inline struct request_queue *bdev_get_queue(struct block_device *bdev) |
| 873 | 873 | { |