[PATCH] Kprobes: preempt_disable/enable() simplification
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / block / noop-iosched.c
blobe54f006e7e603475999cc2465278035ab547c0cf
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>
10 static void elevator_noop_add_request(request_queue_t *q, struct request *rq)
12 rq->flags |= REQ_NOMERGE;
13 elv_dispatch_add_tail(q, rq);
16 static int elevator_noop_dispatch(request_queue_t *q, int force)
18 return 0;
21 static struct elevator_type elevator_noop = {
22 .ops = {
23 .elevator_dispatch_fn = elevator_noop_dispatch,
24 .elevator_add_req_fn = elevator_noop_add_request,
26 .elevator_name = "noop",
27 .elevator_owner = THIS_MODULE,
30 static int __init noop_init(void)
32 return elv_register(&elevator_noop);
35 static void __exit noop_exit(void)
37 elv_unregister(&elevator_noop);
40 module_init(noop_init);
41 module_exit(noop_exit);
44 MODULE_AUTHOR("Jens Axboe");
45 MODULE_LICENSE("GPL");
46 MODULE_DESCRIPTION("No-op IO scheduler");