diff options
author | Christoph Hellwig <hch@lst.de> | 2017-11-02 21:29:54 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-11-03 10:31:48 -0600 |
commit | ea435e1b9392a33deceaea2a16ebaa3397bead93 (patch) | |
tree | 73c80a2bfed2bc37cedc4d38d9534e231c61dbd8 /include/linux/blkdev.h | |
parent | 8ddcd653257c18a669fcb75ee42c37054908e0d6 (diff) | |
download | talos-op-linux-ea435e1b9392a33deceaea2a16ebaa3397bead93.tar.gz talos-op-linux-ea435e1b9392a33deceaea2a16ebaa3397bead93.zip |
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>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index fddda6a1f9b5..225617dd0a3f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -266,6 +266,7 @@ struct blk_queue_ctx; typedef void (request_fn_proc) (struct request_queue *q); typedef blk_qc_t (make_request_fn) (struct request_queue *q, struct bio *bio); +typedef bool (poll_q_fn) (struct request_queue *q, blk_qc_t); typedef int (prep_rq_fn) (struct request_queue *, struct request *); typedef void (unprep_rq_fn) (struct request_queue *, struct request *); @@ -408,6 +409,7 @@ struct request_queue { request_fn_proc *request_fn; make_request_fn *make_request_fn; + poll_q_fn *poll_fn; prep_rq_fn *prep_rq_fn; unprep_rq_fn *unprep_rq_fn; softirq_done_fn *softirq_done_fn; @@ -975,7 +977,7 @@ extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, int blk_status_to_errno(blk_status_t status); blk_status_t errno_to_blk_status(int errno); -bool blk_mq_poll(struct request_queue *q, blk_qc_t cookie); +bool blk_poll(struct request_queue *q, blk_qc_t cookie); static inline struct request_queue *bdev_get_queue(struct block_device *bdev) { |