[2167] in linux-scsi channel archive
Re: More than one SCSI controler & SCSI_IOCTL_GET_IDLUN
daemon@ATHENA.MIT.EDU (Eric Youngdale)
Thu Jul 17 08:01:56 1997
Date: Wed, 16 Jul 1997 07:23:46 -0400 (EDT)
From: Eric Youngdale <eric@andante.jic.com>
To: Joerg Schilling <schilling@fokus.gmd.de>
cc: linux-scsi@vger.rutgers.edu, tn@bv.rz.fh-muenchen.de
In-Reply-To: <199707140941.LAA18612@sherwood.fokus.gmd.de>
On Mon, 14 Jul 1997, Joerg Schilling wrote:
> > Actually there is a reason why things are the way they are.
> >With the current code, this is the only way to determine exactly what
> >type of host a given device corresponds to. The host_no is not a terribly
>
> 1) There is no reason why a user level program needs to know what
> type of controler is hosting a device. It is one of
> the main concepts in UNIX to hide this information from user
> land processes.
Well, programs of the sort of scsidev want to know this sort of
thing. As a matter of fact, you may break it with this change.
>
> 2) The current information is useless anyway because it has
> incomplete information:
> imagine the line would look like:
> + ((dev->host->hostt->proc_dir->low_ino & 0x01) << 24),
> to understand what I mean.
> Currently it is pure luck if the value returned by the ioctl
> differs for two controlers.
Huh? It is guaranteed to be different. The low inode number
starts at 256 and counts up from there. Remember that this is the proc
filessytem, and we create the inode numbers ourselves.
> >type of host a given device corresponds to. The host_no is not a terribly
> >meaningful parameter and is mainly used for display purposes. Returning
> >this to the user could be useful just for informational purposes, but at
> >the moment I don't see a reason why the host_no *must* be determined.
>
> I really nead the SCSI bus id to be able to do device mapping in cdrecord.
> If this cannot be done, it will not be possible to let cdrecord access
> any CD-Recorder bejond the first SCSI bus.
Fine. I am not arguing that you shouldn't be getting the number.
All I am saying is that I don't want you changing that field of the ioctl
result. There is too much information being returned by
SCSI_IOCTL_GET_IDLUN to begin with, and trying to overload even more
information just gets us into even deeper trouble. You could just as
easily add a new SCSI_IOCTL_GET_BUS_NUMBER type of ioctl to return that
value.
-Eric