move the 'update_multipath_strings()' function up so that mpp->mpe can be assigned in some situation

This patch is correcting a bug about multipath's no_path_retry attribute.
When the multipath was just created by user cmd 'multipath', the DM driver
doesn't know the wwid of this dm device, so the 'set_multipath_wwid()'
function can't get the wwid for mpp at this time, then the mpp->mpe can't befind and assigned by wwid also. In that case, the following function
'set_no_path_retry()' can't able to use the value provided by mpp->mpe
which values were getted from file '/etc/multipath.conf'. But the fuction
'update_multipath_strings()' can assign the wwid to mpp from its path, so
move this function up to solve this problem.

Bug reproduce steps:
1.First, by setting 'no_path_retry fail', we have features='0'.
[root@localhost multipath-tools]# cat /etc/multipath.conf
...
	multipath {
		wwid 36000b5d0006a0000006a14e7000b0000
		alias                   yellow
		path_grouping_policy    failover
		no_path_retry		fail
	}
...
[root@localhost multipath-tools]# multipath -ll
yellow (36000b5d0006a0000006a14e7000b0000) dm-0
size=50G features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=130 status=active
| `- 0:0:0:0 sda 8:0    active ready running
`-+- policy='service-time 0' prio=130 status=enabled
  `- 1:0:0:0 sdc 8:32   active ready running
[root@localhost multipath-tools]#

2.Second, we flush all multipath device maps.
[root@localhost multipath-tools]# multipath -F
[root@localhost multipath-tools]#

3.Third, create all multipath device maps.
[root@localhost multipath-tools]# multipath
create: yellow (36000b5d0006a0000006a14e7000b0000) undef
size=50G features='0' hwhandler='0' wp=undef
|-+- policy='service-time 0' prio=130 status=undef
| `- 0:0:0:0 sda 8:0    undef ready running
`-+- policy='service-time 0' prio=130 status=undef
  `- 1:0:0:0 sdc 8:32   undef ready running
[root@localhost multipath-tools]#

4.The end, we found "features='1 queue_if_no_path'" and this is not what we
expect, it's a bug. After applying this patch, it can be corrected.
[root@localhost multipath-tools]# multipath -ll
yellow (36000b5d0006a0000006a14e7000b0000) dm-0
size=50G features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=130 status=active
| `- 0:0:0:0 sda 8:0    active ready running
`-+- policy='service-time 0' prio=130 status=enabled
  `- 1:0:0:0 sdc 8:32   active ready running
[root@localhost multipath-tools]#

Signed-off-by: Xinghai Yu <yuxinghai@cn.fujitsu.com>
Clarify uxsock logging

Socket creation might fail on various stages, so print out a
proper logging message.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Use system-provided regex implementation

There is zero value in carrying our own (old) regex implementation
around; we're far better off using the system-provided one.

Signed-off-by: Hannes Reinecke <hare@suse.de>
multipathd: Add option '-s' to suppress timestamps

systemd prefixes any messages to stdout with a timestamp, so it's
quite pointless to do it ourself.

Signed-off-by: Hannes Reinecke <hare@suse.de>
multipathd: switch to socket activation for systemd

multipathd already has a netlink socket for CLI commands, which
can be used for socket activation.

Signed-off-by: Hannes Reinecke <hare@suse.de>
multipathd: use sd_notify() to inform systemd

Implement sd_notify() to inform systemd about our internal state.
And we should be using the service type 'notify' so the systemd
doesn't try to flood multipathd if it's still in discovery.

Signed-off-by: Hannes Reinecke <hare@suse.de>
multipathd: Read environment variables from systemd

When systemd adjusts 'OOMScoreAdjust' and 'LimitNOFILE'
we should take those settings and not try to adjust them
again on our side.

Signed-off-by: Hannes Reinecke <hare@suse.de>
multipathd: measure path check time

Instrument code to measure path check time.

Signed-off-by: Hannes Reinecke <hare@suse.de>