Re: [PATCH] Move SG_GET_SCSI_ID from sg to scsi

From: Douglas Gilbert
Date: Mon Mar 27 2006 - 10:01:01 EST


Linus Torvalds wrote:
>
> On Sun, 26 Mar 2006, Bodo Eggert wrote:
>
>>Having a SCSI ID is a generic SCSI property
>
>
> No it's not.
>
> Havign a SCSI ID is a f*cking idiotic thing to do.
>
> Only idiots like Joerg Schilling thinks that any such thing even _exists_.
> It does not, never has, and never will.
>
> The way you reach a SCSI device is through the device filename, and trying
> to use controller/channel/id/lun naming IS INSANE!
>
> Stop it now. We should kill that ioctl, not try to make it look like it is
> sensible. It's not a sensible way to look up SCSI devices, and the fact
> that some SCSI people think it is is doesn't make it so.
>
> The fact is, you CANNOT ID a SCSI device that way. Look at how /sys does
> it, and realize that there's a damn good reason we do it that way. We ID
> the same device in many different ways, because different people want to
> ID it differently.
>
> You can ask "what's the first device we enumerated", you can ask "what's
> the physical path to the device" or you can ask "what's the intrisic UUID
> of the device". But the controller/channel/id/lun thing is just stupid.
> You can look it up that way if you want to, but I refuse to have idiotic
> interfaces that somehow try to make that the "official" name, when it
> clearly is NOT.

Linus,
There are two things that really count:
1) the identifier (preferably a world wide unique name)
of the logical unit that is being addressed
2) a topological description of how that logical unit
is connected

For the last 25 years various OS SCSI subsystems have used
variants of 2) as a proxy for 1). Modern SCSI disks (and
soon SATA disks) have a world wide unique name associated
with their logical unit.

So why are modern SCSI standards full of terms like
I_T_L ** and I_T_L_Q nexus? Probably because the topology,
especially when there are multiple paths to the same
logical unit, is significant.

Linux's <hctl> may be a ham fisted way of describing
a path through a topology, but it easily beats /dev/sdabc
and /dev/sg4711 .
With a device node name like /dev/sdabc, a SCSI INQUIRY or
an ATA IDENTIFY DEVICE command can be sent to ascertain 1)
but I am unaware of any command sent to a logical unit that
will yield 2).


** that is: the nexus of an Initiator port, a Target port
and a Logical unit number.

Doug Gilbert

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