]> err.no Git - linux-2.6/commitdiff
[PATCH] elevator=as back-compatibility
authorChuck Ebbert <76306.1226@compuserve.com>
Tue, 17 Jan 2006 06:14:55 +0000 (22:14 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 17 Jan 2006 07:15:32 +0000 (23:15 -0800)
As of 2.6.15 you need to use "anticipatory" instead of "as".  Fix that up
so that `elevator=as' still works.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Jens Axboe <axboe@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
block/elevator.c

index 1d0759178e4b49710c6cb90c538fc6d0c897e126..e8025b2ec54a508a1bd5db7a23c9ff687e8923b4 100644 (file)
@@ -149,6 +149,13 @@ static void elevator_setup_default(void)
        if (!chosen_elevator[0])
                strcpy(chosen_elevator, CONFIG_DEFAULT_IOSCHED);
 
+       /*
+        * Be backwards-compatible with previous kernels, so users
+        * won't get the wrong elevator.
+        */
+       if (!strcmp(chosen_elevator, "as"))
+               strcpy(chosen_elevator, "anticipatory");
+
        /*
         * If the given scheduler is not available, fall back to no-op.
         */