<font size=2>Hello Ben,</font>
<br>
<br><font size=2>In multipath manual document, multipath -q command is
described as:</font>
<br><font size=2>"-q allow device tables with queue_if_no_path
when multiathd is not running"</font><font size=2 face="Times New Roman">.</font>
<br><font size=2>However the command does not take effect when we testing
it</font><font size=2 face="Times New Roman">.</font>
<br>
<br><font size=2>About use-case, In my opinion</font><font size=2 face="Times New Roman">,</font><font size=2>
sometimes we need to stop multipath service temporarily (for example: multipath
version upgrade), but we do not want IO interrupt during those times even
path down existed</font><font size=2 face="Times New Roman">,</font><font size=2>
so we can execute “multiath -q” to keep IO queue until we starting
service after version upgrade</font><font size=2 face="Times New Roman">.</font>
<br>
<br><font size=2>Cheers,</font>
<br><tt><font size=2>Tang</font></tt>
<br><font size=2 face="sans-serif"><br>
</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">发件人:
</font><font size=1 face="sans-serif">"Benjamin
Marzinski" <bmarzins@redhat.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">收件人:
</font><font size=1 face="sans-serif">Hannes Reinecke
<hare@suse.de>, </font>
<br><font size=1 color=#5f5f5f face="sans-serif">抄送:
</font><font size=1 face="sans-serif">Bart Van Assche
<bart.vanassche@sandisk.com>, device-mapper development <dm-devel@redhat.com>,
tang.junhui@zte.com.cn, zhang.kai16@zte.com.cn</font>
<br><font size=1 color=#5f5f5f face="sans-serif">日期:
</font><font size=1 face="sans-serif">2016/10/12
10:53</font>
<br><font size=1 color=#5f5f5f face="sans-serif">主题:
</font><font size=1 face="sans-serif">Re: [dm-devel]
[PATCH] libmultipath: fix multipath -q command logic</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 Tue, Oct 11, 2016 at 12:33:43PM +0200, Hannes Reinecke
wrote:<br>
> On 10/11/2016 11:17 AM, tang.junhui@zte.com.cn wrote:<br>
> >Hello Hannes, Ben,<br>
> >Could you have a review for this patch, any comment will be highly<br>
> >appreciated.<br>
> ><br>
> >Thanks,<br>
> >Tang<br>
> ><br>
> ><br>
> ><br>
> ><br>
> >发件人: Christophe Varoqui <christophe.varoqui@opensvc.com><br>
> >收件人: tang.junhui@zte.com.cn,<br>
> >抄送: Bart Van Assche <bart.vanassche@sandisk.com>,
device-mapper<br>
> >development <dm-devel@redhat.com>, zhang.kai16@zte.com.cn<br>
> >日期: 2016/10/11 14:59<br>
> >主题: Re: [dm-devel] [PATCH] libmultipath:
fix multipath -q<br>
> >command logic<br>
> >发件人: dm-devel-bounces@redhat.com<br>
> >------------------------------------------------------------------------<br>
> ><br>
> ><br>
> ><br>
> >Hannes, Ben,<br>
> ><br>
> >are you ok with the solution to these two issues.<br>
> >Seems sane to me.<br>
> ><br>
> This actually is only part of the story.<br>
> <br>
> The whole idea of issuing 'multipath' is to check if a given path
_should_<br>
> be multipathed (as this is typically called from an udev event).<br>
> But as it's called from an udev event we cannot rely on the multipath
daemon<br>
> to be started; we might just handle an event which came in before
multipathd<br>
> got started from systemd.<br>
> So checking for the PID file is not enough, we need to check if the
daemon<br>
> will be started eventually.<br>
> And in fact checking the PID file or calling mpath_connect() is equivalent,<br>
> with the added advantage the mpath_connect() will start the daemon
_if<br>
> enabled by systemd_.<br>
> So this patch doesn't help much, as it doesn't solve the main problem
of<br>
> figuring out if multipathd _should_ be started.<br>
> <br>
> I've done a patch for checking the '.wants' directories from systemd,
but<br>
> this obviously will only work if the OS is systemd-based.<br>
> And it's not really perfect, as there are corner-cases where just
checking<br>
> for the .wants directory is not enough.<br>
<br>
I think you are dealing with a different issue. the "-q"
option for<br>
multipath just overrides the default behaviour of not enabling<br>
queue_if_no_path when creating a multipath device is multipathd isn't<br>
running. For this, we don't care if multipathd will start running
in<br>
the future, because if/when multipathd does start up, it will set the<br>
queue_if_no_path flag itself. We only care about now, when we know it's<br>
not running.<br>
<br>
Really, I doubt that anyone ever uses the -q option. So your change in<br>
how multipath checks if multipathd is running is fine by me. However,<br>
you also changed what the "-q" option does. Previously,
it just kept<br>
multipath from disabling "queue_if_no_path" on devices that were<br>
configured to have it, when multipathd wasn't running. With your
code,<br>
doesn't it now make all devices set queue_if_no_path if multipathd isn't<br>
running, including devices that weren't configured to set it even when<br>
multipathd is running? Is there a reason for this? In general, setting<br>
"queue_if_no_path" when multiapthd isn't running is a bad idea,
since<br>
the paths will never come back, and nothing will ever disable the<br>
queueing. That's why I said that I doubt anybody uses the option.<br>
Forcing all devices to set "queue_if_no_path", even if they weren't<br>
configured to, seems even less useful. Or is there actually a use-case<br>
that I'm missing here?<br>
<br>
-Ben<br>
<br>
> <br>
> Cheers,<br>
> <br>
> Hannes<br>
> -- <br>
> Dr. Hannes Reinecke
zSeries & Storage<br>
> hare@suse.de
+49 911 74053 688<br>
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg<br>
> GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)<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>
<br>