multipath: add fast_io_fail and dev_loss_tmo config parameters
This patch adds two new configuration parameters to multipath.conf,
fast_io_fail_tmo and dev_loss_tmo which set
/sys/class/fc_remote_ports/rport-<host>:<channel>-<rport_id>/fast_io_fail_tmo and
/sys/class/fc_remote_ports/rport-<host>:<channel>-<rport_id>/dev_loss_tmo
Index: multipath-tools-100322/multipath.conf.annotated
================================================== =================
--- multipath-tools-100322.orig/multipath.conf.annotated
+++ multipath-tools-100322/multipath.conf.annotated
@@ -191,6 +191,25 @@
# # default : determined by the process
# gid disk
#
+# #
+# # name : fast_io_fail_tmo
+# # scope : multipath & multipathd
+# # desc : The number of seconds the scsi layer will wait after a
+# # problem has been detected on a FC remote port before failing
+# # IO to devices on that remote port.
+# # values : off | n >= 0 (smaller than dev_loss_tmo)
+# # default : determined by the OS
+# fast_io_fail_tmo 5
+#
+# #
+# # name : dev_loss_tmo
+# # scope : multipath & multipathd
+# # desc : The number of seconds the scsi layer will wait after a
+# # problem has been detected on a FC remote port before
+# # removing it from the system.
+# # values : n > 0
+# # default : determined by the OS
+# dev_loss_tmo 600
#}
#
##
@@ -504,7 +523,6 @@
# # desc : If set to "yes", multipathd will disable queueing
# # when the last path to a device has been deleted.
# # values : yes|no
-# # default : no
# #
# flush_on_last_del yes
#
@@ -514,6 +532,24 @@
# # desc : product strings to blacklist for this vendor
# #
# product_blacklist LUN_Z
+#
+# #
+# # name : fast_io_fail_tmo
+# # scope : multipath & multipathd
+# # desc : The number of seconds the scsi layer will wait after
+# # a problem has been detected on a FC remote port
+# # before failing IO to devices on that remote port.
+# # values : off | n >= 0 (smaller than dev_loss_tmo)
+# fast_io_fail_tmo 5
+#
+# #
+# # name : dev_loss_tmo
+# # scope : multipath & multipathd
+# # desc : The number of seconds the scsi layer will wait after
+# # a problem has been detected on a FC remote port
+# # before removing it from the system.
+# # values : n > 0
+# dev_loss_tmo 600
# }
# device {
# vendor "COMPAQ "
Index: multipath-tools-100322/multipath/multipath.conf.5
================================================== =================
--- multipath-tools-100322.orig/multipath/multipath.conf.5
+++ multipath-tools-100322/multipath/multipath.conf.5
@@ -240,6 +240,17 @@ this to the system limit from /proc/sys/
maximum number of open fds is taken from the calling process. It is usually
1024. To be safe, this should be set to the maximum number of paths plus 32,
if that number is greated than 1024.
+.TP
+.B fast_io_fail_tmo
+Specify the number of seconds the scsi layer will wait after a problem has been
+detected on a FC remote port before failing IO to devices on that remote port.
+This should be smaller than dev_loss_tmo. Setting this to
+.I off
+will disable the timeout.
+.TP
+.B dev_loss_tmo
+Specify the number of seconds the scsi layer will wait after a problem has
+been detected on a FC remote port before removing it from the system.
.
.SH "blacklist section"
The
@@ -384,6 +395,10 @@ section:
.B no_path_retry
.TP
.B rr_min_io
+.TP
+.B fast_io_fail_tmo
+.TP
+.B dev_loss_tmo
.RE
.PD
.LP
Index: multipath-tools-100322/libmultipath/dict.c
================================================== =================
--- multipath-tools-100322.orig/libmultipath/dict.c
+++ multipath-tools-100322/libmultipath/dict.c
@@ -37,6 +37,35 @@ polling_interval_handler(vector strvec)
}
+ sysfs_set_scsi_tmo(mpp);
/*
* assign paths to path groups -- start with no groups and all paths
* in mpp->paths
Index: multipath-tools-100322/libmultipath/discovery.c
================================================== =================
--- multipath-tools-100322.orig/libmultipath/discovery.c
+++ multipath-tools-100322/libmultipath/discovery.c
@@ -204,6 +204,43 @@ sysfs_get_fc_nodename (struct sysfs_devi
return 1;
}