multipathd: remove select_* from setup_multipath
authorBenjamin Marzinski <bmarzins@redhat.com>
Thu, 7 Dec 2017 18:49:01 +0000 (12:49 -0600)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sat, 13 Jan 2018 09:14:40 +0000 (10:14 +0100)
commit67008b114a0ceb5c5d4bf64661d9c49c407fbeb3
tree061f3b221020a4e9c1cf98a0dc0a904f0220901c
parent17231dd4befafd95f6a060affbab60fd45099d92
multipathd: remove select_* from setup_multipath

select_rr_weight() and select_pgfailback() don't need to be set each
time setup_multipath is called, since nothing ever changes the value
of the multipath variable that they set.

select_flush_on_last_del() and select_no_path retry() are a little more
involved.  In multipathd, it is possible to override no_path_retry by
either setting flush_on_last_del, or by manually running the
"disablequeueing" mutipathd command. Queueing gets restored when a path
gets added back to the multipath device. This was done by moving the
select_* functions into setup_multipath, where they frequently get
called unnecessarily.  select_flush_on_last_del() can get removed by
simply using another variable besides flush_on_last_del to track wether
or not we should be force queueing to be disabled.

Since it's only possible to change whether or not you have queueing
force disabled by reloading the device with path, or by manually
restoring it, there is no reason to call select_no_path_retry() on every
call to setup_multipath

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/configure.c
libmultipath/propsel.c
libmultipath/structs.h
libmultipath/structs_vec.c
multipathd/cli_handlers.c
multipathd/main.c