summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-11-02 21:29:54 +0300
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:33:25 +0800
commitee4e916b2a0d22ba7688e8301d7af949f39c5554 (patch)
treefefd809e0d2c603b09f3f60abbedf1b10fac844d /include/linux/blkdev.h
parent7a56fe8e2e37fb198a0b3bcd120ca141302d99f7 (diff)
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> (cherry picked from commit ea435e1b9392a33deceaea2a16ebaa3397bead93)
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index af40de54a470..1b671119e2ae 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -284,6 +284,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 *);
@@ -426,6 +427,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;
@@ -1009,7 +1011,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)
{