aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/noop-iosched.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/noop-iosched.c')
-rw-r--r--drivers/block/noop-iosched.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/block/noop-iosched.c b/drivers/block/noop-iosched.c
index bc2252b6f2e5..f56b8edb06e4 100644
--- a/drivers/block/noop-iosched.c
+++ b/drivers/block/noop-iosched.c
@@ -7,38 +7,9 @@
7#include <linux/module.h> 7#include <linux/module.h>
8#include <linux/init.h> 8#include <linux/init.h>
9 9
10/*
11 * See if we can find a request that this buffer can be coalesced with.
12 */
13static int elevator_noop_merge(request_queue_t *q, struct request **req,
14 struct bio *bio)
15{
16 int ret;
17
18 ret = elv_try_last_merge(q, bio);
19 if (ret != ELEVATOR_NO_MERGE)
20 *req = q->last_merge;
21
22 return ret;
23}
24
25static void elevator_noop_merge_requests(request_queue_t *q, struct request *req,
26 struct request *next)
27{
28 list_del_init(&next->queuelist);
29}
30
31static void elevator_noop_add_request(request_queue_t *q, struct request *rq) 10static void elevator_noop_add_request(request_queue_t *q, struct request *rq)
32{ 11{
33 elv_dispatch_add_tail(q, rq); 12 elv_dispatch_add_tail(q, rq);
34
35 /*
36 * new merges must not precede this barrier
37 */
38 if (rq->flags & REQ_HARDBARRIER)
39 q->last_merge = NULL;
40 else if (!q->last_merge)
41 q->last_merge = rq;
42} 13}
43 14
44static int elevator_noop_dispatch(request_queue_t *q, int force) 15static int elevator_noop_dispatch(request_queue_t *q, int force)
@@ -48,8 +19,6 @@ static int elevator_noop_dispatch(request_queue_t *q, int force)
48 19
49static struct elevator_type elevator_noop = { 20static struct elevator_type elevator_noop = {
50 .ops = { 21 .ops = {
51 .elevator_merge_fn = elevator_noop_merge,
52 .elevator_merge_req_fn = elevator_noop_merge_requests,
53 .elevator_dispatch_fn = elevator_noop_dispatch, 22 .elevator_dispatch_fn = elevator_noop_dispatch,
54 .elevator_add_req_fn = elevator_noop_add_request, 23 .elevator_add_req_fn = elevator_noop_add_request,
55 }, 24 },