[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMHSBOXDT953g25uCvcALqCZskqF126SVOb2nbUQf1A_tJ=+Hg@mail.gmail.com>
Date: Tue, 3 Mar 2015 17:37:31 -0800
From: Gwendal Grignou <gwendal@...gle.com>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Daniel Ehrenberg <dehrenberg@...gle.com>,
linux-fsdevel@...r.kernel.org,
Linux Kernel <linux-kernel@...r.kernel.org>,
Gwendal Grignou <gwendal@...omium.org>,
Ezequiel Garcia <ezequiel@...guardiasur.com.ar>
Subject: Re: [RFC PATCH] vfs: Use 12:20 bit major:minor in stat everywhere
At least, to base the device format on whether we are running on a 32
bit or 64 bit architecture does not make sense.
If a tool calling stat(2) can not handle 12 bit major/20 bits minor,
it would already break or about to break when running on a 64 bit
machine.
Regarding SCSI, the 17th disk will use SCSI_DISK1_MAJOR (65). Only the
257th disk will use the first scsi major (8) again and need a minor
greater than 256. (see sd_major() in drivers/scsi/sd.c for details).
Gwendal.
On Tue, Mar 3, 2015 at 5:22 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
> On Tue, Mar 03, 2015 at 05:10:22PM -0800, Daniel Ehrenberg wrote:
>> > What's to guarantee that your ABI change won't break any of those?
>>
>> I guess it's impossible to guarantee, but if there is an error, it'll
>> be that an -EOVERFLOW error is suppressed and the high bits of the
>> major:minor pair are shaved off by the userspace program. I would
>> suspect that this would just make debugging harder, rather than
>> actually break an automated program which counts on getting EOVERFLOW
>> from a huge block device, but no way to know. The block device has to
>> actually exist for this to happen, and all we're talking about is stat
>> failing. So it's replacing an an error code with erroneous way to get
>> data about a device node (erroneous just because userspace ignores
>> some of the bits with the answer).
>
> All it takes is more than 16 SCSI disks, AFAICS, and use of open-coded
> MINOR() somewhere in old userland code...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists