From: Jens Axboe <axboe@kernel.dk>
To: "markus@trippelsdorf.de" <markus@trippelsdorf.de>
Cc: "Elliott, Robert (Persistent Memory)" <elliott@hpe.com>,
Bart Van Assche <Bart.VanAssche@sandisk.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH] block: Remove leading whitespace and trailing newline in elevator switch error message
Date: Tue, 9 May 2017 08:57:36 -0600 [thread overview]
Message-ID: <5fa0d1bd-bf5c-0b5b-0c3f-ca138a06de5e@kernel.dk> (raw)
In-Reply-To: <20170509044209.GB17152@x4>
On 05/08/2017 10:42 PM, markus@trippelsdorf.de wrote:
> On 2017.05.08 at 20:22 -0600, Jens Axboe wrote:
>>
>>> On May 8, 2017, at 8:18 PM, Elliott, Robert (Persistent Memory)
>>> <elliott@hpe.com> wrote:
>>>> + printk(KERN_ERR "elevator: type %s not found\n", name);
>>> ...
>>>> + printk(KERN_ERR "elevator: switch to %s failed\n",
>>>
>>> That leaves two lines of error prints for a single error, and
>>> the second line doesn't convey additional information.
>>
>> Yeah good point. Honestly I think we should just kill both lines. None
>> of them add value.
>
> They at least help debugging of udev rules, e.g. on Gentoo they have:
>
> # set noop on solid state drives
> SUBSYSTEM=="block", ACTION=="add", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="noop"
>
> And this will of course fail for mq. But how will you notice it without
> any dmesg error message?
The echo to the sysfs file fails. udev should report such failures. Using
dmesg as the channel to report and discover errors like that is not a
great idea, and it was a mistake to put that code in the switch path
in the first place.
--
Jens Axboe
prev parent reply other threads:[~2017-05-09 14:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-06 5:22 [PATCH] block: Remove leading whitespace and trailing newline in elevator switch error message markus
2017-05-08 15:47 ` Bart Van Assche
2017-05-08 16:48 ` markus
2017-05-08 16:52 ` Bart Van Assche
2017-05-08 16:53 ` Jens Axboe
2017-05-09 2:18 ` Elliott, Robert (Persistent Memory)
2017-05-09 2:22 ` Jens Axboe
2017-05-09 4:42 ` markus
2017-05-09 14:57 ` Jens Axboe [this message]
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=5fa0d1bd-bf5c-0b5b-0c3f-ca138a06de5e@kernel.dk \
--to=axboe@kernel.dk \
--cc=Bart.VanAssche@sandisk.com \
--cc=elliott@hpe.com \
--cc=linux-block@vger.kernel.org \
--cc=markus@trippelsdorf.de \
/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