lkml.org 
[lkml]   [2002]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [linux-usb-devel] Re: /proc/scsi/map
Date
From
oliver@neukum.name said:
> How would you find out what a device is ? If the kernel has to supply
> the information anyway, you could just as well pass all information to
> the script or devfs.

But the kernel doesn't know this globally unique identifier information today,
that's what the discussion is about.

The essence of the problem is that there's no one method that can get a unique
identifier for every SCSI device (even though almost every device possesses
one in one form or another). So you have to implement a collection of ad hoc
methods depending on what the device actually is.

The idea behind using hotplug to solve the problem is that with scsimon, a
hotplug insertion event is generated for every SCSI device as it is added.
The script is provided with the information the kernel knows (host, channel,
pun lun, model and vendor inquiry strings---see www.torque.net/scsimon.html
for details). The hotplug script then does the remaining processing to
extract the ID from the device (by ioctls, sending down SCSI commands etc.)
and then binds it into the /dev/volume nodes using the identifier it
determines.

The result is that however you move the device around (between controllers or
even change its id), it will always show up as its unique /dev/volume name.

The key philosophy is that the code to make the policy decision for assigning
a unique name isn't cluttering up the kernel, it's in user land where it can
be easily customised. Once scsimon is part of the kernel, we need no other
kernel changes at all to implement this, since /dev/volume could just be done
with symbolic links (although having the kernel know the name is useful).

James


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

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