Merge tag 'for-6.1/block-2022-10-03' of git://git.kernel.dk/linux
[linux-block.git] / include / linux / blk-mq.h
index 92294a5fb083612e578532362160c468d0e435c8..00a15808c137193ef74c63cbcbcee0f1ed23c784 100644 (file)
@@ -268,9 +268,16 @@ static inline void rq_list_move(struct request **src, struct request **dst,
        rq_list_add(dst, rq);
 }
 
+/**
+ * enum blk_eh_timer_return - How the timeout handler should proceed
+ * @BLK_EH_DONE: The block driver completed the command or will complete it at
+ *     a later time.
+ * @BLK_EH_RESET_TIMER: Reset the request timer and continue waiting for the
+ *     request to complete.
+ */
 enum blk_eh_timer_return {
-       BLK_EH_DONE,            /* drivers has completed the command */
-       BLK_EH_RESET_TIMER,     /* reset timer and try again */
+       BLK_EH_DONE,
+       BLK_EH_RESET_TIMER,
 };
 
 #define BLK_TAG_ALLOC_FIFO 0 /* allocate starting from 0 */
@@ -630,7 +637,7 @@ struct blk_mq_ops {
         * @map_queues: This allows drivers specify their own queue mapping by
         * overriding the setup-time function that builds the mq_map.
         */
-       int (*map_queues)(struct blk_mq_tag_set *set);
+       void (*map_queues)(struct blk_mq_tag_set *set);
 
 #ifdef CONFIG_BLK_DEBUG_FS
        /**
@@ -880,7 +887,7 @@ void blk_mq_freeze_queue_wait(struct request_queue *q);
 int blk_mq_freeze_queue_wait_timeout(struct request_queue *q,
                                     unsigned long timeout);
 
-int blk_mq_map_queues(struct blk_mq_queue_map *qmap);
+void blk_mq_map_queues(struct blk_mq_queue_map *qmap);
 void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues);
 
 void blk_mq_quiesce_queue_nowait(struct request_queue *q);
@@ -963,11 +970,11 @@ blk_status_t blk_insert_cloned_request(struct request *rq);
 
 struct rq_map_data {
        struct page **pages;
-       int page_order;
-       int nr_entries;
        unsigned long offset;
-       int null_mapped;
-       int from_user;
+       unsigned short page_order;
+       unsigned short nr_entries;
+       bool null_mapped;
+       bool from_user;
 };
 
 int blk_rq_map_user(struct request_queue *, struct request *,
@@ -980,6 +987,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;