public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Keith Busch <keith.busch@intel.com>
Cc: Bart Van Assche <bart.vanassche@sandisk.com>,
	dm-devel@redhat.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/2] Don't blacklist nvme
Date: Wed, 15 Feb 2017 21:35:46 -0500	[thread overview]
Message-ID: <20170216023546.GB9078@redhat.com> (raw)
In-Reply-To: <20170216020146.GA9078@redhat.com>

On Wed, Feb 15 2017 at  9:01pm -0500,
Mike Snitzer <snitzer@redhat.com> wrote:

> On Tue, Feb 14 2017 at  6:00pm -0500,
> Keith Busch <keith.busch@intel.com> wrote:
> 
> > On Tue, Feb 14, 2017 at 01:35:45PM -0800, Bart Van Assche wrote:
> > > On 02/14/2017 01:19 PM, Keith Busch wrote:
> > > > These devices are mulitpath capable, and have been able to stack with
> > > > dm-mpath since kernel 4.2.
> > > > 
> > > > -	str = STRDUP("^(ram|raw|loop|fd|md|dm-|sr|scd|st|dcssblk|nvme)[0-9]");
> > > > +	str = STRDUP("^(ram|raw|loop|fd|md|dm-|sr|scd|st|dcssblk)[0-9]");
> > > 
> > > Have you checked whether dm-mpath works properly with nvme? Last time I
> > > tried that dm-mpath crashed when it called scsi_dh_attach() because that
> > > last function assumes that it is passed a SCSI device queue instead of
> > > checking whether or not the queue passed to that function is a SCSI
> > > device queue.
> > 
> > Good point. I was unknowingly running with CONFIG_SCSI_DH disabled,
> > and blissfully unaware of its existence! After enabling that option,
> > I see what you mean.
> > 
> > If we don't want to mess with the kernel, I can change the multipath-tools
> > to get around that by appending the following to NVMe hwentry in the
> > second patch in this series:
> > 
> > 	.retain_hwhandler = RETAIN_HWHANDLER_OFF,
> > 
> > And the problem goes away.
> 
> That gives me a clue, I'll take a look.

Looks like drivers/scsi/scsi_dh.c:get_sdev_from_queue() needs to first
check if the request_queue is from a SCSI device (rather than assuming
it is).  Not quite sure how to check that though.

By pushing the check down into scsi_dh it implies DM multipath will be
calling into scsi_dh code for other transports (NVMe, etc).

So an alternative would be to have DM multipath guard SCSI specific code
with an appropriate check.  Again, not sure how that check (e.g. some
new is_scsi_request_queue) should be implemented.

Mike

       reply	other threads:[~2017-02-16  2:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1487107154-24883-1-git-send-email-keith.busch@intel.com>
     [not found] ` <941dc20e-47ba-5b9d-5082-a87ff1530cb6@sandisk.com>
     [not found]   ` <20170214230023.GA1148@localhost.localdomain>
     [not found]     ` <20170216020146.GA9078@redhat.com>
2017-02-16  2:35       ` Mike Snitzer [this message]
     [not found] ` <20170215145617.GA4241@infradead.org>
     [not found]   ` <20170216025357.GA9241@redhat.com>
     [not found]     ` <20170216142621.GA21972@infradead.org>
2017-02-16 15:13       ` hch's native NVMe multipathing [was: Re: [PATCH 1/2] Don't blacklist nvme] Mike Snitzer
2017-02-16 17:38         ` Keith Busch
2017-02-16 17:37           ` Bart Van Assche
2017-02-16 18:07             ` Keith Busch
2017-02-16 18:21               ` Mike Snitzer
2017-02-16 20:40                 ` Keith Busch
2017-02-17  9:04                 ` [dm-devel] " hch
2017-02-17 14:43                   ` Mike Snitzer
2017-02-16 18:05         ` Sagi Grimberg
2017-02-17  9:05           ` [dm-devel] " Christoph Hellwig
2017-02-17 14:37             ` Mike Snitzer
2017-02-17  9:33         ` [dm-devel] " Christoph Hellwig
2017-02-17 14:32           ` Mike Snitzer

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=20170216023546.GB9078@redhat.com \
    --to=snitzer@redhat.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=dm-devel@redhat.com \
    --cc=keith.busch@intel.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