From: Joe Scsi <joe.scsi@gmail.com>
To: linux-scsi@vger.kernel.org
Subject: LUN discovery by SCSI midlayer?
Date: Mon, 14 Feb 2005 20:35:25 -0800 [thread overview]
Message-ID: <7526e30505021420354e6a1707@mail.gmail.com> (raw)
Hi,
I'm working on a driver for a SCSI protocol that is transported over a network.
My basic plan is that when the driver is loaded, it will create a SCSI
host structure
for its initiator port. Then target ports will be discovered
asynchronously (and
may appear/disappear as target devices come and go on the network).
I'm wondering what the best way to handle LUN discovery is. Unfortunately it
seems that scsi_add_device() can only add a single LUN at a time. However,
for my protocol, I see target ports and then need to find the LUNs. So far I've
come up with a couple of ideas but I'm not totally happy with either:
(ugly) Do all the REPORT_LUNs stuff in my driver every time I find a new
target port, or
(ab)use the "channel" index and call scsi_scan_single_target() every time
I connect to a new target port. This seems OK but I'm a little put off by the
fact that a quick grep shows no callers of scsi_scan_single_target in the
current kernel tree.
So what is the correct way to handle this? I'm sure the FC and iSCSI people
must have dealt with a similar issue.
Thanks,
Joe
next reply other threads:[~2005-02-15 4:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-15 4:35 Joe Scsi [this message]
2005-02-15 14:06 ` LUN discovery by SCSI midlayer? Matt Domsch
2005-02-15 16:58 ` Joe Scsi
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=7526e30505021420354e6a1707@mail.gmail.com \
--to=joe.scsi@gmail.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