multipath: cleanup dev_loss_tmo issues
authorBenjamin Marzinski <bmarzins@redhat.com>
Fri, 10 Feb 2012 18:11:37 +0000 (12:11 -0600)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sat, 11 Feb 2012 08:20:02 +0000 (09:20 +0100)
commita8b432d1d32b2a59a67aa848d54c374bb3487f6f
tree420831d2a9961db152cccbec36b870963a073c81
parent03ec4efe8775f0ca076df3fb85b9defab4ffad30
multipath: cleanup dev_loss_tmo issues

There are a couple of issues with the dev_loss_tmo code.  First, the
comparison between fast_io_fail and dev_loss was failing for
fast_io_fail = -1. Second, if fast_io_fail_tmo was set to off, and
dev_loss was greater than 600, dev_loss_tmo would not be set. Finally,
verify_paths was calling sysfs_set_scsi_tmo without ever calling
select_fast_io_fail.  However, this hasn't be causing problems since
setup_map is always called immediately after verify_paths, and it calls
all the select_ functions correctly.  This patch fixes all these.  Now,
if setting dev_loss_tmo fails, and fast_io_fail is set to off, it will
retry will dev_loss_tmo set to 600. Also, the calls that are duplicated
between verify_paths and setup_map have been removed.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/discovery.c
libmultipath/structs_vec.c