blk-mq: do not initialize req->special
[deliverable/linux.git] / block / blk-mq.h
CommitLineData
320ae51f
JA
1#ifndef INT_BLK_MQ_H
2#define INT_BLK_MQ_H
3
4struct blk_mq_ctx {
5 struct {
6 spinlock_t lock;
7 struct list_head rq_list;
8 } ____cacheline_aligned_in_smp;
9
10 unsigned int cpu;
11 unsigned int index_hw;
12 unsigned int ipi_redirect;
13
14 /* incremented at dispatch time */
15 unsigned long rq_dispatched[2];
16 unsigned long rq_merged;
17
18 /* incremented at completion time */
19 unsigned long ____cacheline_aligned_in_smp rq_completed[2];
20
21 struct request_queue *queue;
22 struct kobject kobj;
23};
24
30a91cb4 25void __blk_mq_complete_request(struct request *rq);
320ae51f
JA
26void blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async);
27void blk_mq_init_flush(struct request_queue *q);
43a5e4e2 28void blk_mq_drain_queue(struct request_queue *q);
3edcc0ce 29void blk_mq_free_queue(struct request_queue *q);
320ae51f
JA
30
31/*
32 * CPU hotplug helpers
33 */
34struct blk_mq_cpu_notifier;
35void blk_mq_init_cpu_notifier(struct blk_mq_cpu_notifier *notifier,
36 void (*fn)(void *, unsigned long, unsigned int),
37 void *data);
38void blk_mq_register_cpu_notifier(struct blk_mq_cpu_notifier *notifier);
39void blk_mq_unregister_cpu_notifier(struct blk_mq_cpu_notifier *notifier);
40void blk_mq_cpu_init(void);
676141e4
JA
41void blk_mq_enable_hotplug(void);
42void blk_mq_disable_hotplug(void);
320ae51f
JA
43
44/*
45 * CPU -> queue mappings
46 */
47struct blk_mq_reg;
48extern unsigned int *blk_mq_make_queue_map(struct blk_mq_reg *reg);
49extern int blk_mq_update_queue_map(unsigned int *map, unsigned int nr_queues);
50
51void blk_mq_add_timer(struct request *rq);
52
53#endif
This page took 0.034583 seconds and 5 git commands to generate.