public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: James Bottomley <jejb@steeleye.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: scsi "target1:0:0"
Date: Tue, 16 Nov 2004 17:55:53 +0100	[thread overview]
Message-ID: <1100624154.8606.122.camel@localhost.localdomain> (raw)
In-Reply-To: <1100622800.2574.41.camel@mulgrave>

On Tue, 2004-11-16 at 10:33 -0600, James Bottomley wrote:
> On Tue, 2004-11-16 at 10:21, Kay Sievers wrote:
> > We got an additional directory in the /devices directory which
> > changed:
> >   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/host1/1:0:0:0
> > 
> > to:
> >   /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/host1/target1:0:0/1:0:0:0
> > 
> > The inserted "target1:0:0" is _not_ backed by any "bus" or "class" device
> > and therefore breaks the logic of HAL to bring the devices together by
> > its parent. (We also don't get hotplug events for the "target*" device at
> > creation time)
> 
> Could you explain what specific problem this causes.  You do get a
> hotplug for the LUNs; a target is simply an additional node in the tree.

We sit there with the hald daemon and listen to sysfs add/remove events.
We need an event for every /sys/devices/ devices to get a unbroken chain
of devices we can sort together until we reach a root device. This is
how _all_ devices in sysfs are working and scsi was before the change.

> > Is this intentional and we can not expected a straight chain of devices
> > anymore like it always was? Shouldn't there be a "class" device to have
> > it consistent again.
> 
> Essentially yes. a target is simply a LUN container.  It has no real
> existence (it's created when the first lun is encountered and destroyed
> when the last LUN is removed).  It's job is really to hold parameters
> that apply to all LUNs.

Yes, that is fine. But if you don't want to add "class" support for
"target*" they should have at least a "bus" associated to emit hotplug
events on creation time. Here is what udevinfo prints. There should be
no device in the middle of a chain without a "bus" I think:

device '/sys/block/sda/sda1':
    SYSFS{dev}="8:1"

device chain '/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/host2/target2:0:0/2:0:0:0':
    BUS="scsi"
    ID="2:0:0:0"

device chain '/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/host2/target2:0:0':
    BUS=""
    ID="target2:0:0"

device chain '/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/host2':
    BUS=""
    ID="host2"

device chain '/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0':
    BUS="usb"
    ID="3-1:1.0"

device chain '/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1':
    BUS="usb"
    ID="3-1"

device chain '/sys/devices/pci0000:00/0000:00:1d.1/usb3':
    BUS="usb"
    ID="usb3"

device chain '/sys/devices/pci0000:00/0000:00:1d.1':
    BUS="pci"
    ID="0000:00:1d.1"

device chain '/sys/devices/pci0000:00':
    BUS=""
    ID="pci0000:00"
    SYSFS{detach_state}="0"

Thanks,
Kay



  reply	other threads:[~2004-11-16 16:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-16 16:21 scsi "target1:0:0" Kay Sievers
2004-11-16 16:33 ` James Bottomley
2004-11-16 16:55   ` Kay Sievers [this message]
2004-11-16 17:10     ` Matthew Wilcox
2004-11-16 17:23       ` David Zeuthen
2004-11-16 17:25         ` James Bottomley
2004-11-16 17:40           ` David Zeuthen
2004-11-16 19:15         ` greg k-h

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1100624154.8606.122.camel@localhost.localdomain \
    --to=kay.sievers@vrfy.org \
    --cc=jejb@steeleye.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox