multipath: don't start multipathd unnecessarily
authorMartin Wilck <mwilck@suse.com>
Thu, 28 Jun 2018 10:34:45 +0000 (12:34 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 2 Jul 2018 10:00:30 +0000 (12:00 +0200)
commit9f09dff068130c00ad8bdc5b21312326ddafd839
tree4e72e5db489d9d0466723df23e50028855a37e3f
parent1f96269307f26847231cf09fca70b878dd92dcaa
multipath: don't start multipathd unnecessarily

When multipathd is off, but systemd is monitoring the multipathd socket,
mpath_connect() has the side effect of starting multipathd. That's
superfluous if we aren't going to pass the command at hand to multipathd.
So, only try to open the socket if the command at hand is a candidate
for delegation.

Note: Despite this, some day in the future, we may decide to delegate
almost everything to multipathd.

Fixes: 506d253b "multipath: delegate dangerous commands to multipathd"
Signed-off-by: Martin Wilck <mwilck@suse.com>
multipath/main.c