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