blk-mq.h (1aecfe4887713838c79bc52f774609a57db4f988) blk-mq.h (cb96a42cc1f50ba1c7b1e9b2343bec80b926107f)
1#ifndef INT_BLK_MQ_H
2#define INT_BLK_MQ_H
3
4struct blk_mq_tag_set;
5
6struct blk_mq_ctx {
7 struct {
8 spinlock_t lock;

--- 77 unchanged lines hidden (view full) ---

86 return __blk_mq_get_ctx(q, get_cpu());
87}
88
89static inline void blk_mq_put_ctx(struct blk_mq_ctx *ctx)
90{
91 put_cpu();
92}
93
1#ifndef INT_BLK_MQ_H
2#define INT_BLK_MQ_H
3
4struct blk_mq_tag_set;
5
6struct blk_mq_ctx {
7 struct {
8 spinlock_t lock;

--- 77 unchanged lines hidden (view full) ---

86 return __blk_mq_get_ctx(q, get_cpu());
87}
88
89static inline void blk_mq_put_ctx(struct blk_mq_ctx *ctx)
90{
91 put_cpu();
92}
93
94struct blk_mq_alloc_data {
95 /* input parameter */
96 struct request_queue *q;
97 gfp_t gfp;
98 bool reserved;
99
100 /* input & output parameter */
101 struct blk_mq_ctx *ctx;
102 struct blk_mq_hw_ctx *hctx;
103};
104
105static inline void blk_mq_set_alloc_data(struct blk_mq_alloc_data *data,
106 struct request_queue *q, gfp_t gfp, bool reserved,
107 struct blk_mq_ctx *ctx,
108 struct blk_mq_hw_ctx *hctx)
109{
110 data->q = q;
111 data->gfp = gfp;
112 data->reserved = reserved;
113 data->ctx = ctx;
114 data->hctx = hctx;
115}
116
94#endif
117#endif