Re: [RFC PATCH] vfs: Use 12:20 bit major:minor in stat everywhere

2015-03-03 Thread Gwendal Grignou
On Tue, Mar 3, 2015 at 5:47 PM, Al Viro wrote: > On Tue, Mar 03, 2015 at 05:37:31PM -0800, Gwendal Grignou wrote: >> At least, to base the device format on whether we are running on a 32 >> bit or 64 bit architecture does not make sense. > > Yes, it does. Note that on 32bit ones stat64(2) *will*

Re: [RFC PATCH] vfs: Use 12:20 bit major:minor in stat everywhere

2015-03-03 Thread Al Viro
On Tue, Mar 03, 2015 at 05:37:31PM -0800, Gwendal Grignou wrote: > At least, to base the device format on whether we are running on a 32 > bit or 64 bit architecture does not make sense. Yes, it does. Note that on 32bit ones stat64(2) *will* return an arbitrary value. On 64bit ones stat(2) will.

Re: [RFC PATCH] vfs: Use 12:20 bit major:minor in stat everywhere

2015-03-03 Thread Gwendal Grignou
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 u

Re: [RFC PATCH] vfs: Use 12:20 bit major:minor in stat everywhere

2015-03-03 Thread Al Viro
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

Re: [RFC PATCH] vfs: Use 12:20 bit major:minor in stat everywhere

2015-03-03 Thread Daniel Ehrenberg
On Tue, Mar 3, 2015 at 4:53 PM, Al Viro wrote: > On Tue, Mar 03, 2015 at 04:37:00PM -0800, Dan Ehrenberg wrote: >> Previously, stat on 32-bit platforms used old-style encoding and >> validation of major-minor pairs, with 8:8 bits. However, dev_t is >> 32-bits on these platforms, and coreutils seem

Re: [RFC PATCH] vfs: Use 12:20 bit major:minor in stat everywhere

2015-03-03 Thread Al Viro
On Tue, Mar 03, 2015 at 04:37:00PM -0800, Dan Ehrenberg wrote: > Previously, stat on 32-bit platforms used old-style encoding and > validation of major-minor pairs, with 8:8 bits. However, dev_t is > 32-bits on these platforms, and coreutils seems to be treating the > values as 12:20 new-style valu

[RFC PATCH] vfs: Use 12:20 bit major:minor in stat everywhere

2015-03-03 Thread Dan Ehrenberg
Previously, stat on 32-bit platforms used old-style encoding and validation of major-minor pairs, with 8:8 bits. However, dev_t is 32-bits on these platforms, and coreutils seems to be treating the values as 12:20 new-style values. The only reason to use the old version is in the implementation of