public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: dougg@torque.net
Cc: Andries.Brouwer@cwi.nl,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	linux-usb-devel@lists.sourceforge.net,
	mdharm-scsi@one-eyed-alien.net,
	Patrick Mansfield <patmans@us.ibm.com>
Subject: Re: [PATCH] scsi-misc-2.5 remove scsi_scan.c EVPD code
Date: 05 May 2003 09:17:07 -0500	[thread overview]
Message-ID: <1052144231.1888.10.camel@mulgrave> (raw)
In-Reply-To: <3EB619A4.5090407@torque.net>

On Mon, 2003-05-05 at 02:58, Douglas Gilbert wrote:
> Andries.Brouwer@cwi.nl wrote:
> >>Remove the scsi EVPD code.
> > 
> > 
> > Good! That simplifies many things.
> 
> Good?? Just because there are millions of brain damaged
> devices that can't implement rule 0 of a protocol,
> Patrick removes one of the best features added to
> the scsi subsystem in the 2.5 development series.
> 
> Patrick's patch is now in lk 2.5.69 .
> 
> So we are back to all the fun games of opening/
> querying/closing likely looking device nodes in
> the /dev space (and I speak from experience).
> What a joy.
> 
> Surely there is a better way. Why not do the VPD=0x83
> query on devices that claim to be SCSI-3 compliant
> or better. The scsi mid level driver (and/or the
> usb-storage + sbp2 LLDs) could have a sysfs parameter
> such as "simple_scan". The filters discussion
> showed more promise than this blunt approach.
> 
> I have contemplated putting the VPD=0x83 code in
> lsscsi but it won't be pretty (e.g. requiring root
> privilege, side effects including locking up
> certain USB storage devices :-) ).

Well, this is one of those debates where you have to weigh what you get
vs the problems caused.  EVPD inquiry was causing too many problems. 
Its use was to get a unique name for the SCSI device.  It did this by
falling back through about three levels of heuristics (ending up with
the serial number).

The heuristics employed weren't complex enough to generate a unique name
for all devices, and no-one was using them anyway.  The problems they
caused seemed to be quite real.

Here's my proposal for replacing it:

1. Unique Name is a generic block property, not an exclusively SCSI
property, so we need to add a mutable property file to the *block* class
(something like uuid or unique_id---I don't care about the name).

2. It will be mutable because it may either be set in the kernel or by
root from user level.

3. For SCSI, we will have a hotplug script that will navigate the
heuristics and generate a "unique" name for the device.  How it does
this will be entirely within the province of the scripts.

4. The generated name will be written to the mutable block property
file, so SCSI WWN will operate almost entirely at the user level.

The reason I think it should be done this way is that there are two main
uses of the unique id:

1. To find devices as they move about during bus/system reconfigurations

2. To configure multi-pathing based on the unique id's being the same.

Neither of these problems is unique to SCSI, which is why I think the
block layer is more appropriate place to solve them.

James



  reply	other threads:[~2003-05-05 14:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-25  0:47 [PATCH] scsi-misc-2.5 remove scsi_scan.c EVPD code Andries.Brouwer
2003-05-05  7:58 ` Douglas Gilbert
2003-05-05 14:17   ` James Bottomley [this message]
2003-05-05 15:52     ` Mike Anderson
2003-05-05 16:14       ` James Bottomley
2003-05-05 16:26         ` Patrick Mansfield
2003-05-05 16:57         ` Mike Anderson
2003-05-05 17:01           ` James Bottomley
2003-05-05 16:38   ` Patrick Mansfield
2003-05-05 16:59     ` James Bottomley
2003-05-05 17:46     ` Mike Anderson
2003-05-05 22:51       ` Patrick Mansfield
2003-05-06  1:39         ` Douglas Gilbert
2003-05-06  4:11           ` Patrick Mansfield
2003-05-06  5:58             ` Douglas Gilbert
2003-05-06 21:11               ` Patrick Mansfield
  -- strict thread matches above, loose matches on Subject: below --
2003-04-25  0:22 Patrick Mansfield

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=1052144231.1888.10.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=dougg@torque.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=mdharm-scsi@one-eyed-alien.net \
    --cc=patmans@us.ibm.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