device-mapper-multipath/0018-RH-warn-on-bad-dev-loss-tmo.patch
Benjamin Marzinski 5fe519f23f Add back missing patches
Add 0012-RH-update-on-show-topology.patch
Add 0013-RH-manpage-update.patch
Add 0014-RH-RHEL5-style-partitions.patch
Add 0015-RH-add-followover.patch
Add 0016-RH-dont-remove-map-on-enomem.patch
Add 0017-RH-fix-shutdown-crash.patch
Add 0018-RH-warn-on-bad-dev-loss-tmo.patch
Add 0019-RH-deprecate-uid-gid-mode.patch
Add 0020-RH-dont-remove-map-twice.patch
Add 0021-RH-validate-guid-partitions.patch
Add 0022-RH-adjust-messages.patch
Add 0023-RH-manpage-update.patch
2012-02-10 09:34:20 -06:00

69 lines
2.5 KiB
Diff

---
libmultipath/discovery.c | 22 +++++++++++++++-------
libmultipath/structs_vec.c | 5 -----
2 files changed, 15 insertions(+), 12 deletions(-)
Index: multipath-tools-120123/libmultipath/discovery.c
===================================================================
--- multipath-tools-120123.orig/libmultipath/discovery.c
+++ multipath-tools-120123/libmultipath/discovery.c
@@ -299,17 +299,17 @@ sysfs_set_scsi_tmo (struct multipath *mp
no_path_retry_tmo = MAX_DEV_LOSS_TMO;
if (no_path_retry_tmo > dev_loss_tmo)
dev_loss_tmo = no_path_retry_tmo;
- condlog(3, "%s: update dev_loss_tmo to %d\n",
+ condlog(3, "%s: update dev_loss_tmo to %d",
mpp->alias, dev_loss_tmo);
} else if (mpp->no_path_retry == NO_PATH_RETRY_QUEUE) {
dev_loss_tmo = MAX_DEV_LOSS_TMO;
- condlog(4, "%s: update dev_loss_tmo to %d\n",
+ condlog(3, "%s: update dev_loss_tmo to %d",
mpp->alias, dev_loss_tmo);
}
mpp->dev_loss = dev_loss_tmo;
- if (mpp->fast_io_fail > mpp->dev_loss) {
+ if (mpp->fast_io_fail > (int)mpp->dev_loss) {
mpp->fast_io_fail = mpp->dev_loss;
- condlog(3, "%s: update fast_io_fail to %d\n",
+ condlog(3, "%s: update fast_io_fail to %d",
mpp->alias, mpp->fast_io_fail);
}
if (!mpp->dev_loss && !mpp->fast_io_fail)
@@ -333,9 +333,17 @@ sysfs_set_scsi_tmo (struct multipath *mp
snprintf(value, 11, "%u", mpp->dev_loss);
if (sysfs_attr_set_value(attr_path, "dev_loss_tmo",
value, 11) < 0) {
- condlog(0, "%s failed to set %s/dev_loss_tmo",
- mpp->alias, attr_path);
- return 1;
+ int err = 1;
+ if (mpp->fast_io_fail <= 0 && mpp->dev_loss > 600) {
+ strncpy(value, "600", 4);
+ condlog(3, "%s: limiting dev_loss_tmo to 600, since fast_io_fail is not set", mpp->alias);
+ if (sysfs_attr_set_value(attr_path, "dev_loss_tmo", value, 11) >= 0)
+ err = 0;
+ }
+ if (err) {
+ condlog(0, "%s failed to set %s/dev_loss_tmo", mpp->alias, attr_path);
+ return 1;
+ }
}
}
if (mpp->fast_io_fail){
Index: multipath-tools-120123/libmultipath/structs_vec.c
===================================================================
--- multipath-tools-120123.orig/libmultipath/structs_vec.c
+++ multipath-tools-120123/libmultipath/structs_vec.c
@@ -441,11 +441,6 @@ verify_paths(struct multipath * mpp, str
if (!mpp)
return 0;
- select_features(mpp);
- select_no_path_retry(mpp);
- select_dev_loss(mpp);
- sysfs_set_scsi_tmo(mpp);
-
vector_foreach_slot (mpp->paths, pp, i) {
/*
* see if path is in sysfs