<font size=2>Hello Mike:</font>
<br>
<br><font size=2>Thanks for your respond.</font>
<br>
<br><font size=2>> 1) in parse_path() you need to always initialize
q</font>
<br><font size=2>the condition of q initialization is </font>
<br><font size=2><i>if (m->retain_attached_hw_handler)”</i></font>
<br><font size=2>comparing with previous condition</font>
<br><font size=2><i>if (test_bit(MPATHF_RETAIN_ATTACHED_HW_HANDLER, &m->flags)
|| m->hw_handler_name)</i></font>
<br><font size=2>it does not increase the possibility of q initialization.</font>
<br>
<br><font size=2>> 2) setting m->hw_handler_name to attached_handler_name
needs to still</font>
<br><font size=2> > happen regardless of whether m->hw_handler_name
was previously set</font>
<br><font size=2>The patch does not change the logic above, does it? </font>
<br>
<br><font size=2>> 3) the "retain_attached_hw_handler" feature
should still be allowed on</font>
<br><font size=2> > the command line, no sense to break
multipath-tools</font>
<br><font size=2>Yes, actually I am still preparing two other patches now,
</font>
<br><font size=2>one patch modifies parse_features() to ignore unsupported
</font>
<br><font size=2>parameter and do not return failure. Another patch modifies
</font>
<br><font size=2>multipath to remove this parameter also.</font>
<br>
<br><font size=2>> In addition, your patch actually breaks the ability
to cope with –EBUSY</font>
<br><font size=2>> from the call to scsi_dh_attach(). Meaning
we wouldn't properly fall</font>
<br><font size=2>> back to retaining the attached hw handler.</font>
<br><font size=2>scsi_dh_attach() return –EBUSY only if that device has
attached </font>
<br><font size=2>a different handle, after previous processing, the handle
would </font>
<br><font size=2>be same, so it is impossible to return –EBUSY in scsi_dh_attach(),</font>
<br><font size=2>we do not need to process it.</font>
<br>
<br><font size=2>Regards,</font>
<br><font size=2>Tang</font>
<br><tt><font size=2><br>
</font></tt>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">发件人:
</font><font size=1 face="sans-serif">Mike Snitzer
<snitzer@redhat.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">收件人:
</font><font size=1 face="sans-serif">tang.junhui@zte.com.cn,
</font>
<br><font size=1 color=#5f5f5f face="sans-serif">抄送:
</font><font size=1 face="sans-serif">zhang.kai16@zte.com.cn,
dm-devel@redhat.com, agk@redhat.com</font>
<br><font size=1 color=#5f5f5f face="sans-serif">日期:
</font><font size=1 face="sans-serif">2016/11/29
05:52</font>
<br><font size=1 color=#5f5f5f face="sans-serif">主题:
</font><font size=1 face="sans-serif">Re: [dm-devel]
[PATCH 2/2] dm-mpath: Remove useless retain_attached_hw_handler parameter</font>
<br><font size=1 color=#5f5f5f face="sans-serif">发件人:
</font><font size=1 face="sans-serif">dm-devel-bounces@redhat.com</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>On Thu, Nov 24 2016 at 2:11am -0500,<br>
tang.junhui@zte.com.cn <tang.junhui@zte.com.cn> wrote:<br>
<br>
> From: "tang.junhui" <tang.junhui@zte.com.cn><br>
> <br>
> Hardware handle would be retained no matter parameter<br>
> retain_attached_hw_handler is set or not in the logic<br>
> of current code. So remove this useless parameter.<br>
<br>
Right, that wasn't always the case. Previously (before commit )<br>
dm-mpath would first detach the attached handler.<br>
<br>
I'm not completely opposed to removing the code that checks<br>
MPATHF_RETAIN_ATTACHED_HW_HANDLER in parse_path() but your proposed<br>
patch is broken in 2 ways:<br>
1) in parse_path() you need to always initialize q<br>
2) setting m->hw_handler_name to attached_handler_name needs to still<br>
happen regardless of whether m->hw_handler_name was previously
set<br>
3) the "retain_attached_hw_handler" feature should still be allowed
on<br>
the command line, no sense to break multipath-tools<br>
<br>
But honestly, I'm not seeing any reason to not just leave the existing<br>
code.<br>
<br>
--<br>
dm-devel mailing list<br>
dm-devel@redhat.com<br>
</font></tt><a href="https://www.redhat.com/mailman/listinfo/dm-devel"><tt><font size=2>https://www.redhat.com/mailman/listinfo/dm-devel</font></tt></a><tt><font size=2><br>
</font></tt>
<br>