Blame SOURCES/0100-libmultipath-Set-the-scsi-timeout-parameters-by-path.patch

aab12e
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
aab12e
From: Benjamin Marzinski <bmarzins@redhat.com>
aab12e
Date: Wed, 13 Apr 2022 23:27:38 -0500
aab12e
Subject: [PATCH] libmultipath: Set the scsi timeout parameters by path
aab12e
aab12e
Instead of dev_loss, fast_io_fail, and eh_deadline belonging to the
aab12e
multipath structure, have them belong to the path structure. This means
aab12e
that they are selected per path, and that sysfs_set_scsi_tmo() doesn't
aab12e
assume that all paths of a multipath device will have the same value.
aab12e
Currently they will all be the same, but a future patch will make it
aab12e
possible for paths to have different values based on their protocol.
aab12e
aab12e
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
aab12e
Reviewed-by: Martin Wilck <mwilck@suse.com>
aab12e
---
aab12e
 libmultipath/configure.c |   5 +-
aab12e
 libmultipath/discovery.c | 149 +++++++++++++++++++++++----------------
aab12e
 libmultipath/discovery.h |   2 +-
aab12e
 libmultipath/propsel.c   |  42 +++++------
aab12e
 libmultipath/propsel.h   |   6 +-
aab12e
 libmultipath/structs.c   |   1 -
aab12e
 libmultipath/structs.h   |   6 +-
aab12e
 7 files changed, 118 insertions(+), 93 deletions(-)
