[BLOCK] cfq-iosched: fix slice_left calculation
[linux-2.6-block.git] / block / noop-iosched.c
CommitLineData
1da177e4
LT
1/*
2 * elevator noop
3 */
4#include <linux/blkdev.h>
5#include <linux/elevator.h>
6#include <linux/bio.h>
7#include <linux/module.h>
8#include <linux/init.h>
9
b4878f24 10static void elevator_noop_add_request(request_queue_t *q, struct request *rq)
1da177e4 11{
581c1b14 12 rq->flags |= REQ_NOMERGE;
b4878f24 13 elv_dispatch_add_tail(q, rq);
1da177e4
LT
14}
15
b4878f24 16static int elevator_noop_dispatch(request_queue_t *q, int force)
1da177e4 17{
b4878f24 18 return 0;
1da177e4
LT
19}
20
21static struct elevator_type elevator_noop = {
22 .ops = {
b4878f24 23 .elevator_dispatch_fn = elevator_noop_dispatch,
1da177e4
LT
24 .elevator_add_req_fn = elevator_noop_add_request,
25 },
26 .elevator_name = "noop",
27 .elevator_owner = THIS_MODULE,
28};
29
30static int __init noop_init(void)
31{
32 return elv_register(&elevator_noop);
33}
34
35static void __exit noop_exit(void)
36{
37 elv_unregister(&elevator_noop);
38}
39
40module_init(noop_init);
41module_exit(noop_exit);
42
43
44MODULE_AUTHOR("Jens Axboe");
45MODULE_LICENSE("GPL");
46MODULE_DESCRIPTION("No-op IO scheduler");