diff options
author | Jens Axboe <axboe@fb.com> | 2016-12-10 17:13:59 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-17 12:03:33 -0500 |
commit | c51ca6cf545bc51ad38bd50816bde37c647d608d (patch) | |
tree | 79e0999ed9e6f275be32d261533107ee31ed9436 /block/blk.h | |
parent | c5082b70adfe8e1ea1cf4a8eff92c9f260e364d2 (diff) |
block: move existing elevator ops to union
Prep patch for adding MQ ops as well, since doing anon unions with
named initializers doesn't work on older compilers.
Signed-off-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/block/blk.h b/block/blk.h index 041185e5f129..f46c0ac8ae3d 100644 --- a/block/blk.h +++ b/block/blk.h | |||
@@ -167,7 +167,7 @@ static inline struct request *__elv_next_request(struct request_queue *q) | |||
167 | return NULL; | 167 | return NULL; |
168 | } | 168 | } |
169 | if (unlikely(blk_queue_bypass(q)) || | 169 | if (unlikely(blk_queue_bypass(q)) || |
170 | !q->elevator->type->ops.elevator_dispatch_fn(q, 0)) | 170 | !q->elevator->type->ops.sq.elevator_dispatch_fn(q, 0)) |
171 | return NULL; | 171 | return NULL; |
172 | } | 172 | } |
173 | } | 173 | } |
@@ -176,16 +176,16 @@ static inline void elv_activate_rq(struct request_queue *q, struct request *rq) | |||
176 | { | 176 | { |
177 | struct elevator_queue *e = q->elevator; | 177 | struct elevator_queue *e = q->elevator; |
178 | 178 | ||
179 | if (e->type->ops.elevator_activate_req_fn) | 179 | if (e->type->ops.sq.elevator_activate_req_fn) |
180 | e->type->ops.elevator_activate_req_fn(q, rq); | 180 | e->type->ops.sq.elevator_activate_req_fn(q, rq); |
181 | } | 181 | } |
182 | 182 | ||
183 | static inline void elv_deactivate_rq(struct request_queue *q, struct request *rq) | 183 | static inline void elv_deactivate_rq(struct request_queue *q, struct request *rq) |
184 | { | 184 | { |
185 | struct elevator_queue *e = q->elevator; | 185 | struct elevator_queue *e = q->elevator; |
186 | 186 | ||
187 | if (e->type->ops.elevator_deactivate_req_fn) | 187 | if (e->type->ops.sq.elevator_deactivate_req_fn) |
188 | e->type->ops.elevator_deactivate_req_fn(q, rq); | 188 | e->type->ops.sq.elevator_deactivate_req_fn(q, rq); |
189 | } | 189 | } |
190 | 190 | ||
191 | #ifdef CONFIG_FAIL_IO_TIMEOUT | 191 | #ifdef CONFIG_FAIL_IO_TIMEOUT |