aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/elevator.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-10-28 10:48:16 -0400
committerJens Axboe <axboe@fb.com>2016-10-28 10:48:16 -0400
commitef295ecf090d3e86e5b742fc6ab34f1122a43773 (patch)
treee52e8be789b5654dfc43f626c50261f80615c03f /include/linux/elevator.h
parente806402130c9c494e22c73ae9ead4e79d2a5811c (diff)
block: better op and flags encoding
Now that we don't need the common flags to overflow outside the range of a 32-bit type we can encode them the same way for both the bio and request fields. This in addition allows us to place the operation first (and make some room for more ops while we're at it) and to stop having to shift around the operation values. In addition this allows passing around only one value in the block layer instead of two (and eventuall also in the file systems, but we can do that later) and thus clean up a lot of code. Last but not least this allows decreasing the size of the cmd_flags field in struct request to 32-bits. Various functions passing this value could also be updated, but I'd like to avoid the churn for now. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/elevator.h')
-rw-r--r--include/linux/elevator.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index e7f358d2e5fc..f219c9aed360 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -30,7 +30,7 @@ typedef int (elevator_dispatch_fn) (struct request_queue *, int);
30typedef void (elevator_add_req_fn) (struct request_queue *, struct request *); 30typedef void (elevator_add_req_fn) (struct request_queue *, struct request *);
31typedef struct request *(elevator_request_list_fn) (struct request_queue *, struct request *); 31typedef struct request *(elevator_request_list_fn) (struct request_queue *, struct request *);
32typedef void (elevator_completed_req_fn) (struct request_queue *, struct request *); 32typedef void (elevator_completed_req_fn) (struct request_queue *, struct request *);
33typedef int (elevator_may_queue_fn) (struct request_queue *, int, int); 33typedef int (elevator_may_queue_fn) (struct request_queue *, unsigned int);
34 34
35typedef void (elevator_init_icq_fn) (struct io_cq *); 35typedef void (elevator_init_icq_fn) (struct io_cq *);
36typedef void (elevator_exit_icq_fn) (struct io_cq *); 36typedef void (elevator_exit_icq_fn) (struct io_cq *);
@@ -139,7 +139,7 @@ extern struct request *elv_former_request(struct request_queue *, struct request
139extern struct request *elv_latter_request(struct request_queue *, struct request *); 139extern struct request *elv_latter_request(struct request_queue *, struct request *);
140extern int elv_register_queue(struct request_queue *q); 140extern int elv_register_queue(struct request_queue *q);
141extern void elv_unregister_queue(struct request_queue *q); 141extern void elv_unregister_queue(struct request_queue *q);
142extern int elv_may_queue(struct request_queue *, int, int); 142extern int elv_may_queue(struct request_queue *, unsigned int);
143extern void elv_completed_request(struct request_queue *, struct request *); 143extern void elv_completed_request(struct request_queue *, struct request *);
144extern int elv_set_request(struct request_queue *q, struct request *rq, 144extern int elv_set_request(struct request_queue *q, struct request *rq,
145 struct bio *bio, gfp_t gfp_mask); 145 struct bio *bio, gfp_t gfp_mask);