multipath: print sysfs state in fast list mode
authorBenjamin Marzinski <bmarzins@redhat.com>
Tue, 13 Feb 2018 03:42:14 +0000 (21:42 -0600)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 7 Mar 2018 09:11:38 +0000 (10:11 +0100)
commit2e19037ef2440f35535c8f8a824831c37ea904e8
tree06e4a45578e4201806c69c40f2c5fc21755d29ee
parent719c01aefae7075253db0be98232db9d41836db2
multipath: print sysfs state in fast list mode

commit b123e711ea2a4b471a98ff5e26815df3773636b5 "libmultipath: cleanup
orphan device states" stopped multipathd from showing old state for
orphan paths by checking if pp->mpp was set, and only printing the state
if it was.   Unfortunately, when "multipath -l" is run, pp->mpp isn't
set. While the checker state isn't checked and shouldn't be printed with
"-l", the sysfs state can be, and was before b123e711. This patch sets
pp->mpp in fast list mode, so that the sysfs state gets printed. It
also verifies that the path exists in sysfs, and if not, marks it as
faulty.

Reviewed-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
multipath/main.c