Stop annoying prio_lookup warning messages

Multipath shouldn't try to look up its prioritizer if it doesn't have
one. Doing so just causes annoying warning messages.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Correctly ignore empty prio names

This is a partial revert of commit
'Stop annoying prio_lookup warning messages',
as that patch would only fix the 'prio_put' case.
However, as the prio name might be empty even in
in prio_get() we should rather fix this in
prio_lookup() and handle both cases.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Check for correct return value from sysfs_get_attr_value()

sysfs_get_attr_value() will return 0 on failure and the size of
the attribute value on success. So fixup all callers to check
for the correct return values.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Improve logging for orphan_path()

orphan_path() is called from various sections, so add a
description to the call to aid debugging.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Fixup check for blocked paths

During reconfiguration the FC remote port will become blocked,
aborting all I/O to it. However, on SP2 any SCSI devices presented
by that port will move to 'running', causing I/O errors and
confusing multipath to no end.
So we need to check for the rport state prior to check the SCSI
device state to figure out whether we can talk to the device.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Set priority to '0' for PATH_BLOCKED or PATH_DOWN

When a path is down or blocked we need to initialize the priority
to '0'. Otherwise multipathd will discard the maps during reload
and fail to start if all paths are temporarily down.

References: bnc#831608

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