summaryrefslogtreecommitdiffstats
path: root/block/noop-iosched.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 08:32:39 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 08:32:39 -0800
commit333c47c847c90aaefde8b593054d9344106333b5 (patch)
treea4aec7b18ffe8d8dd88e027e5e4d84b2d838fe8a /block/noop-iosched.c
parent8f0cb147b2fb12427bf6abef7fed2b604557a41e (diff)
parentc6ea2ba7b8acdb6c4a883b2d38607c8078dff4ee (diff)
downloadtalos-op-linux-333c47c847c90aaefde8b593054d9344106333b5.tar.gz
talos-op-linux-333c47c847c90aaefde8b593054d9344106333b5.zip
Merge branch 'block-dir' of git://brick.kernel.dk/data/git/linux-2.6-block
Diffstat (limited to 'block/noop-iosched.c')
-rw-r--r--block/noop-iosched.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/block/noop-iosched.c b/block/noop-iosched.c
new file mode 100644
index 000000000000..e54f006e7e60
--- /dev/null
+++ b/block/noop-iosched.c
@@ -0,0 +1,46 @@
+/*
+ * elevator noop
+ */
+#include <linux/blkdev.h>
+#include <linux/elevator.h>
+#include <linux/bio.h>
+#include <linux/module.h>
+#include <linux/init.h>
+
+static void elevator_noop_add_request(request_queue_t *q, struct request *rq)
+{
+ rq->flags |= REQ_NOMERGE;
+ elv_dispatch_add_tail(q, rq);
+}
+
+static int elevator_noop_dispatch(request_queue_t *q, int force)
+{
+ return 0;
+}
+
+static struct elevator_type elevator_noop = {
+ .ops = {
+ .elevator_dispatch_fn = elevator_noop_dispatch,
+ .elevator_add_req_fn = elevator_noop_add_request,
+ },
+ .elevator_name = "noop",
+ .elevator_owner = THIS_MODULE,
+};
+
+static int __init noop_init(void)
+{
+ return elv_register(&elevator_noop);
+}
+
+static void __exit noop_exit(void)
+{
+ elv_unregister(&elevator_noop);
+}
+
+module_init(noop_init);
+module_exit(noop_exit);
+
+
+MODULE_AUTHOR("Jens Axboe");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("No-op IO scheduler");
OpenPOWER on IntegriCloud