From: Stefan Voelkel <Stefan.Voelkel@millenux.com>
To: Bryan Henderson <hbryan@us.ibm.com>
Cc: Kurt Garloff <garloff@suse.de>, linux-scsi@vger.kernel.org
Subject: Re: bus:id:lun to device name
Date: 16 Jul 2003 10:29:52 +0200 [thread overview]
Message-ID: <1058344192.3983.98.camel@lt-sv> (raw)
In-Reply-To: <OF19C5DBC5.6CF569E6-ON87256D64.005C1908-88256D64.005DBB45@us.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2131 bytes --]
On Tue, 2003-07-15 at 19:03, Bryan Henderson wrote:
>
>
> >Theoretically /dev/foobar might be a scsi device, meaning that I
> >must/should ioctl() all files under /dev/. Thats what I do not like
> >about ioctl() :).
>
> Once you admit that devices in Linux are not fundamentally associated with
> names in the file tree, the problem takes on a whole new perspective.
True. What I do not like about a list of devices is the fact that I will
duplicate code, eg (from sd.c)
static void sd_devname(unsigned int disknum, char *buffer)
> >> Another option is to use scsidev
> >> http://www.garloff.de/kurt/linux/scsidev/
> >> where the device nodes are dynamically created and (by default) have
> >> names which contain this information.
> >
> >AFAIR devfs does this too, depending on devfs would be an option.
>
> [...] Or do you want the name by which people normally know and
> use the device? E.g. "I have /dev/sda mounted, but what device is that?"
Yes, basically. I have this information: host_id:bus:target:lun, and now
I'd like the "device file name with which one normally access' this
specific lun".
Let me give you some details (hope that will make it clearer). I am
implementing FC-HBA (ftp://ftp.t11.org/t11/pub/fc/hba/03-108v2.pdf). The
problem occures with HBA_GetFcpTargetMapping() on page 73 (7.4.4), the
parameters are describerd on page 31 (6.6.1) and the specific struct is
HBA_ScsiId (6.6.1.5), actually the member OSDeviceName (6.6.2.11).
As it seems, I must use the file-name-list-ioctl() approach without
devfs and something like snprintf("/dev/scsi/host%d/bus%d/...", ...); if
devfs is mounted.
Thank you all for your time
regards
Stefan
--
--------------------------------------------------------------------
Stefan Völkel stefan.voelkel@millenux.com
Millenux GmbH mobile: +49.170.79177.17
Lilienthalstraße 2 phone: +49.711.88770.300
70825 Stuttgart-Korntal fax: +49.711.88770.349
-= linux without limits -=- http://linux.zSeries.org/ =-
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2003-07-16 8:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-02 15:24 bus:id:lun to device name Stefan Voelkel
2003-07-08 14:50 ` Kurt Garloff
2003-07-15 14:45 ` Stefan Voelkel
2003-07-15 17:03 ` Bryan Henderson
2003-07-16 8:29 ` Stefan Voelkel [this message]
2003-07-17 10:29 ` Christoph Hellwig
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=1058344192.3983.98.camel@lt-sv \
--to=stefan.voelkel@millenux.com \
--cc=garloff@suse.de \
--cc=hbryan@us.ibm.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