lkml.org 
[lkml]   [2000]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Getting past the 16-bit dev_t limitation.
On Mon, Sep 18, 2000 at 03:41:11PM -0700, John Byrne wrote:

> 1.) Any decision on what the bigger dev_t will be? 16-bit major and
> 16-bit minor, for example?

My old code does something like this:

major = (dev >> 32);
minor = (dev & 0xffffffff);
if (!major) {
major = (dev >> 16);
minor = (dev & 0xffff);
if (!major) {
major = (dev >> 8);
minor = (dev & 0xff);
}
}

In other words: If the whole thing is 16-bit, there is an 8-8
split. If the whole thing is 32-bit, there is a 16-16 split.
Etc.

This allows all the old device numbers to stay.
The present isofs code uses a similar algorithm.

In principle of course a device number is a structureless number,
but mknod needs it in two components, and ls lists it in two
components. Otherwise the partition does not play a role.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.063 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site