aab12e
aab12e
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
aab12e
index 9a9890f5..6cad0468 100644
aab12e
--- a/libmultipath/configure.c
aab12e
+++ b/libmultipath/configure.c
aab12e
@@ -338,9 +338,6 @@ int setup_map(struct multipath *mpp, char *params, int params_size,
aab12e
 	select_mode(conf, mpp);
aab12e
 	select_uid(conf, mpp);
aab12e
 	select_gid(conf, mpp);
aab12e
-	select_fast_io_fail(conf, mpp);
aab12e
-	select_dev_loss(conf, mpp);
aab12e
-	select_eh_deadline(conf, mpp);
aab12e
 	select_reservation_key(conf, mpp);
aab12e
 	select_deferred_remove(conf, mpp);
aab12e
 	select_marginal_path_err_sample_time(conf, mpp);
aab12e
@@ -356,7 +353,7 @@ int setup_map(struct multipath *mpp, char *params, int params_size,
aab12e
 	select_ghost_delay(conf, mpp);
aab12e
 	select_flush_on_last_del(conf, mpp);
aab12e
 
aab12e
-	sysfs_set_scsi_tmo(mpp, conf->checkint);
aab12e
+	sysfs_set_scsi_tmo(conf, mpp);
aab12e
 	marginal_pathgroups = conf->marginal_pathgroups;
aab12e
 	pthread_cleanup_pop(1);
aab12e
 
aab12e
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
aab12e
index 2404cb87..36cc389e 100644
aab12e
--- a/libmultipath/discovery.c
aab12e
+++ b/libmultipath/discovery.c
aab12e
@@ -581,13 +581,13 @@ sysfs_get_asymmetric_access_state(struct path *pp, char *buff, int buflen)
aab12e
 }
aab12e
 
aab12e
 static int
aab12e
-sysfs_set_eh_deadline(struct multipath *mpp, struct path *pp)
aab12e
+sysfs_set_eh_deadline(struct path *pp)
aab12e
 {
aab12e
 	struct udev_device *hostdev;
aab12e
 	char host_name[HOST_NAME_LEN], value[16];
aab12e
 	int ret;
aab12e
 
aab12e
-	if (mpp->eh_deadline == EH_DEADLINE_UNSET)
aab12e
+	if (pp->eh_deadline == EH_DEADLINE_UNSET)
aab12e
 		return 0;
aab12e
 
aab12e
 	sprintf(host_name, "host%d", pp->sg_id.host_no);
aab12e
@@ -596,12 +596,12 @@ sysfs_set_eh_deadline(struct multipath *mpp, struct path *pp)
aab12e
 	if (!hostdev)
aab12e
 		return 1;
aab12e
 
aab12e
-	if (mpp->eh_deadline == EH_DEADLINE_OFF)
aab12e
+	if (pp->eh_deadline == EH_DEADLINE_OFF)
aab12e
 		sprintf(value, "off");
aab12e
-	else if (mpp->eh_deadline == EH_DEADLINE_ZERO)
aab12e
+	else if (pp->eh_deadline == EH_DEADLINE_ZERO)
aab12e
 		sprintf(value, "0");
aab12e
 	else
aab12e
-		snprintf(value, 16, "%u", mpp->eh_deadline);
aab12e
+		snprintf(value, 16, "%u", pp->eh_deadline);
aab12e
 
aab12e
 	ret = sysfs_attr_set_value(hostdev, "eh_deadline",
aab12e
 				   value, strlen(value));
aab12e
@@ -625,6 +625,9 @@ sysfs_set_rport_tmo(struct multipath *mpp, struct path *pp)
aab12e
 	unsigned int tmo;
aab12e
 	int ret;
aab12e
 
aab12e
+	if (!pp->dev_loss && pp->fast_io_fail == MP_FAST_IO_FAIL_UNSET)
aab12e
+		return;
aab12e
+
aab12e
 	sprintf(rport_id, "rport-%d:%d-%d",
aab12e
 		pp->sg_id.host_no, pp->sg_id.channel, pp->sg_id.transport_id);
aab12e
 	rport_dev = udev_device_new_from_subsystem_sysname(udev,
aab12e
@@ -664,14 +667,14 @@ sysfs_set_rport_tmo(struct multipath *mpp, struct path *pp)
aab12e
 	 * then set fast_io_fail, and _then_ set dev_loss_tmo
aab12e
 	 * to the correct value.
aab12e
 	 */
aab12e
-	if (mpp->fast_io_fail != MP_FAST_IO_FAIL_UNSET &&
aab12e
-	    mpp->fast_io_fail != MP_FAST_IO_FAIL_ZERO &&
aab12e
-	    mpp->fast_io_fail != MP_FAST_IO_FAIL_OFF) {
aab12e
+	if (pp->fast_io_fail != MP_FAST_IO_FAIL_UNSET &&
aab12e
+	    pp->fast_io_fail != MP_FAST_IO_FAIL_ZERO &&
aab12e
+	    pp->fast_io_fail != MP_FAST_IO_FAIL_OFF) {
aab12e
 		/* Check if we need to temporarily increase dev_loss_tmo */
aab12e
-		if ((unsigned int)mpp->fast_io_fail >= tmo) {
aab12e
+		if ((unsigned int)pp->fast_io_fail >= tmo) {
aab12e
 			/* Increase dev_loss_tmo temporarily */
aab12e
 			snprintf(value, sizeof(value), "%u",
aab12e
-				 (unsigned int)mpp->fast_io_fail + 1);
aab12e
+				 (unsigned int)pp->fast_io_fail + 1);
aab12e
 			ret = sysfs_attr_set_value(rport_dev, "dev_loss_tmo",
aab12e
 						   value, strlen(value));
aab12e
 			if (ret <= 0) {
aab12e
@@ -685,20 +688,20 @@ sysfs_set_rport_tmo(struct multipath *mpp, struct path *pp)
aab12e
 				goto out;
aab12e
 			}
aab12e
 		}
aab12e
-	} else if (mpp->dev_loss > DEFAULT_DEV_LOSS_TMO &&
aab12e
-		mpp->no_path_retry != NO_PATH_RETRY_QUEUE) {
aab12e
+	} else if (pp->dev_loss > DEFAULT_DEV_LOSS_TMO &&
aab12e
+		   mpp->no_path_retry != NO_PATH_RETRY_QUEUE) {
aab12e
 		condlog(3, "%s: limiting dev_loss_tmo to %d, since "
aab12e
 			"fast_io_fail is not set",
aab12e
 			rport_id, DEFAULT_DEV_LOSS_TMO);
aab12e
-		mpp->dev_loss = DEFAULT_DEV_LOSS_TMO;
aab12e
+		pp->dev_loss = DEFAULT_DEV_LOSS_TMO;
aab12e
 	}
aab12e
-	if (mpp->fast_io_fail != MP_FAST_IO_FAIL_UNSET) {
aab12e
-		if (mpp->fast_io_fail == MP_FAST_IO_FAIL_OFF)
aab12e
+	if (pp->fast_io_fail != MP_FAST_IO_FAIL_UNSET) {
aab12e
+		if (pp->fast_io_fail == MP_FAST_IO_FAIL_OFF)
aab12e
 			sprintf(value, "off");
aab12e
-		else if (mpp->fast_io_fail == MP_FAST_IO_FAIL_ZERO)
aab12e
+		else if (pp->fast_io_fail == MP_FAST_IO_FAIL_ZERO)
aab12e
 			sprintf(value, "0");
aab12e
 		else
aab12e
-			snprintf(value, 16, "%u", mpp->fast_io_fail);
aab12e
+			snprintf(value, 16, "%u", pp->fast_io_fail);
aab12e
 		ret = sysfs_attr_set_value(rport_dev, "fast_io_fail_tmo",
aab12e
 					   value, strlen(value));
aab12e
 		if (ret <= 0) {
aab12e
@@ -709,8 +712,8 @@ sysfs_set_rport_tmo(struct multipath *mpp, struct path *pp)
aab12e
 					rport_id, value, -ret);
aab12e
 		}
aab12e
 	}
aab12e
-	if (mpp->dev_loss > 0) {
aab12e
-		snprintf(value, 16, "%u", mpp->dev_loss);
aab12e
+	if (pp->dev_loss > 0) {
aab12e
+		snprintf(value, 16, "%u", pp->dev_loss);
aab12e
 		ret = sysfs_attr_set_value(rport_dev, "dev_loss_tmo",
aab12e
 					   value, strlen(value));
aab12e
 		if (ret <= 0) {
aab12e
@@ -726,7 +729,7 @@ out:
aab12e
 }
aab12e
 
aab12e
 static void
aab12e
-sysfs_set_session_tmo(struct multipath *mpp, struct path *pp)
aab12e
+sysfs_set_session_tmo(struct path *pp)
aab12e
 {
aab12e
 	struct udev_device *session_dev = NULL;
aab12e
 	char session_id[64];
aab12e
@@ -743,18 +746,18 @@ sysfs_set_session_tmo(struct multipath *mpp, struct path *pp)
aab12e
 	condlog(4, "target%d:%d:%d -> %s", pp->sg_id.host_no,
aab12e
 		pp->sg_id.channel, pp->sg_id.scsi_id, session_id);
aab12e
 
aab12e
-	if (mpp->dev_loss) {
aab12e
+	if (pp->dev_loss) {
aab12e
 		condlog(3, "%s: ignoring dev_loss_tmo on iSCSI", pp->dev);
aab12e
 	}
aab12e
-	if (mpp->fast_io_fail != MP_FAST_IO_FAIL_UNSET) {
aab12e
-		if (mpp->fast_io_fail == MP_FAST_IO_FAIL_OFF) {
aab12e
+	if (pp->fast_io_fail != MP_FAST_IO_FAIL_UNSET) {
aab12e
+		if (pp->fast_io_fail == MP_FAST_IO_FAIL_OFF) {
aab12e
 			condlog(3, "%s: can't switch off fast_io_fail_tmo "
aab12e
 				"on iSCSI", pp->dev);
aab12e
-		} else if (mpp->fast_io_fail == MP_FAST_IO_FAIL_ZERO) {
aab12e
+		} else if (pp->fast_io_fail == MP_FAST_IO_FAIL_ZERO) {
aab12e
 			condlog(3, "%s: can't set fast_io_fail_tmo to '0'"
aab12e
 				"on iSCSI", pp->dev);
aab12e
 		} else {
aab12e
-			snprintf(value, 11, "%u", mpp->fast_io_fail);
aab12e
+			snprintf(value, 11, "%u", pp->fast_io_fail);
aab12e
 			if (sysfs_attr_set_value(session_dev, "recovery_tmo",
aab12e
 						 value, strlen(value)) <= 0) {
aab12e
 				condlog(3, "%s: Failed to set recovery_tmo, "
aab12e
@@ -767,12 +770,15 @@ sysfs_set_session_tmo(struct multipath *mpp, struct path *pp)
aab12e
 }
aab12e
 
aab12e
 static void
aab12e
-sysfs_set_nexus_loss_tmo(struct multipath *mpp, struct path *pp)
aab12e
+sysfs_set_nexus_loss_tmo(struct path *pp)
aab12e
 {
aab12e
 	struct udev_device *sas_dev = NULL;
aab12e
 	char end_dev_id[64];
aab12e
 	char value[11];
aab12e
 
aab12e
+	if (!pp->udev || !pp->dev_loss)
aab12e
+		return;
aab12e
+
aab12e
 	sprintf(end_dev_id, "end_device-%d:%d",
aab12e
 		pp->sg_id.host_no, pp->sg_id.transport_id);
aab12e
 	sas_dev = udev_device_new_from_subsystem_sysname(udev,
aab12e
@@ -785,8 +791,8 @@ sysfs_set_nexus_loss_tmo(struct multipath *mpp, struct path *pp)
aab12e
 	condlog(4, "target%d:%d:%d -> %s", pp->sg_id.host_no,
aab12e
 		pp->sg_id.channel, pp->sg_id.scsi_id, end_dev_id);
aab12e
 
aab12e
-	if (mpp->dev_loss) {
aab12e
-		snprintf(value, 11, "%u", mpp->dev_loss);
aab12e
+	if (pp->dev_loss) {
aab12e
+		snprintf(value, 11, "%u", pp->dev_loss);
aab12e
 		if (sysfs_attr_set_value(sas_dev, "I_T_nexus_loss_timeout",
aab12e
 					 value, strlen(value)) <= 0)
aab12e
 			condlog(3, "%s: failed to update "
aab12e
@@ -798,53 +804,76 @@ sysfs_set_nexus_loss_tmo(struct multipath *mpp, struct path *pp)
aab12e
 }
aab12e
 
aab12e
 int
aab12e
-sysfs_set_scsi_tmo (struct multipath *mpp, unsigned int checkint)
aab12e
+sysfs_set_scsi_tmo (struct config *conf, struct multipath *mpp)
aab12e
 {
aab12e
 	struct path *pp;
aab12e
 	int i;
aab12e
-	unsigned int dev_loss_tmo = mpp->dev_loss;
aab12e
+	unsigned int min_dev_loss = 0;
aab12e
+	bool warn_dev_loss = false;
aab12e
+	bool warn_fast_io_fail = false;
aab12e
 
aab12e
 	if (mpp->no_path_retry > 0) {
aab12e
 		uint64_t no_path_retry_tmo =
aab12e
-			(uint64_t)mpp->no_path_retry * checkint;
aab12e
+			(uint64_t)mpp->no_path_retry * conf->checkint;
aab12e
 
aab12e
 		if (no_path_retry_tmo > MAX_DEV_LOSS_TMO)
aab12e
-			no_path_retry_tmo = MAX_DEV_LOSS_TMO;
aab12e
-		if (no_path_retry_tmo > dev_loss_tmo)
aab12e
-			dev_loss_tmo = no_path_retry_tmo;
aab12e
-		condlog(3, "%s: update dev_loss_tmo to %u",
aab12e
-			mpp->alias, dev_loss_tmo);
aab12e
-	} else if (mpp->no_path_retry == NO_PATH_RETRY_QUEUE) {
aab12e
-		dev_loss_tmo = MAX_DEV_LOSS_TMO;
aab12e
-		condlog(3, "%s: update dev_loss_tmo to %u",
aab12e
-			mpp->alias, dev_loss_tmo);
aab12e
-	}
aab12e
-	mpp->dev_loss = dev_loss_tmo;
aab12e
-	if (mpp->dev_loss && mpp->fast_io_fail > 0 &&
aab12e
-	    (unsigned int)mpp->fast_io_fail >= mpp->dev_loss) {
aab12e
-		condlog(3, "%s: turning off fast_io_fail (%d is not smaller than dev_loss_tmo)",
aab12e
-			mpp->alias, mpp->fast_io_fail);
aab12e
-		mpp->fast_io_fail = MP_FAST_IO_FAIL_OFF;
aab12e
-	}
aab12e
-	if (!mpp->dev_loss && mpp->fast_io_fail == MP_FAST_IO_FAIL_UNSET &&
aab12e
-	    mpp->eh_deadline == EH_DEADLINE_UNSET)
aab12e
-		return 0;
aab12e
+			min_dev_loss = MAX_DEV_LOSS_TMO;
aab12e
+		else
aab12e
+			min_dev_loss = no_path_retry_tmo;
aab12e
+	} else if (mpp->no_path_retry == NO_PATH_RETRY_QUEUE)
aab12e
+		min_dev_loss = MAX_DEV_LOSS_TMO;
aab12e
 
aab12e
 	vector_foreach_slot(mpp->paths, pp, i) {
aab12e
+		select_fast_io_fail(conf, pp);
aab12e
+		select_dev_loss(conf, pp);
aab12e
+		select_eh_deadline(conf, pp);
aab12e
+
aab12e
+		if (!pp->dev_loss && pp->eh_deadline == EH_DEADLINE_UNSET &&
aab12e
+		    pp->fast_io_fail == MP_FAST_IO_FAIL_UNSET)
aab12e
+			continue;
aab12e
+
aab12e
 		if (pp->bus != SYSFS_BUS_SCSI)
aab12e
 			continue;
aab12e
+		sysfs_set_eh_deadline(pp);
aab12e
+
aab12e
+		if (!pp->dev_loss && pp->fast_io_fail == MP_FAST_IO_FAIL_UNSET)
aab12e
+			continue;
aab12e
+
aab12e
+		if (pp->sg_id.proto_id != SCSI_PROTOCOL_FCP &&
aab12e
+		    pp->sg_id.proto_id != SCSI_PROTOCOL_ISCSI &&
aab12e
+		    pp->sg_id.proto_id != SCSI_PROTOCOL_SAS)
aab12e
+			continue;
aab12e
+
aab12e
+		if (pp->dev_loss > 0 && pp->dev_loss < min_dev_loss) {
aab12e
+			warn_dev_loss = true;
aab12e
+			pp->dev_loss = min_dev_loss;
aab12e
+		}
aab12e
+		if (pp->dev_loss > 0 && pp->fast_io_fail > 0 &&
aab12e
+		    (unsigned int)pp->fast_io_fail >= pp->dev_loss) {
aab12e
+			warn_fast_io_fail = true;
aab12e
+			pp->fast_io_fail = MP_FAST_IO_FAIL_OFF;
aab12e
+		}
aab12e
 
aab12e
-		if (mpp->dev_loss ||
aab12e
-		    mpp->fast_io_fail != MP_FAST_IO_FAIL_UNSET) {
aab12e
-			if (pp->sg_id.proto_id == SCSI_PROTOCOL_FCP)
aab12e
-				sysfs_set_rport_tmo(mpp, pp);
aab12e
-			else if (pp->sg_id.proto_id == SCSI_PROTOCOL_ISCSI)
aab12e
-				sysfs_set_session_tmo(mpp, pp);
aab12e
-			else if (pp->sg_id.proto_id == SCSI_PROTOCOL_SAS)
aab12e
-				sysfs_set_nexus_loss_tmo(mpp, pp);
aab12e
+		switch (pp->sg_id.proto_id) {
aab12e
+		case SCSI_PROTOCOL_FCP:
aab12e
+			sysfs_set_rport_tmo(mpp, pp);
aab12e
+			break;
aab12e
+		case SCSI_PROTOCOL_ISCSI:
aab12e
+			sysfs_set_session_tmo(pp);
aab12e
+			break;
aab12e
+		case SCSI_PROTOCOL_SAS:
aab12e
+			sysfs_set_nexus_loss_tmo(pp);
aab12e
+			break;
aab12e
+		default:
aab12e
+			break;
aab12e
 		}
aab12e
-		sysfs_set_eh_deadline(mpp, pp);
aab12e
 	}
aab12e
+	if (warn_dev_loss)
aab12e
+		condlog(2, "%s: Raising dev_loss_tmo to %u because of no_path_retry setting",
aab12e
+			mpp->alias, min_dev_loss);
aab12e
+	if (warn_fast_io_fail)
aab12e
+		condlog(3, "%s: turning off fast_io_fail (not smaller than dev_loss_tmo)",
aab12e
+			mpp->alias);
aab12e
 	return 0;
aab12e
 }
aab12e
 
aab12e
diff --git a/libmultipath/discovery.h b/libmultipath/discovery.h
aab12e
index a5446b4d..b6eea258 100644
aab12e
--- a/libmultipath/discovery.h
aab12e
+++ b/libmultipath/discovery.h
aab12e
@@ -42,7 +42,7 @@ int alloc_path_with_pathinfo (struct config *conf, struct udev_device *udevice,
aab12e
 int store_pathinfo (vector pathvec, struct config *conf,
aab12e
 		    struct udev_device *udevice, int flag,
aab12e
 		    struct path **pp_ptr);
aab12e
-int sysfs_set_scsi_tmo (struct multipath *mpp, unsigned int checkint);
aab12e
+int sysfs_set_scsi_tmo (struct config *conf, struct multipath *mpp);
aab12e
 int sysfs_get_timeout(const struct path *pp, unsigned int *timeout);
aab12e
 int sysfs_get_host_pci_name(const struct path *pp, char *pci_name);
aab12e
 int sysfs_get_iscsi_ip_address(const struct path *pp, char *ip_address);
aab12e
diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c
aab12e
index 127b3370..25326eb6 100644
aab12e
--- a/libmultipath/propsel.c
aab12e
+++ b/libmultipath/propsel.c
aab12e
@@ -766,51 +766,51 @@ int select_minio(struct config *conf, struct multipath *mp)
aab12e
 		return select_minio_bio(conf, mp);
aab12e
 }
aab12e
 
aab12e
-int select_fast_io_fail(struct config *conf, struct multipath *mp)
aab12e
+int select_fast_io_fail(struct config *conf, struct path *pp)
aab12e
 {
aab12e
 	const char *origin;
aab12e
 	char buff[12];
aab12e
 
aab12e
-	mp_set_ovr(fast_io_fail);
aab12e
-	mp_set_hwe(fast_io_fail);
aab12e
-	mp_set_conf(fast_io_fail);
aab12e
-	mp_set_default(fast_io_fail, DEFAULT_FAST_IO_FAIL);
aab12e
+	pp_set_ovr(fast_io_fail);
aab12e
+	pp_set_hwe(fast_io_fail);
aab12e
+	pp_set_conf(fast_io_fail);
aab12e
+	pp_set_default(fast_io_fail, DEFAULT_FAST_IO_FAIL);
aab12e
 out:
aab12e
-	print_undef_off_zero(buff, 12, mp->fast_io_fail);
aab12e
-	condlog(3, "%s: fast_io_fail_tmo = %s %s", mp->alias, buff, origin);
aab12e
+	print_undef_off_zero(buff, 12, pp->fast_io_fail);
aab12e
+	condlog(3, "%s: fast_io_fail_tmo = %s %s", pp->dev, buff, origin);
aab12e
 	return 0;
aab12e
 }
aab12e
 
aab12e
-int select_dev_loss(struct config *conf, struct multipath *mp)
aab12e
+int select_dev_loss(struct config *conf, struct path *pp)
aab12e
 {
aab12e
 	const char *origin;
aab12e
 	char buff[12];
aab12e
 
aab12e
-	mp_set_ovr(dev_loss);
aab12e
-	mp_set_hwe(dev_loss);
aab12e
-	mp_set_conf(dev_loss);
aab12e
-	mp->dev_loss = 0;
aab12e
+	pp_set_ovr(dev_loss);
aab12e
+	pp_set_hwe(dev_loss);
aab12e
+	pp_set_conf(dev_loss);
aab12e
+	pp->dev_loss = 0;
aab12e
 	return 0;
aab12e
 out:
aab12e
-	print_dev_loss(buff, 12, mp->dev_loss);
aab12e
-	condlog(3, "%s: dev_loss_tmo = %s %s", mp->alias, buff, origin);
aab12e
+	print_dev_loss(buff, 12, pp->dev_loss);
aab12e
+	condlog(3, "%s: dev_loss_tmo = %s %s", pp->dev, buff, origin);
aab12e
 	return 0;
aab12e
 }
aab12e
 
aab12e
-int select_eh_deadline(struct config *conf, struct multipath *mp)
aab12e
+int select_eh_deadline(struct config *conf, struct path *pp)
aab12e
 {
aab12e
 	const char *origin;
aab12e
 	char buff[12];
aab12e
 
aab12e
-	mp_set_ovr(eh_deadline);
aab12e
-	mp_set_hwe(eh_deadline);
aab12e
-	mp_set_conf(eh_deadline);
aab12e
-	mp->eh_deadline = EH_DEADLINE_UNSET;
aab12e
+	pp_set_ovr(eh_deadline);
aab12e
+	pp_set_hwe(eh_deadline);
aab12e
+	pp_set_conf(eh_deadline);
aab12e
+	pp->eh_deadline = EH_DEADLINE_UNSET;
aab12e
 	/* not changing sysfs in default cause, so don't print anything */
aab12e
 	return 0;
aab12e
 out:
aab12e
-	print_undef_off_zero(buff, 12, mp->eh_deadline);
aab12e
-	condlog(3, "%s: eh_deadline = %s %s", mp->alias, buff, origin);
aab12e
+	print_undef_off_zero(buff, 12, pp->eh_deadline);
aab12e
+	condlog(3, "%s: eh_deadline = %s %s", pp->dev, buff, origin);
aab12e
 	return 0;
aab12e
 }
aab12e
 
aab12e
diff --git a/libmultipath/propsel.h b/libmultipath/propsel.h
aab12e
index 72a7e33c..152ca44c 100644
aab12e
--- a/libmultipath/propsel.h
aab12e
+++ b/libmultipath/propsel.h
aab12e
@@ -16,9 +16,9 @@ int select_minio(struct config *conf, struct multipath *mp);
aab12e
 int select_mode(struct config *conf, struct multipath *mp);
aab12e
 int select_uid(struct config *conf, struct multipath *mp);
aab12e
 int select_gid(struct config *conf, struct multipath *mp);
aab12e
-int select_fast_io_fail(struct config *conf, struct multipath *mp);
aab12e
-int select_dev_loss(struct config *conf, struct multipath *mp);
aab12e
-int select_eh_deadline(struct config *conf, struct multipath *mp);
aab12e
+int select_fast_io_fail(struct config *conf, struct path *pp);
aab12e
+int select_dev_loss(struct config *conf, struct path *pp);
aab12e
+int select_eh_deadline(struct config *conf, struct path *pp);
aab12e
 int select_reservation_key(struct config *conf, struct multipath *mp);
aab12e
 int select_retain_hwhandler (struct config *conf, struct multipath * mp);
aab12e
 int select_detect_prio(struct config *conf, struct path * pp);
aab12e
diff --git a/libmultipath/structs.c b/libmultipath/structs.c
aab12e
index 19099bed..9f86eb69 100644
aab12e
--- a/libmultipath/structs.c
aab12e
+++ b/libmultipath/structs.c
aab12e
@@ -230,7 +230,6 @@ alloc_multipath (void)
aab12e
 		mpp->bestpg = 1;
aab12e
 		mpp->mpcontext = NULL;
aab12e
 		mpp->no_path_retry = NO_PATH_RETRY_UNDEF;
aab12e
-		mpp->fast_io_fail = MP_FAST_IO_FAIL_UNSET;
aab12e
 		dm_multipath_to_gen(mpp)->ops = &dm_gen_multipath_ops;
aab12e
 	}
aab12e
 	return mpp;
aab12e
diff --git a/libmultipath/structs.h b/libmultipath/structs.h
aab12e
index ab99852f..875e726e 100644
aab12e
--- a/libmultipath/structs.h
aab12e
+++ b/libmultipath/structs.h
aab12e
@@ -344,6 +344,9 @@ struct path {
aab12e
 	int marginal;
aab12e
 	int vpd_vendor_id;
aab12e
 	int recheck_wwid;
aab12e
+	int fast_io_fail;
aab12e
+	unsigned int dev_loss;
aab12e
+	int eh_deadline;
aab12e
 	/* configlet pointers */
aab12e
 	vector hwe;
aab12e
 	struct gen_path generic_path;
aab12e
@@ -371,7 +374,6 @@ struct multipath {
aab12e
 	int minio;
aab12e
 	int flush_on_last_del;
aab12e
 	int attribute_flags;
aab12e
-	int fast_io_fail;
aab12e
 	int retain_hwhandler;
aab12e
 	int deferred_remove;
aab12e
 	bool in_recovery;
aab12e
@@ -389,8 +391,6 @@ struct multipath {
aab12e
 	int needs_paths_uevent;
aab12e
 	int ghost_delay;
aab12e
 	int ghost_delay_tick;
aab12e
-	unsigned int dev_loss;
aab12e
-	int eh_deadline;
aab12e
 	uid_t uid;
aab12e
 	gid_t gid;
aab12e
 	mode_t mode;