mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jinlong Chen" <nickyc975@zju.edu.cn>
To: axboe@kernel.dk
Cc: hch@lst.de, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] elevator: printk a warning if switching to a new io scheduler fails
Date: Tue, 22 Nov 2022 22:55:46 +0800 (GMT+08:00)	[thread overview]
Message-ID: <17ab2daa.5b5b.1849fd681f2.Coremail.nickyc975@zju.edu.cn> (raw)
In-Reply-To: <d51ed0fb457db7a4f9cbb0dbce36d534e22be457.1669126766.git.nickyc975@zju.edu.cn>

> 
> printk a warning to indicate that the io scheduler has been set to none
> if switching to a new io scheduler fails.
> 
> Signed-off-by: Jinlong Chen <nickyc975@zju.edu.cn>
> ---
>  block/elevator.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/block/elevator.c b/block/elevator.c
> index 01aa9f38f22e..1fa45717b1d6 100644
> --- a/block/elevator.c
> +++ b/block/elevator.c
> @@ -683,6 +683,12 @@ int elevator_switch(struct request_queue *q, struct elevator_type *new_e)
>  out_unfreeze:
>  	blk_mq_unquiesce_queue(q);
>  	blk_mq_unfreeze_queue(q);
> +
> +	if (ret) {
> +		pr_warn("elv: switch to \"%s\" failed, falling back to \"none\"\n",
> +			new_e->elevator_name);
> +	}
> +
>  	return ret;
>  }
>  

Hi, Jens!

This patch is suggested by Christoph, but I forgot to add the Suggested-by
tag. Would you please add "Suggested-by: Christoph Hellwig <hch@lst.de>"
if you apply the patch?

Thanks!
Jinlong Chen

  reply	other threads:[~2022-11-22 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 14:21 [PATCH 0/4] random improvments and cleanups for elevator.c Jinlong Chen
2022-11-22 14:21 ` [PATCH 1/4] elevator: update the document of elevator_switch Jinlong Chen
2022-11-23  7:37   ` Christoph Hellwig
2022-11-22 14:21 ` [PATCH 2/4] elevator: printk a warning if switching to a new io scheduler fails Jinlong Chen
2022-11-22 14:55   ` Jinlong Chen [this message]
2022-11-23  7:37   ` Christoph Hellwig
2022-11-22 14:21 ` [PATCH 3/4] elevator: update the document of elevator_match Jinlong Chen
2022-11-23  7:37   ` Christoph Hellwig
2022-11-22 14:21 ` [PATCH 4/4] elevator: remove an outdated comment in elevator_change Jinlong Chen
2022-11-23  7:38   ` Christoph Hellwig
2022-11-23 13:53 ` [PATCH 0/4] random improvments and cleanups for elevator.c Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17ab2daa.5b5b.1849fd681f2.Coremail.nickyc975@zju.edu.cn \
    --to=nickyc975@zju.edu.cn \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®