Re: [PATCH] block: Remove leading whitespace and trailing newline in elevator switch error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/08/2017 10:42 PM, markus@xxxxxxxxxxxxxxx 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@xxxxxxx> 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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux