Skip to content

Commit

Permalink
block: Warn if elevator= parameter is used
Browse files Browse the repository at this point in the history
With transition to blk-mq, the elevator= kernel argument was removed as
it makes less and less sense with the current variety of devices.  Since
this may surprise some users and there are advices on the Internet that
still suggest to use it, let's at least warn if the parameter is used.

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
jankara authored and axboe committed Nov 6, 2019
1 parent fa53228 commit f8db383
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,3 +831,12 @@ struct request *elv_rb_latter_request(struct request_queue *q,
return NULL;
}
EXPORT_SYMBOL(elv_rb_latter_request);

static int __init elevator_setup(char *str)
{
pr_warn("Kernel parameter elevator= does not have any effect anymore.\n"
"Please use sysfs to set IO scheduler for individual devices.\n");
return 1;
}

__setup("elevator=", elevator_setup);

0 comments on commit f8db383

Please sign in to comment.