Re: [patch] convert the scsi layer to use struct device

Kay Sievers
2008-03-17T13:40:00Z

On Mon, 2008-03-17 at 08:18 -0400, James Smart wrote:
> Greg KH wrote:
> > I take it you haven't even looked at how !SYSFS_DEPRECATED works today,
> > have you? Try it and you will see that the namespace issue has been
> > taken care of a long time ago :)
>
> You are right... but I would assume it can be answered without pushing
> someone back into the internals of the code to figure it out.

Oh, I already answered it in an earlier mail :)
"these links don't exist with !SYSFS_DEPRECATED, because the
class devices live in subdirectories, named after the class
they come from, there is no namespace problem"

This is how a LUN looks now:
tree /sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host13/target13:0:0/13:0:0:0/
/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host13/target13:0:0/13:0:0:0/
|-- block
| `-- sdb
| |-- subsystem -> ../../../../../../../../../../../class/block

| |-- sdb1
| | |-- subsystem -> ../../../../../../../../../../../../class/block

| |-- sdb2
| | |-- subsystem -> ../../../../../../../../../../../../class/block

|-- bsg
| `-- 13:0:0:0
| |-- subsystem -> ../../../../../../../../../../../class/bsg

|-- scsi_disk
| `-- 13:0:0:0
| |-- subsystem -> ../../../../../../../../../../../class/scsi_disk

|-- scsi_generic
| `-- sg2
| |-- subsystem -> ../../../../../../../../../../../class/scsi_generic

Kay