public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Mike Snitzer <snitzer@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Hannes Reinecke <hare@suse.de>,
	James Bottomley <jbottomley@parallels.com>,
	linux-scsi@vger.kernel.org, dm-devel@redhat.com
Subject: Re: Kernel bug triggered in multipath
Date: Sat, 15 Mar 2014 06:22:57 -0700	[thread overview]
Message-ID: <20140315132257.GB13647@infradead.org> (raw)
In-Reply-To: <20140314162111.GB14188@redhat.com>

On Fri, Mar 14, 2014 at 12:21:11PM -0400, Mike Snitzer wrote:
> DM multipath has a role in insuring the desired scsi_dh is attached and
> that it holds a reference on the attached scsi_dh.
> 
> I'm open to ideas of how dm-multipath could avoid having _any_ role here
> but it isn't so simple to avoid, dm-multipath does 3 things in this
> area (ranging from lightest to heaviest relative to scsi_dh interface use):
> 1) get reference on scsi_dh that is already attached -- most widely used
>    now that the scsi_dh matching code has been improved to get correct
>    scsi_dh attached during scsi device scan)
> 2) no scsi_dh was attached, but one should be -- really shouldn't happen
>    anymore
> 3) switch from the scsi_dh that was auto-attached by scsi_dh matching to
>    some user-specified override -- shouldn't be needed now but a user may
>    have a custom scsi_dh they've developed.

What we currently have surely is a bit of a layering violation.  I don't
think it's urgent or overly important to fix it now, but I see two ways
out:

 a) move the handler registration to dm-multipath.  This still leaves
 the problem on figuring out if a handler supports a device, but at
 least that problem is inside the handlers now.
 b) move the path selectors to the block layer, and have the methods
 provided indirect off the requeuest_queue

b) seems like the cleanest layering, although in the case of SCSI (the
only one that matters at the moment) that would give us a double
indirection.


      parent reply	other threads:[~2014-03-15 13:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-14 11:13 [PATCH] Kernel bug triggered in multipath Hannes Reinecke
2014-03-14 11:15 ` Christoph Hellwig
2014-03-14 16:21   ` Mike Snitzer
2014-03-14 16:26     ` Mike Snitzer
2014-03-15 13:23       ` Christoph Hellwig
2014-03-15 13:22     ` Christoph Hellwig [this message]

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=20140315132257.GB13647@infradead.org \
    --to=hch@infradead.org \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.de \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=snitzer@redhat.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