aboutsummaryrefslogtreecommitdiffstats
path: root/block/as-iosched.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/as-iosched.c')
-rw-r--r--block/as-iosched.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/block/as-iosched.c b/block/as-iosched.c
index 3e316dd72529..dc715a562e14 100644
--- a/block/as-iosched.c
+++ b/block/as-iosched.c
@@ -796,7 +796,7 @@ static void update_write_batch(struct as_data *ad)
796 * as_completed_request is to be called when a request has completed and 796 * as_completed_request is to be called when a request has completed and
797 * returned something to the requesting process, be it an error or data. 797 * returned something to the requesting process, be it an error or data.
798 */ 798 */
799static void as_completed_request(request_queue_t *q, struct request *rq) 799static void as_completed_request(struct request_queue *q, struct request *rq)
800{ 800{
801 struct as_data *ad = q->elevator->elevator_data; 801 struct as_data *ad = q->elevator->elevator_data;
802 802
@@ -853,7 +853,8 @@ out:
853 * reference unless it replaces the request at somepart of the elevator 853 * reference unless it replaces the request at somepart of the elevator
854 * (ie. the dispatch queue) 854 * (ie. the dispatch queue)
855 */ 855 */
856static void as_remove_queued_request(request_queue_t *q, struct request *rq) 856static void as_remove_queued_request(struct request_queue *q,
857 struct request *rq)
857{ 858{
858 const int data_dir = rq_is_sync(rq); 859 const int data_dir = rq_is_sync(rq);
859 struct as_data *ad = q->elevator->elevator_data; 860 struct as_data *ad = q->elevator->elevator_data;
@@ -978,7 +979,7 @@ static void as_move_to_dispatch(struct as_data *ad, struct request *rq)
978 * read/write expire, batch expire, etc, and moves it to the dispatch 979 * read/write expire, batch expire, etc, and moves it to the dispatch
979 * queue. Returns 1 if a request was found, 0 otherwise. 980 * queue. Returns 1 if a request was found, 0 otherwise.
980 */ 981 */
981static int as_dispatch_request(request_queue_t *q, int force) 982static int as_dispatch_request(struct request_queue *q, int force)
982{ 983{
983 struct as_data *ad = q->elevator->elevator_data; 984 struct as_data *ad = q->elevator->elevator_data;
984 const int reads = !list_empty(&ad->fifo_list[REQ_SYNC]); 985 const int reads = !list_empty(&ad->fifo_list[REQ_SYNC]);
@@ -1139,7 +1140,7 @@ fifo_expired:
1139/* 1140/*
1140 * add rq to rbtree and fifo 1141 * add rq to rbtree and fifo
1141 */ 1142 */
1142static void as_add_request(request_queue_t *q, struct request *rq) 1143static void as_add_request(struct request_queue *q, struct request *rq)
1143{ 1144{
1144 struct as_data *ad = q->elevator->elevator_data; 1145 struct as_data *ad = q->elevator->elevator_data;
1145 int data_dir; 1146 int data_dir;
@@ -1167,7 +1168,7 @@ static void as_add_request(request_queue_t *q, struct request *rq)
1167 RQ_SET_STATE(rq, AS_RQ_QUEUED); 1168 RQ_SET_STATE(rq, AS_RQ_QUEUED);
1168} 1169}
1169 1170
1170static void as_activate_request(request_queue_t *q, struct request *rq) 1171static void as_activate_request(struct request_queue *q, struct request *rq)
1171{ 1172{
1172 WARN_ON(RQ_STATE(rq) != AS_RQ_DISPATCHED); 1173 WARN_ON(RQ_STATE(rq) != AS_RQ_DISPATCHED);
1173 RQ_SET_STATE(rq, AS_RQ_REMOVED); 1174 RQ_SET_STATE(rq, AS_RQ_REMOVED);
@@ -1175,7 +1176,7 @@ static void as_activate_request(request_queue_t *q, struct request *rq)
1175 atomic_dec(&RQ_IOC(rq)->aic->nr_dispatched); 1176 atomic_dec(&RQ_IOC(rq)->aic->nr_dispatched);
1176} 1177}
1177 1178
1178static void as_deactivate_request(request_queue_t *q, struct request *rq) 1179static void as_deactivate_request(struct request_queue *q, struct request *rq)
1179{ 1180{
1180 WARN_ON(RQ_STATE(rq) != AS_RQ_REMOVED); 1181 WARN_ON(RQ_STATE(rq) != AS_RQ_REMOVED);
1181 RQ_SET_STATE(rq, AS_RQ_DISPATCHED); 1182 RQ_SET_STATE(rq, AS_RQ_DISPATCHED);
@@ -1189,7 +1190,7 @@ static void as_deactivate_request(request_queue_t *q, struct request *rq)
1189 * is not empty - it is used in the block layer to check for plugging and 1190 * is not empty - it is used in the block layer to check for plugging and
1190 * merging opportunities 1191 * merging opportunities
1191 */ 1192 */
1192static int as_queue_empty(request_queue_t *q) 1193static int as_queue_empty(struct request_queue *q)
1193{ 1194{
1194 struct as_data *ad = q->elevator->elevator_data; 1195 struct as_data *ad = q->elevator->elevator_data;
1195 1196
@@ -1198,7 +1199,7 @@ static int as_queue_empty(request_queue_t *q)
1198} 1199}
1199 1200
1200static int 1201static int
1201as_merge(request_queue_t *q, struct request **req, struct bio *bio) 1202as_merge(struct request_queue *q, struct request **req, struct bio *bio)
1202{ 1203{
1203 struct as_data *ad = q->elevator->elevator_data; 1204 struct as_data *ad = q->elevator->elevator_data;
1204 sector_t rb_key = bio->bi_sector + bio_sectors(bio); 1205 sector_t rb_key = bio->bi_sector + bio_sectors(bio);
@@ -1216,7 +1217,8 @@ as_merge(request_queue_t *q, struct request **req, struct bio *bio)
1216 return ELEVATOR_NO_MERGE; 1217 return ELEVATOR_NO_MERGE;
1217} 1218}
1218 1219
1219static void as_merged_request(request_queue_t *q, struct request *req, int type) 1220static void as_merged_request(struct request_queue *q, struct request *req,
1221 int type)
1220{ 1222{
1221 struct as_data *ad = q->elevator->elevator_data; 1223 struct as_data *ad = q->elevator->elevator_data;
1222 1224
@@ -1234,7 +1236,7 @@ static void as_merged_request(request_queue_t *q, struct request *req, int type)
1234 } 1236 }
1235} 1237}
1236 1238
1237static void as_merged_requests(request_queue_t *q, struct request *req, 1239static void as_merged_requests(struct request_queue *q, struct request *req,
1238 struct request *next) 1240 struct request *next)
1239{ 1241{
1240 /* 1242 /*
@@ -1285,7 +1287,7 @@ static void as_work_handler(struct work_struct *work)
1285 spin_unlock_irqrestore(q->queue_lock, flags); 1287 spin_unlock_irqrestore(q->queue_lock, flags);
1286} 1288}
1287 1289
1288static int as_may_queue(request_queue_t *q, int rw) 1290static int as_may_queue(struct request_queue *q, int rw)
1289{ 1291{
1290 int ret = ELV_MQUEUE_MAY; 1292 int ret = ELV_MQUEUE_MAY;
1291 struct as_data *ad = q->elevator->elevator_data; 1293 struct as_data *ad = q->elevator->elevator_data;
@@ -1318,7 +1320,7 @@ static void as_exit_queue(elevator_t *e)
1318/* 1320/*
1319 * initialize elevator private data (as_data). 1321 * initialize elevator private data (as_data).
1320 */ 1322 */
1321static void *as_init_queue(request_queue_t *q) 1323static void *as_init_queue(struct request_queue *q)
1322{ 1324{
1323 struct as_data *ad; 1325 struct as_data *ad;
1324 1326