aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-07-24 03:28:11 -0400
committerJens Axboe <jens.axboe@oracle.com>2007-07-24 03:28:11 -0400
commit165125e1e480f9510a5ffcfbfee4e3ee38c05f23 (patch)
tree8009c8a5ff09e26dc2418d42f66ecafb055c52a2 /block/cfq-iosched.c
parentf695baf2df9e0413d3521661070103711545207a (diff)
[BLOCK] Get rid of request_queue_t typedef
Some of the code has been gradually transitioned to using the proper struct request_queue, but there's lots left. So do a full sweet of the kernel and get rid of this typedef and replace its uses with the proper type. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index d148ccbc36d1..54dc05439009 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -71,7 +71,7 @@ struct cfq_rb_root {
71 * Per block device queue structure 71 * Per block device queue structure
72 */ 72 */
73struct cfq_data { 73struct cfq_data {
74 request_queue_t *queue; 74 struct request_queue *queue;
75 75
76 /* 76 /*
77 * rr list of queues with requests and the count of them 77 * rr list of queues with requests and the count of them
@@ -197,7 +197,7 @@ CFQ_CFQQ_FNS(slice_new);
197CFQ_CFQQ_FNS(sync); 197CFQ_CFQQ_FNS(sync);
198#undef CFQ_CFQQ_FNS 198#undef CFQ_CFQQ_FNS
199 199
200static void cfq_dispatch_insert(request_queue_t *, struct request *); 200static void cfq_dispatch_insert(struct request_queue *, struct request *);
201static struct cfq_queue *cfq_get_queue(struct cfq_data *, int, 201static struct cfq_queue *cfq_get_queue(struct cfq_data *, int,
202 struct task_struct *, gfp_t); 202 struct task_struct *, gfp_t);
203static struct cfq_io_context *cfq_cic_rb_lookup(struct cfq_data *, 203static struct cfq_io_context *cfq_cic_rb_lookup(struct cfq_data *,
@@ -237,7 +237,7 @@ static inline void cfq_schedule_dispatch(struct cfq_data *cfqd)
237 kblockd_schedule_work(&cfqd->unplug_work); 237 kblockd_schedule_work(&cfqd->unplug_work);
238} 238}
239 239
240static int cfq_queue_empty(request_queue_t *q) 240static int cfq_queue_empty(struct request_queue *q)
241{ 241{
242 struct cfq_data *cfqd = q->elevator->elevator_data; 242 struct cfq_data *cfqd = q->elevator->elevator_data;
243 243
@@ -623,7 +623,7 @@ cfq_find_rq_fmerge(struct cfq_data *cfqd, struct bio *bio)
623 return NULL; 623 return NULL;
624} 624}
625 625
626static void cfq_activate_request(request_queue_t *q, struct request *rq) 626static void cfq_activate_request(struct request_queue *q, struct request *rq)
627{ 627{
628 struct cfq_data *cfqd = q->elevator->elevator_data; 628 struct cfq_data *cfqd = q->elevator->elevator_data;
629 629
@@ -641,7 +641,7 @@ static void cfq_activate_request(request_queue_t *q, struct request *rq)
641 cfqd->last_position = rq->hard_sector + rq->hard_nr_sectors; 641 cfqd->last_position = rq->hard_sector + rq->hard_nr_sectors;
642} 642}
643 643
644static void cfq_deactivate_request(request_queue_t *q, struct request *rq) 644static void cfq_deactivate_request(struct request_queue *q, struct request *rq)
645{ 645{
646 struct cfq_data *cfqd = q->elevator->elevator_data; 646 struct cfq_data *cfqd = q->elevator->elevator_data;
647 647
@@ -665,7 +665,8 @@ static void cfq_remove_request(struct request *rq)
665 } 665 }
666} 666}
667 667
668static int cfq_merge(request_queue_t *q, struct request **req, struct bio *bio) 668static int cfq_merge(struct request_queue *q, struct request **req,
669 struct bio *bio)
669{ 670{
670 struct cfq_data *cfqd = q->elevator->elevator_data; 671 struct cfq_data *cfqd = q->elevator->elevator_data;
671 struct request *__rq; 672 struct request *__rq;
@@ -679,7 +680,7 @@ static int cfq_merge(request_queue_t *q, struct request **req, struct bio *bio)
679 return ELEVATOR_NO_MERGE; 680 return ELEVATOR_NO_MERGE;
680} 681}
681 682
682static void cfq_merged_request(request_queue_t *q, struct request *req, 683static void cfq_merged_request(struct request_queue *q, struct request *req,
683 int type) 684 int type)
684{ 685{
685 if (type == ELEVATOR_FRONT_MERGE) { 686 if (type == ELEVATOR_FRONT_MERGE) {
@@ -690,7 +691,7 @@ static void cfq_merged_request(request_queue_t *q, struct request *req,
690} 691}
691 692
692static void 693static void
693cfq_merged_requests(request_queue_t *q, struct request *rq, 694cfq_merged_requests(struct request_queue *q, struct request *rq,
694 struct request *next) 695 struct request *next)
695{ 696{
696 /* 697 /*
@@ -703,7 +704,7 @@ cfq_merged_requests(request_queue_t *q, struct request *rq,
703 cfq_remove_request(next); 704 cfq_remove_request(next);
704} 705}
705 706
706static int cfq_allow_merge(request_queue_t *q, struct request *rq, 707static int cfq_allow_merge(struct request_queue *q, struct request *rq,
707 struct bio *bio) 708 struct bio *bio)
708{ 709{
709 struct cfq_data *cfqd = q->elevator->elevator_data; 710 struct cfq_data *cfqd = q->elevator->elevator_data;
@@ -913,7 +914,7 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd)
913/* 914/*
914 * Move request from internal lists to the request queue dispatch list. 915 * Move request from internal lists to the request queue dispatch list.
915 */ 916 */
916static void cfq_dispatch_insert(request_queue_t *q, struct request *rq) 917static void cfq_dispatch_insert(struct request_queue *q, struct request *rq)
917{ 918{
918 struct cfq_data *cfqd = q->elevator->elevator_data; 919 struct cfq_data *cfqd = q->elevator->elevator_data;
919 struct cfq_queue *cfqq = RQ_CFQQ(rq); 920 struct cfq_queue *cfqq = RQ_CFQQ(rq);
@@ -1093,7 +1094,7 @@ static int cfq_forced_dispatch(struct cfq_data *cfqd)
1093 return dispatched; 1094 return dispatched;
1094} 1095}
1095 1096
1096static int cfq_dispatch_requests(request_queue_t *q, int force) 1097static int cfq_dispatch_requests(struct request_queue *q, int force)
1097{ 1098{
1098 struct cfq_data *cfqd = q->elevator->elevator_data; 1099 struct cfq_data *cfqd = q->elevator->elevator_data;
1099 struct cfq_queue *cfqq; 1100 struct cfq_queue *cfqq;
@@ -1214,7 +1215,7 @@ static void cfq_exit_single_io_context(struct cfq_io_context *cic)
1214 struct cfq_data *cfqd = cic->key; 1215 struct cfq_data *cfqd = cic->key;
1215 1216
1216 if (cfqd) { 1217 if (cfqd) {
1217 request_queue_t *q = cfqd->queue; 1218 struct request_queue *q = cfqd->queue;
1218 1219
1219 spin_lock_irq(q->queue_lock); 1220 spin_lock_irq(q->queue_lock);
1220 __cfq_exit_single_io_context(cfqd, cic); 1221 __cfq_exit_single_io_context(cfqd, cic);
@@ -1775,7 +1776,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
1775 } 1776 }
1776} 1777}
1777 1778
1778static void cfq_insert_request(request_queue_t *q, struct request *rq) 1779static void cfq_insert_request(struct request_queue *q, struct request *rq)
1779{ 1780{
1780 struct cfq_data *cfqd = q->elevator->elevator_data; 1781 struct cfq_data *cfqd = q->elevator->elevator_data;
1781 struct cfq_queue *cfqq = RQ_CFQQ(rq); 1782 struct cfq_queue *cfqq = RQ_CFQQ(rq);
@@ -1789,7 +1790,7 @@ static void cfq_insert_request(request_queue_t *q, struct request *rq)
1789 cfq_rq_enqueued(cfqd, cfqq, rq); 1790 cfq_rq_enqueued(cfqd, cfqq, rq);
1790} 1791}
1791 1792
1792static void cfq_completed_request(request_queue_t *q, struct request *rq) 1793static void cfq_completed_request(struct request_queue *q, struct request *rq)
1793{ 1794{
1794 struct cfq_queue *cfqq = RQ_CFQQ(rq); 1795 struct cfq_queue *cfqq = RQ_CFQQ(rq);
1795 struct cfq_data *cfqd = cfqq->cfqd; 1796 struct cfq_data *cfqd = cfqq->cfqd;
@@ -1868,7 +1869,7 @@ static inline int __cfq_may_queue(struct cfq_queue *cfqq)
1868 return ELV_MQUEUE_MAY; 1869 return ELV_MQUEUE_MAY;
1869} 1870}
1870 1871
1871static int cfq_may_queue(request_queue_t *q, int rw) 1872static int cfq_may_queue(struct request_queue *q, int rw)
1872{ 1873{
1873 struct cfq_data *cfqd = q->elevator->elevator_data; 1874 struct cfq_data *cfqd = q->elevator->elevator_data;
1874 struct task_struct *tsk = current; 1875 struct task_struct *tsk = current;
@@ -1922,7 +1923,7 @@ static void cfq_put_request(struct request *rq)
1922 * Allocate cfq data structures associated with this request. 1923 * Allocate cfq data structures associated with this request.
1923 */ 1924 */
1924static int 1925static int
1925cfq_set_request(request_queue_t *q, struct request *rq, gfp_t gfp_mask) 1926cfq_set_request(struct request_queue *q, struct request *rq, gfp_t gfp_mask)
1926{ 1927{
1927 struct cfq_data *cfqd = q->elevator->elevator_data; 1928 struct cfq_data *cfqd = q->elevator->elevator_data;
1928 struct task_struct *tsk = current; 1929 struct task_struct *tsk = current;
@@ -1974,7 +1975,7 @@ static void cfq_kick_queue(struct work_struct *work)
1974{ 1975{
1975 struct cfq_data *cfqd = 1976 struct cfq_data *cfqd =
1976 container_of(work, struct cfq_data, unplug_work); 1977 container_of(work, struct cfq_data, unplug_work);
1977 request_queue_t *q = cfqd->queue; 1978 struct request_queue *q = cfqd->queue;
1978 unsigned long flags; 1979 unsigned long flags;
1979 1980
1980 spin_lock_irqsave(q->queue_lock, flags); 1981 spin_lock_irqsave(q->queue_lock, flags);
@@ -2072,7 +2073,7 @@ static void cfq_put_async_queues(struct cfq_data *cfqd)
2072static void cfq_exit_queue(elevator_t *e) 2073static void cfq_exit_queue(elevator_t *e)
2073{ 2074{
2074 struct cfq_data *cfqd = e->elevator_data; 2075 struct cfq_data *cfqd = e->elevator_data;
2075 request_queue_t *q = cfqd->queue; 2076 struct request_queue *q = cfqd->queue;
2076 2077
2077 cfq_shutdown_timer_wq(cfqd); 2078 cfq_shutdown_timer_wq(cfqd);
2078 2079
@@ -2098,7 +2099,7 @@ static void cfq_exit_queue(elevator_t *e)
2098 kfree(cfqd); 2099 kfree(cfqd);
2099} 2100}
2100 2101
2101static void *cfq_init_queue(request_queue_t *q) 2102static void *cfq_init_queue(struct request_queue *q)
2102{ 2103{
2103 struct cfq_data *cfqd; 2104 struct cfq_data *cfqd;
2104 2105