Hello Christophe,

On Tue, 2020-03-03 at 00:35 +0100, Christophe Varoqui wrote:
> Hi Martin,
> 
> Thanks for pointing these missing patches.
> They are now merged.

Thanks. Still a nit: you picked v1 of my 
"libmultipath: drop mpp->nr_active field" patch (from Nov. 15th) rather
than v2 (from Nov. 20th):
https://www.redhat.com/archives/dm-devel/2019-November/msg00133.html

The v2 patch added some additional hunks (attached) and also a some
text in the commit message.

Regards,
Martin

-- 
Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107
SUSE  Software Solutions Germany GmbH
HRB 36809, AG Nürnberg GF: Felix
Imendörffer


diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index 0c5a3a81..3dbbaa0f 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -334,22 +334,23 @@ static void leave_recovery_mode(struct multipath *mpp)
 	}
 }
 
-void set_no_path_retry(struct multipath *mpp)
+void __set_no_path_retry(struct multipath *mpp, bool check_features)
 {
-	bool is_queueing = 0;
+	bool is_queueing;
 
-	if (mpp->features && strstr(mpp->features, "queue_if_no_path"))
-		is_queueing = 1;
+	check_features = check_features && mpp->features != NULL;
+	if (check_features)
+		is_queueing = strstr(mpp->features, "queue_if_no_path");
 
 	switch (mpp->no_path_retry) {
 	case NO_PATH_RETRY_UNDEF:
 		break;
 	case NO_PATH_RETRY_FAIL:
-		if (is_queueing)
+		if (!check_features || is_queueing)
 			dm_queue_if_no_path(mpp->alias, 0);
 		break;
 	case NO_PATH_RETRY_QUEUE:
-		if (!is_queueing)
+		if (!check_features || !is_queueing)
 			dm_queue_if_no_path(mpp->alias, 1);
 		break;
 	default:
@@ -358,7 +359,8 @@ void set_no_path_retry(struct multipath *mpp)
 			 * If in_recovery is set, leave_recovery_mode() takes
 			 * care of dm_queue_if_no_path. Otherwise, do it here.
 			 */
-			if (!is_queueing && !mpp->in_recovery)
+			if ((!check_features || !is_queueing) &&
+			    !mpp->in_recovery)
 				dm_queue_if_no_path(mpp->alias, 1);
 			leave_recovery_mode(mpp);
 		} else
diff --git a/libmultipath/structs_vec.h b/libmultipath/structs_vec.h
index 678efe4d..2a5e3d60 100644
--- a/libmultipath/structs_vec.h
+++ b/libmultipath/structs_vec.h
@@ -11,7 +11,8 @@ struct vectors {
 	vector mpvec;
 };
 
-void set_no_path_retry(struct multipath *mpp);
+void __set_no_path_retry(struct multipath *mpp, bool check_features);
+#define set_no_path_retry(mpp) __set_no_path_retry(mpp, true)
 
 int adopt_paths (vector pathvec, struct multipath * mpp);
 void orphan_paths(vector pathvec, struct multipath *mpp,
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to