lkml.org 
[lkml]   [1998]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: no need for a devfs
James Mastros writes:
> On Wed, 7 Jan 1998, Phil Brutsche wrote:
> > On Wed, 7 Jan 1998, Richard Gooch wrote:
> > > Pavel Machek writes:
> > [snipped]
> > > Thank you, Pavel. The running of makedev every time a module is
> > > loaded/unloaded is likely to be *much* slower than devfs.
> > >
> > > And I certainly have SCSI disc naming in my sights... With devfs you
> > > can have both the old-style /dev/sd{a,b,c} as well as something like
> > > the Solaris scheme:
> > >
> > > /dev/hHcCiIlLpP
> > >
> > > where <H> is the host controller number, <C> is the channel number,
> > > <I> is the SCSI ID, <L> is the logical unit and <P> is the partition
> > > number (stripe in Solaris parlance).
> But HOW are you going to do this?

The SCSI disc driver will call dev_register() whenever a new disc is
found. It probably makes sense to do it right after the partition
check, so you only create device nodes for as many partitions as you
have. Done properly when you use <fdisk> to write a new partition
table, dev_register() is called again (and possibly dev_unregister()).

> > No, please don't do this. It's too confusing. What's wrong with the
> > current SCSI setup (/dev/sda, /dev/sda1, /dev/sda2, etc) in any case?
> >
> > The incosistency can be considered a bad thing. Unless some change is
> > planned for the IDE subsystem (along the same lines) consistency is a good
> > thing.
> Umm... the IDE subsystem is already like this. We have
> hda - 1st channel, master
> hdb - 1st channel, slave
> hdc - 2nd channel, master
> hdd - 2nd channel, slave
> ...
>
> Then you follow those with a number indicating the paritition. The
> difference between current SCSI practice and IDE is this: If you take out
> hdb, hdc remains hdc. But if you remove sdb, sdc becomes sdb.

That's right. And it's a pain.

> > (Duh! Another thought... we could make symlinks from /dev/sda1
> > to /dev/h0c0i0l0p1 and so on and so forth. For the time being, ignore
> > what I just said about this being a bad thing...)
>
> But the question is HOW do you do this?

Well, personally I wouldn't suggest using symlinks. Since the existing
logic for SCSI disc renumbering is there, you can also call
dev_register() to create /dev/sda{1,2,3...}, /dev/sdb{1,2,3...} and so
on. Easy.

Regards,

Richard....

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