aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-07-28 03:32:57 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 14:29:23 -0400
commitcb78b285c8f9d59b0d4e4f6a54c2977ce1d9b880 (patch)
treefec08d228e25103962c56f8cd43727d9d6af23c8 /block
parentcdd6026217c0e4cda2efce1bdc318661bef1f66f (diff)
[PATCH] Drop useless bio passing in may_queue/set_request API
It's not needed for anything, so kill the bio passing. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'block')
-rw-r--r--block/as-iosched.c2
-rw-r--r--block/cfq-iosched.c5
-rw-r--r--block/elevator.c9
-rw-r--r--block/ll_rw_blk.c9
4 files changed, 11 insertions, 14 deletions
diff --git a/block/as-iosched.c b/block/as-iosched.c
index 02eb9333898f..66015bc79e6f 100644
--- a/block/as-iosched.c
+++ b/block/as-iosched.c
@@ -1284,7 +1284,7 @@ static void as_work_handler(void *data)
1284 spin_unlock_irqrestore(q->queue_lock, flags); 1284 spin_unlock_irqrestore(q->queue_lock, flags);
1285} 1285}
1286 1286
1287static int as_may_queue(request_queue_t *q, int rw, struct bio *bio) 1287static int as_may_queue(request_queue_t *q, int rw)
1288{ 1288{
1289 int ret = ELV_MQUEUE_MAY; 1289 int ret = ELV_MQUEUE_MAY;
1290 struct as_data *ad = q->elevator->elevator_data; 1290 struct as_data *ad = q->elevator->elevator_data;
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 3c5fd9c2c205..2ac35aacbbf9 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1752,7 +1752,7 @@ __cfq_may_queue(struct cfq_data *cfqd, struct cfq_queue *cfqq,
1752 return ELV_MQUEUE_MAY; 1752 return ELV_MQUEUE_MAY;
1753} 1753}
1754 1754
1755static int cfq_may_queue(request_queue_t *q, int rw, struct bio *bio) 1755static int cfq_may_queue(request_queue_t *q, int rw)
1756{ 1756{
1757 struct cfq_data *cfqd = q->elevator->elevator_data; 1757 struct cfq_data *cfqd = q->elevator->elevator_data;
1758 struct task_struct *tsk = current; 1758 struct task_struct *tsk = current;
@@ -1817,8 +1817,7 @@ static void cfq_put_request(request_queue_t *q, struct request *rq)
1817 * Allocate cfq data structures associated with this request. 1817 * Allocate cfq data structures associated with this request.
1818 */ 1818 */
1819static int 1819static int
1820cfq_set_request(request_queue_t *q, struct request *rq, struct bio *bio, 1820cfq_set_request(request_queue_t *q, struct request *rq, gfp_t gfp_mask)
1821 gfp_t gfp_mask)
1822{ 1821{
1823 struct cfq_data *cfqd = q->elevator->elevator_data; 1822 struct cfq_data *cfqd = q->elevator->elevator_data;
1824 struct task_struct *tsk = current; 1823 struct task_struct *tsk = current;
diff --git a/block/elevator.c b/block/elevator.c
index 924b81b08f86..788d2d81994c 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -796,13 +796,12 @@ struct request *elv_former_request(request_queue_t *q, struct request *rq)
796 return NULL; 796 return NULL;
797} 797}
798 798
799int elv_set_request(request_queue_t *q, struct request *rq, struct bio *bio, 799int elv_set_request(request_queue_t *q, struct request *rq, gfp_t gfp_mask)
800 gfp_t gfp_mask)
801{ 800{
802 elevator_t *e = q->elevator; 801 elevator_t *e = q->elevator;
803 802
804 if (e->ops->elevator_set_req_fn) 803 if (e->ops->elevator_set_req_fn)
805 return e->ops->elevator_set_req_fn(q, rq, bio, gfp_mask); 804 return e->ops->elevator_set_req_fn(q, rq, gfp_mask);
806 805
807 rq->elevator_private = NULL; 806 rq->elevator_private = NULL;
808 return 0; 807 return 0;
@@ -816,12 +815,12 @@ void elv_put_request(request_queue_t *q, struct request *rq)
816 e->ops->elevator_put_req_fn(q, rq); 815 e->ops->elevator_put_req_fn(q, rq);
817} 816}
818 817
819int elv_may_queue(request_queue_t *q, int rw, struct bio *bio) 818int elv_may_queue(request_queue_t *q, int rw)
820{ 819{
821 elevator_t *e = q->elevator; 820 elevator_t *e = q->elevator;
822 821
823 if (e->ops->elevator_may_queue_fn) 822 if (e->ops->elevator_may_queue_fn)
824 return e->ops->elevator_may_queue_fn(q, rw, bio); 823 return e->ops->elevator_may_queue_fn(q, rw);
825 824
826 return ELV_MQUEUE_MAY; 825 return ELV_MQUEUE_MAY;
827} 826}
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index b94a396aa624..b1ea941f6dc3 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -2003,8 +2003,7 @@ static inline void blk_free_request(request_queue_t *q, struct request *rq)
2003} 2003}
2004 2004
2005static inline struct request * 2005static inline struct request *
2006blk_alloc_request(request_queue_t *q, int rw, struct bio *bio, 2006blk_alloc_request(request_queue_t *q, int rw, int priv, gfp_t gfp_mask)
2007 int priv, gfp_t gfp_mask)
2008{ 2007{
2009 struct request *rq = mempool_alloc(q->rq.rq_pool, gfp_mask); 2008 struct request *rq = mempool_alloc(q->rq.rq_pool, gfp_mask);
2010 2009
@@ -2018,7 +2017,7 @@ blk_alloc_request(request_queue_t *q, int rw, struct bio *bio,
2018 rq->cmd_flags = rw | REQ_ALLOCED; 2017 rq->cmd_flags = rw | REQ_ALLOCED;
2019 2018
2020 if (priv) { 2019 if (priv) {
2021 if (unlikely(elv_set_request(q, rq, bio, gfp_mask))) { 2020 if (unlikely(elv_set_request(q, rq, gfp_mask))) {
2022 mempool_free(rq, q->rq.rq_pool); 2021 mempool_free(rq, q->rq.rq_pool);
2023 return NULL; 2022 return NULL;
2024 } 2023 }
@@ -2109,7 +2108,7 @@ static struct request *get_request(request_queue_t *q, int rw, struct bio *bio,
2109 struct io_context *ioc = NULL; 2108 struct io_context *ioc = NULL;
2110 int may_queue, priv; 2109 int may_queue, priv;
2111 2110
2112 may_queue = elv_may_queue(q, rw, bio); 2111 may_queue = elv_may_queue(q, rw);
2113 if (may_queue == ELV_MQUEUE_NO) 2112 if (may_queue == ELV_MQUEUE_NO)
2114 goto rq_starved; 2113 goto rq_starved;
2115 2114
@@ -2157,7 +2156,7 @@ static struct request *get_request(request_queue_t *q, int rw, struct bio *bio,
2157 2156
2158 spin_unlock_irq(q->queue_lock); 2157 spin_unlock_irq(q->queue_lock);
2159 2158
2160 rq = blk_alloc_request(q, rw, bio, priv, gfp_mask); 2159 rq = blk_alloc_request(q, rw, priv, gfp_mask);
2161 if (unlikely(!rq)) { 2160 if (unlikely(!rq)) {
2162 /* 2161 /*
2163 * Allocation failed presumably due to memory. Undo anything 2162 * Allocation failed presumably due to memory. Undo anything