public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "hare@suse.de" <hare@suse.de>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "hch@lst.de" <hch@lst.de>,
	"james.bottomley@hansenpartnership.com"
	<james.bottomley@hansenpartnership.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"hare@suse.com" <hare@suse.com>
Subject: Re: [PATCH] scsi_devinfo: fixup string compare
Date: Fri, 4 Aug 2017 16:38:05 +0000	[thread overview]
Message-ID: <1501864684.2757.16.camel@wdc.com> (raw)
In-Reply-To: <c656a810-dbcc-4f1a-5d59-128496af531f@suse.de>

On Fri, 2017-08-04 at 18:28 +0200, Hannes Reinecke wrote:
> Well, maybe; however, the current logic fails to match the entry
> 
> 	{"HITACHI", "OPEN-", "*", BLIST_REPORTLUN2},
> 
> against the 'real' name, which is "HITACHI" "OPEN-V".
> And for some reason we have far more customer using Hitachi arrays than
> using scanner of dubious provenance with no Vendor (which is the real
> bug if you ask me...)

Hello Hannes,

So for some entries in the table a prefix match should be performed (e.g. the
model string for the Hitachi entry) but for other entries (e.g. the scanner
entry) an exact match should be performed on the vendor name? If so, how about
one of the following two approaches:
* Adding ".*" at the end of the entries in the table for which a prefix match
  is sufficient and to change scsi_dev_info_list_find() such that it performs
  a regex match instead of an exact match or a prefix match.
* Performing an exact match on the vendor name and a prefix match on the model
  name.

Thanks,

Bart.

  reply	other threads:[~2017-08-04 16:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04  9:40 [PATCH] scsi_devinfo: fixup string compare Hannes Reinecke
2017-08-04 15:32 ` Bart Van Assche
2017-08-04 16:28   ` Hannes Reinecke
2017-08-04 16:38     ` Bart Van Assche [this message]
2017-08-08 14:28       ` Hannes Reinecke

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=1501864684.2757.16.camel@wdc.com \
    --to=bart.vanassche@wdc.com \
    --cc=hare@suse.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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