lkml.org 
[lkml]   [1997]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: SCSI disk naming
Matthias Urlichs:

: What we really need are longer device numbers in all file systems, esp.
: ext2 of course.

They are there already - I have run a system with large device
numbers in 1995 and again this year until recently (on ext2), both times
giving up when newer patches conflicted too heavily.
(E.g., 2.1.44 has two new system calls [sg]etresgid,
conflicting with my new stat calls, and there were other
conflicts in very recent 2.1 kernels.)

: Everything else is (more or less) taken care of -- glibc
: already has large device numbers, a new kernel stat() system call version
: is easy to do

Yes

: ditto for extending the kernel's idea of dev_t

Yes

: all the old code should work OK as long as you don't need devices
: with minor>255.

: The real compatibility problem is stuff like "check if /path/to/a and
: /path/too/to/b point to the same file" -- suppose you want to copy one
: to the other, a is on 08/01 and b is on 08/101 (i.e. SCSI disk #17),
: and both have inode 56...

I am not sure I follow you - surely nobody wants to truncate
device numbers. If I recall correctly I made stat() return EOVERFLOW
or so when called with an old-fashioned stat structure on a file
that required a larger st_dev or st_rdev field.


On the other hand, there still *is* (a little bit of) real work to do;
many static arrays in the kernel, addressed by major nr,
must be replaced by dynamically allocated ones.
But that is not bad - in fact a lot of code involving things like
blk_size[major][MINOR(bh->b_rdev)]
becomes shorter, faster, and much more beautiful.
Then there is the handling of a device for which no driver is
known or needed. The old dev_t is no good because it does not
contain bdev/cdev information and hence does not identify the
device, and the new kdev_t is no good because perhaps no device
structure exists. Various solutions are possible, like ignoring
the problem (my 1st version), and introducing another type idev_t
containing the device number and the bdev/cdev bit (my 2nd version).

A few months ago I started again feeding Linus patch fragments
intended to convert the kernel to long device numbers
in a number of small steps, all the time keeping a
well-functioning system, following up on the work begun in 1995.
However, at that moment he had no time for such frivolities
and asked me to come back later. Right now I can see obligations
abroad until the second week of October, so if nobody else does
the work before that time (it really is very little and the lack
of long device numbers is hurting more and more people ...), I hope
to start submitting some patch fragments again sometime in October.

Andries


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