Re: [BK PATCH] SCSI update for 2.6.3

From: Kai Makisara
Date: Tue Feb 24 2004 - 12:55:09 EST


On Tue, 24 Feb 2004, Greg KH wrote:

> On Tue, Feb 24, 2004 at 11:08:48AM -0600, James Bottomley wrote:
> > On Tue, 2004-02-24 at 11:04, Greg KH wrote:
> > > Can you post it here so we can review it?
> > >
> > > And yes, using class_simple should relieve you of Al flamage :)
> >
> > The one in the tree is attached. I did verify it myself, and tried it
> > out on some old QIC tapes I had lying around.
>
> Can you print out the sysfs tree this patch creates?
>
Here is a partial tree for the first tree (nearly identical entries from
the middle trimmed):

/sys/class/scsi_tape/
|-- st0m0
| |-- default_blksize
| |-- default_compression
| |-- default_density
| |-- defined
| |-- dev
| |-- device ->
../../../devices/pci0000:00/0000:00:1e.0/0000:02:01.1/host1/1:0:5:0
| `-- driver -> ../../../bus/scsi/drivers/st
|-- st0m0n
| |-- default_blksize
| |-- default_compression
| |-- default_density
| |-- defined
| |-- dev
| |-- device ->
../../../devices/pci0000:00/0000:00:1e.0/0000:02:01.1/host1/1:0:5:0
| `-- driver -> ../../../bus/scsi/drivers/st
.
.
.
`-- st0m3n
|-- default_blksize
|-- default_compression
|-- default_density
|-- defined
|-- dev
|-- device ->
../../../devices/pci0000:00/0000:00:1e.0/0000:02:01.1/host1/1:0:5:0
`-- driver -> ../../../bus/scsi/drivers/st

> What's that "tape" symlink for? Does it go from the scsi device in
> /sys/devices/... to the class device? Or the other way around?
>

The link is from the SCSI device to one of the scsi_tape directories:

/sys/devices/pci0000:00/0000:00:1e.0/0000:02:01.1/host1/1:0:5:0
|-- delete
|-- detach_state
|-- device_blocked
|-- generic -> ../../../../../../class/scsi_generic/sg1
|-- model
|-- online
|-- power
| `-- state
|-- queue_depth
|-- rescan
|-- rev
|-- scsi_level
|-- tape -> ../../../../../../class/scsi_tape/st0m0
|-- type
`-- vendor

The idea is to be able to follow the links from a generic scsi device to
the tape device. The link 'generic' created by sg enables associating a
tape with the corresponding sg device.

> Other than that question, the patch looks sane to me.
>
Thanks for the review.

--
Kai
-
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/