From: Kurt Garloff <garloff@suse.de>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Linux kernel list <linux-kernel@vger.kernel.org>,
Linux SCSI list <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] /proc/scsi/map
Date: Thu, 20 Jun 2002 13:25:43 +0200 [thread overview]
Message-ID: <aese9o$nea$2@main.gmane.org> (raw)
In-Reply-To: <Pine.LNX.4.33.0206192149410.2638-100000@penguin.transmeta.com>
[-- Attachment #1: Type: text/plain, Size: 4424 bytes --]
Hi Linus,
On Wed, Jun 19, 2002 at 10:03:16PM -0700, Linus Torvalds wrote:
> On Thu, 20 Jun 2002, Kurt Garloff wrote:
> >
> > find attached a patch (against 2.5.23-dj2) to the SCSI subsystem which
> > adds a file /proc/scsi/map, which provides a listing of SCSI devices,
> > enumerated by the CBTU/HCIL tuple and the high-level devices attached to
> > them.
>
> I really despise this.
Thanks for your feedback.
Actually, I think you want to address a different problem than I want to.
I do believe that the scsi subsystem does not expose enough information for
many things.
Look at /proc/scsi/scsi: The information is useful for the reader who wants
to know what devices he has and were found by the SCSI subsystem.
And completely useless for any program that wants to find a scanner,
CD-Writer, ... as there is no connection to the high-level drivers attached
to them. Which means that all these programs basically contain their own
SCSI scanning code, which means opnening all sg devices and collecting the
information. I do not think that this is a good idea that a lot of userspace
programs need to do a lot of effort to get some information that could just
be exported by the kernel.
But I indeed had persistent naming in mind as well and mentioned it, so this
is probably why the discussion went that way.
scsidev, which I took over from Eric Youngdale some time ago, tries to
provide persistent naming for SCSI devices and suffers the problem, that
it can't work reliably, as open() of sr/st/osst devices can fail because
devices are already in use (-EBUSY) or have no medium inserted. (O_NONBLOCK
does not always help.) And it can take considerable time or cause unwanted
side-effects.
You're right that just enumerating all scsi devices in a somewhat more
persistent way does not constitute a complete solution to the problem of
persistent naming of attached storage devices. That is something that would
need to be addressed at a higher level and not inside SCSI midlevel, of
course.
But I still think the SCSI subsystem should report which SCSI (low-level)
device is mapped to what high-level driver.
Would you accept a patch that adds a line like
Host: scsi3 Channel: 00 Id: 12 Lun: 00
Vendor: IBM Model: DPSS-336950N Rev: S84D
Type: Direct-Access ANSI SCSI revision: 03
Attached drivers: sg12(c:15:0c) sdf(b:08:50)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
to /proc/scsi/scsi ?
Actually that was my first idea, but I was reluctant to change the format of
an existing file, as it might be parsed by existing code.
But, given the uselessness of /proc/scsi/scsi for code, I guess that's
a small risk ...
> It's just _wrong_ to have one file with a collection of devices in it, and
> it is _doubly_ wrong when that one file
>
> - is limited to a (arbitrary) subset of the disks in your system
You mean all disks driven by the SCSI subsystem, right?
> - has completely bogus information about "location" that has nothing to
> do with real life, yet pruports to be an "address" even though it
> obviously isn't.
The CBTU tuple uniquely addresses a SCSI device in a running system.
It's just not persistent against configuration changes, unfortunately.
But it's reported by /proc/scsi/scsi as well and therefore useful to
find back in map, IMHO.
[...]
> Either you enumerate things without any structure (like the current SCSI
> layer does: disk0, disk1, disk2 ...) or you give full their addresses.
> Don't do the half-assed thing.
I would certainly like to see code at block layer that does provide the
infrastructure to see persistent names for all sort of attached devices,
especially disks.
> PLEASE don't add these kinds of SCSI-specific hacks, that are _useless_ to
> find other types of disks, and that makes no sense, and will not work for
> things like DAC960, for IDE, or for anything else that just ignores the
> SCSI layer (even if it physically uses SCSI disks, like the DAC960 setup).
Please consider the possibility of adding the reporting of the attached
high-level drivers to /proc/scsi/scsi
Regards,
--
Kurt Garloff <garloff@suse.de> Eindhoven, NL
GPG key: See mail header, key servers Linux kernel development
SuSE Linux AG, Nuernberg, DE SCSI, Security
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2002-06-20 11:25 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-20 0:44 [PATCH] /proc/scsi/map Kurt Garloff
2002-06-20 5:03 ` Linus Torvalds
2002-06-20 7:09 ` Martin Schwenke
2002-06-20 11:25 ` Kurt Garloff [this message]
[not found] <200206200711.RAA10165@thucydides.inspired.net.au>
2002-06-20 15:13 ` Linus Torvalds
2002-06-20 15:36 ` Dave Jones
2002-06-20 17:01 ` Linus Torvalds
2002-06-20 16:55 ` Andries Brouwer
[not found] ` <20020620165553.GA16897@win.tue.nl>
2002-06-20 17:52 ` Patrick Mansfield
2002-06-20 18:36 ` Linus Torvalds
2002-06-20 18:52 ` James Bottomley
2002-06-20 19:15 ` Linus Torvalds
2002-06-20 16:28 ` Benjamin Herrenschmidt
2002-06-21 0:46 ` Linus Torvalds
2002-06-20 16:49 ` Benjamin Herrenschmidt
2002-06-20 20:06 ` Oliver Xymoron
2002-06-22 18:27 ` Pavel Machek
2002-06-20 18:11 ` Linus Torvalds
2002-06-20 22:59 ` Martin Schwenke
2002-06-20 23:13 ` Linus Torvalds
2002-06-22 18:25 ` Pavel Machek
2002-06-26 16:03 ` Ihno Krumreich
2002-06-20 19:55 ` Greg KH
2002-06-20 19:18 ` Patrick Mochel
2002-06-21 6:28 ` Mike Touloumtzis
[not found] <20020620112543.GD26376@gum01m.etpnet.phys.tue.nl>
2002-06-20 15:34 ` Linus Torvalds
2002-06-20 16:30 ` Martin Dalecki
2002-06-20 16:58 ` James Bottomley
2002-06-20 18:27 ` Linus Torvalds
2002-06-20 20:55 ` Martin Dalecki
2002-06-20 21:04 ` Linus Torvalds
2002-06-20 21:36 ` Martin Dalecki
2002-06-20 20:12 ` Patrick Mochel
2002-06-20 22:29 ` Martin Dalecki
2002-06-22 18:42 ` Pavel Machek
2002-06-21 21:33 ` Oliver Xymoron
2002-06-22 4:38 ` Nick Bellinger
2002-06-22 19:41 ` Douglas Gilbert
2002-06-22 19:11 ` Nick Bellinger
2002-06-25 18:13 ` Patrick Mochel
2002-06-25 16:05 ` Patrick Mochel
2002-06-25 16:57 ` Oliver Xymoron
2002-06-25 18:58 ` Patrick Mochel
2002-07-03 1:01 ` Pavel Machek
2002-06-20 18:32 ` Kurt Garloff
2002-06-20 18:53 ` Linus Torvalds
2002-06-21 9:07 ` Kurt Garloff
-- strict thread matches above, loose matches on Subject: below --
2002-06-20 23:59 Grover, Andrew
[not found] <20020621092943.D1243@austin.ibm.com>
2002-06-21 16:17 ` Patrick Mochel
2002-06-22 17:24 David Brownell
2002-06-22 17:48 ` Roman Zippel
2002-06-22 20:11 ` Douglas Gilbert
2002-06-22 20:57 ` Roman Zippel
2002-06-22 18:18 ` Nick Bellinger
2002-06-24 1:50 ` David Brownell
2002-06-25 16:46 ` Patrick Mochel
2002-06-25 16:33 ` Patrick Mochel
2002-06-25 17:49 ` David Brownell
2002-06-26 23:39 ` Nick Bellinger
2002-07-03 0:59 ` Pavel Machek
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='aese9o$nea$2@main.gmane.org' \
--to=garloff@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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