libmultipath: don't try to set hwhandler if it is retained
authorMartin Wilck <mwilck@suse.com>
Sat, 13 Jan 2018 21:19:19 +0000 (22:19 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 7 Mar 2018 08:27:48 +0000 (09:27 +0100)
commitd11a6f5aabf8c4b7d3b5864dcc6869f89e18382a
tree67a3bce9adeb0dc45709eb9389027d3391f8b703
parent07e7bd579ea22e3de0f6481643e9b0809cd76210
libmultipath: don't try to set hwhandler if it is retained

Setting a device handler only works if retain_attached_hw_handler
is 'no', or if the kernel didn't auto-assign a handler. If this
is not the case, don't even attempt to set a different handler.

This requires reading the sysfs "dh_state" path attribute.
libmultipath/configure.c
libmultipath/propsel.c