From 27968a91764bb1ad0d55401ea786d238a511aff3 Mon Sep 17 00:00:00 2001 From: Jeff Moyer Date: Tue, 23 Aug 2022 21:44:42 +0530 Subject: [PATCH] block: export blk_rq_is_poll Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237 commit c6e99ea482e2a9e1fef2488891242f9749584225 Author: Kanchan Joshi Date: Tue Aug 23 21:44:42 2022 +0530 block: export blk_rq_is_poll This is in preparation to support iopoll for nvme passthrough. Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20220823161443.49436-4-joshi.k@samsung.com Signed-off-by: Jens Axboe Signed-off-by: Jeff Moyer --- block/blk-mq.c | 3 ++- include/linux/blk-mq.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 32629b10fdd8..6f0e46e06707 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1353,7 +1353,7 @@ static enum rq_end_io_ret blk_end_sync_rq(struct request *rq, blk_status_t ret) return RQ_END_IO_NONE; } -static bool blk_rq_is_poll(struct request *rq) +bool blk_rq_is_poll(struct request *rq) { if (!rq->mq_hctx) return false; @@ -1361,6 +1361,7 @@ static bool blk_rq_is_poll(struct request *rq) return false; return true; } +EXPORT_SYMBOL_GPL(blk_rq_is_poll); static void blk_rq_poll_completion(struct request *rq, struct completion *wait) { diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 33720d1a6976..974b5691f842 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -1032,6 +1032,7 @@ int blk_rq_map_kern(struct request_queue *, struct request *, void *, int blk_rq_append_bio(struct request *rq, struct bio *bio); void blk_execute_rq_nowait(struct request *rq, bool at_head); blk_status_t blk_execute_rq(struct request *rq, bool at_head); +bool blk_rq_is_poll(struct request *rq); struct req_iterator { struct bvec_iter iter;