All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: "Moger, Babu" <Babu.Moger@netapp.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	"device-mapper development (dm-devel@redhat.com)"
	<dm-devel@redhat.com>
Subject: Re: scsi_dh_rdac: Add empty set_params function to scsi_dh_rdac
Date: Wed, 8 Aug 2012 15:31:28 -0400	[thread overview]
Message-ID: <20120808193127.GA6064@redhat.com> (raw)
In-Reply-To: <77471C95FAFD844C8CA02DD4F4C5FE2B0BCA09F1@SACEXCMBX02-PRD.hq.netapp.com>

On Wed, Aug 08 2012 at 12:10pm -0400,
Moger, Babu <Babu.Moger@netapp.com> wrote:

> This patch adds empty set_params function to scsi_dh_rdac.
> 
> This patch is required for the following features to work properly.
> 1. add  retain_attached_hw_handler feature
> 
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=a58a935d5a1b2ad267017a68c3a1bca26226cc76
> 
> 2. add scsi_dh_attached_handler_name
> 
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=7e8a74b177f17d100916b6ad415450f7c9508691
> 
> 
> DM layer detaches the handler if the set_params is not implemented or fails.
> 
> For example if we pass following parameters from multipath:
> 
> 	features "1 retain_attached_hw_handler" (consider rdac as attached_hw_handler)
> 	hardware_handler "2 alua 1"
> 
> If the attached_hw_handler is rdac, then DM anyway tries to call set_params on rdac. Because rdac does not 
> implement set_params, scsi_dh_set_params fails and DM detaches the handler.
> 
> This patch fixes this problem. 
> 
> Signed-off-by: Babu Moger <babu.moger@netapp.com>

I think it'd be best to fix scsi_dh_set_params() so that it returns 0 if
scsi_dh->set_params is NULL.  That'd avoid all scsi_dh from having to
stub out a similar set_params to return 0.

But taking a step back, have you actually seen the problem you're saying
this patch fixes?

This problem shouldn't exist:
drivers/md/dm-mpath.c:parse_path will free m->hw_handler_params (and
reset it to NULL) if a scsi_dh is already attached.  Have a look at the
if (attached_handler_name) {} case.

Mike

  reply	other threads:[~2012-08-08 19:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08 16:10 [PATCH] scsi_dh_rdac: Add empty set_params function to scsi_dh_rdac Moger, Babu
2012-08-08 19:31 ` Mike Snitzer [this message]
2012-08-08 21:34   ` Moger, Babu

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=20120808193127.GA6064@redhat.com \
    --to=snitzer@redhat.com \
    --cc=Babu.Moger@netapp.com \
    --cc=dm-devel@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.