diff mbox

[3/3] mq-deadline: add 'deadline' as a name alias

Message ID 1508954687-3204-4-git-send-email-axboe@kernel.dk (mailing list archive)
State New, archived
Headers show

Commit Message

Jens Axboe Oct. 25, 2017, 6:04 p.m. UTC
The scheduler framework now supports looking up the appropriate
scheduler with the {name,mq} tupple. We can register mq-deadline
with the alias of 'deadline', so that switching to 'deadline'
will do the right thing based on the type of driver attached to
it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 block/mq-deadline.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Omar Sandoval Oct. 25, 2017, 6:34 p.m. UTC | #1
On Wed, Oct 25, 2017 at 12:04:47PM -0600, Jens Axboe wrote:
> The scheduler framework now supports looking up the appropriate
> scheduler with the {name,mq} tupple. We can register mq-deadline
> with the alias of 'deadline', so that switching to 'deadline'
> will do the right thing based on the type of driver attached to
> it.

Reviewed-by: Omar Sandoval <osandov@fb.com>

A blktest for this would be nice.

> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> ---
>  block/mq-deadline.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/block/mq-deadline.c b/block/mq-deadline.c
> index a1cad4331edd..0179e484ec98 100644
> --- a/block/mq-deadline.c
> +++ b/block/mq-deadline.c
> @@ -657,6 +657,7 @@ static struct elevator_type mq_deadline = {
>  #endif
>  	.elevator_attrs = deadline_attrs,
>  	.elevator_name = "mq-deadline",
> +	.elevator_alias = "deadline",
>  	.elevator_owner = THIS_MODULE,
>  };
>  MODULE_ALIAS("mq-deadline-iosched");
> -- 
> 2.7.4
>
Jens Axboe Oct. 25, 2017, 6:36 p.m. UTC | #2
On 10/25/2017 11:34 AM, Omar Sandoval wrote:
> On Wed, Oct 25, 2017 at 12:04:47PM -0600, Jens Axboe wrote:
>> The scheduler framework now supports looking up the appropriate
>> scheduler with the {name,mq} tupple. We can register mq-deadline
>> with the alias of 'deadline', so that switching to 'deadline'
>> will do the right thing based on the type of driver attached to
>> it.
> 
> Reviewed-by: Omar Sandoval <osandov@fb.com>
> 
> A blktest for this would be nice.

Not really critical imho, as it's not fixing a "real" issue in
terms of an oops, hang, or similar.
diff mbox

Patch

diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index a1cad4331edd..0179e484ec98 100644
--- a/block/mq-deadline.c
+++ b/block/mq-deadline.c
@@ -657,6 +657,7 @@  static struct elevator_type mq_deadline = {
 #endif
 	.elevator_attrs = deadline_attrs,
 	.elevator_name = "mq-deadline",
+	.elevator_alias = "deadline",
 	.elevator_owner = THIS_MODULE,
 };
 MODULE_ALIAS("mq-deadline-iosched");