lkml.org 
[lkml]   [2018]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Change in register_blkdev() behavior


On 30/01/18 05:56 PM, Srivatsa S. Bhat wrote:
> If the restriction on the major number was intentional, perhaps we
> should get the LTP testcase modified for kernel versions >= 4.14.
> Otherwise, we should fix register_blkdev to preserve the old behavior.
> (I guess the same thing applies to commit 8a932f73e5b "char_dev: order
> /proc/devices by major number" as well).

The restriction was put in place so the code that prints the devices
doesn't have to run through every integer in order to print the devices
in order.

Given the existing documented fixed numbers in [1] and that future new
char devices should be using dynamic allocation, this seemed like a
reasonable restriction.

It would be pretty trivial to increase the limit but, IMO, setting it to
UINT_MAX seems a bit much. Especially given that a lot of the
documentation and code still very much has remnants of the 256 limit.
(The series that included this patch only just expanded the char dynamic
range to above 256). So, I'd suggest the LTP test should change.

Logan


[1] Documentation/admin-guide/devices.txt

\
 
 \ /
  Last update: 2018-01-31 02:27    [W:0.055 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site