From patchwork Mon Mar 31 23:17:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 14034209 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DD0D189528 for ; Mon, 31 Mar 2025 23:17:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743463062; cv=none; b=NwgBxQCJwsrgR4vvbDPMIImRQNytVqE3BktWjtfs4V8FRrkBQSqDXHqZOTSnbvRSeNVuWer6JfI5HpyFKsI/BuRD6bSHOuKEmHrnQA/kwAMLjmF5iXpmYtF1agyC9iHAVJPauImLW0V5U+mZP0Szv1DjM73hdFuk8AdBNg0GhDg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743463062; c=relaxed/simple; bh=CuN6+D5ZqtTmGk17pE7Z+aCbNysBVqnqk7UyBPXzhgc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:content-type; b=IHg0gWPiidObHSRKeZLYUl2kd8Vg6hXr3385P/JCtKj5wMmqcjELQqd3mCa1Mq0kPj+1YRXgx3mOskuXICRENm2gL/foroMtrw7iUwiKCTXqaGohZeSPR8V4wCVTF1axU0jCIj7DaKSjcCPamjyQnWLjavUo3eCUcPX5S6h3Z1c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=TkcbCBUE; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TkcbCBUE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743463057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z1u71JUgkCrZaaxyjgoiV8hcOXhStEfcLPqU6XJO4OM=; b=TkcbCBUEi3aktP3/A99yLU0FXLzh4v1PXskiHrsLEwEmFPH9sCavKvPPg1QaZaPxmiWfJ1 x79JqENs55tQmG4tSHP3d64H5pbh6KprWifSQJ/yc50PIXxpjMJu4nrCrhgM/7qY/UX77I IJ30VKPlr6ifDwloccDLEfmF6ze72GQ= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-231-BEDrj17YMOO74YhAR_Itvw-1; Mon, 31 Mar 2025 19:17:34 -0400 X-MC-Unique: BEDrj17YMOO74YhAR_Itvw-1 X-Mimecast-MFC-AGG-ID: BEDrj17YMOO74YhAR_Itvw_1743463053 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 15963195422C; Mon, 31 Mar 2025 23:17:33 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (unknown [10.6.23.247]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B18ED180174E; Mon, 31 Mar 2025 23:17:32 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (localhost [127.0.0.1]) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.18.1/8.17.1) with ESMTPS id 52VNHV842857671 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 31 Mar 2025 19:17:31 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.18.1/8.18.1/Submit) id 52VNHVEB2857670; Mon, 31 Mar 2025 19:17:31 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Martin Wilck Subject: [PATCH v2 1/3] multipathd: monitor new multipath dev even if we can't update it Date: Mon, 31 Mar 2025 19:17:28 -0400 Message-ID: <20250331231730.2857655-2-bmarzins@redhat.com> In-Reply-To: <20250331231730.2857655-1-bmarzins@redhat.com> References: <20250331231730.2857655-1-bmarzins@redhat.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: bS8Fb2lZq_hIUrU6gae4uPJqVs6h7dJt8Uoaycx9_mM_1743463053 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true If a multipath device was created by the multipath command, multipathd might not agree with how the device was created. ev_add_map() can reload the device with a different table by calling add_map_without_path() -> update_map(). If this reloading of the map failed, multipathd was simply ignoring the multipath device, even though it still existed. One way that reloading can fail is if a path that multipathd already has initialized goes offline. If a multipath device is created by the multipath command while the path is offline, it will not use the offline path, since multipath won't be able to get the necessary pathinfo. However, multipathd will already have the pathinfo for the path, and may not even know that it's offline, since the path is an orphan. When it tries to reload the device, it will include the offline path, and the reload will fail. Instead of ignoring the device if it can't reload it, multipathd should just montior it as it is. When the path device is no longer offline, it can be added back to the multipath device by calling "multipathd reconfigure" or "multipathd add path ". Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- multipathd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipathd/main.c b/multipathd/main.c index e63b6aa7..7aaae773 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -679,7 +679,7 @@ retry: } fail: - if (new_map && (retries < 0 || wait_for_events(mpp, vecs))) { + if (new_map && wait_for_events(mpp, vecs)) { condlog(0, "%s: failed to create new map", mpp->alias); remove_map(mpp, vecs->pathvec, vecs->mpvec); return 1; From patchwork Mon Mar 31 23:17:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 14034206 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19A3E21C9F3 for ; Mon, 31 Mar 2025 23:17:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743463058; cv=none; b=bw99wMUZQxOpymYnnFOS+tPr78Euu7Z1KXaD0nqu5vCV+R2GG6QpXZEg/0XphLNZ5lzUmSOq9S6L5MNqKkFKjlkl2v84Sds7q+TbI481Rp6p4bhqI4RpAg6ULOCAGyGZH1VYtGXePAXENbdHbD06yiQ0YFSOiwQ5Ie3DPTYNTkU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743463058; c=relaxed/simple; bh=7hSDe2jBduwiztd+49nvMYNwR5s0aLY6vsiMsEpq6Zo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:content-type; b=BIW4TH9iSrL3eRBBMoY3B+CSmTAGRYrywiWK1sJqhyG+iCuuf2hQpPflpnVnuLVy7N13gkm6JJ2+6U0XBv8ftYohoeuFEdfIPauSeTvRYzt9Jfe53TRaEK5qnlEBftuUz1+uPi4AJ4bZBqCuSuqJz+ZzMaHzcErFSnFCdnQzod0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=UEprlFFK; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UEprlFFK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743463055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CSHjrG8ORIrJUr/JdmqansfhLwmOoKsw9sjKPhWkb/Q=; b=UEprlFFKsALZYJTXgMkgRkZeUmvYfzgZHluFvheU4RPIuc4Ct+qaVanZdxiXfcWPuY9wxw S6+6sgO/cbJYwwDQVlJyt5Y6PB2Jgr/bnMcfY51Z9rKn9nQZK/B9XPjeUalg7KbBCim8at 3/0grZ2lihtLDNhkuqs2sBMXAHSyNr8= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-358-DPC51exCNYCt6T0kmxQzIQ-1; Mon, 31 Mar 2025 19:17:34 -0400 X-MC-Unique: DPC51exCNYCt6T0kmxQzIQ-1 X-Mimecast-MFC-AGG-ID: DPC51exCNYCt6T0kmxQzIQ_1743463053 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7B62F180049D; Mon, 31 Mar 2025 23:17:33 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (unknown [10.6.23.247]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E84511801A6F; Mon, 31 Mar 2025 23:17:32 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (localhost [127.0.0.1]) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.18.1/8.17.1) with ESMTPS id 52VNHVrx2857675 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 31 Mar 2025 19:17:31 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.18.1/8.18.1/Submit) id 52VNHVnA2857674; Mon, 31 Mar 2025 19:17:31 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck Subject: [PATCH v2 2/3] multipathd: re-add paths skipped because they were offline Date: Mon, 31 Mar 2025 19:17:29 -0400 Message-ID: <20250331231730.2857655-3-bmarzins@redhat.com> In-Reply-To: <20250331231730.2857655-1-bmarzins@redhat.com> References: <20250331231730.2857655-1-bmarzins@redhat.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: YhsJ0ogGos3Qk39Tn_-1ylmkwW3NHcscyocIePx-r1s_1743463053 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true When a new device is added by the multipath command, multipathd may know of other paths that cannot be added to the device because they are currently offline. Instead of ignoring these paths, multipathd will now re-add them when they come back online. To do this, it multipathd needs a new path variable add_when_online, to track devices that could not be added to an existing multipath device because they were offline. These paths are handled along with the other uninitialized paths. Signed-off-by: Benjamin Marzinski --- libmultipath/print.c | 5 +++- libmultipath/structs.h | 1 + libmultipath/structs_vec.c | 5 ++++ multipathd/main.c | 59 ++++++++++++++++++++++++++++++++++++-- multipathd/multipathd.8.in | 5 ++-- 5 files changed, 70 insertions(+), 5 deletions(-) diff --git a/libmultipath/print.c b/libmultipath/print.c index 00c03ace..019ae56f 100644 --- a/libmultipath/print.c +++ b/libmultipath/print.c @@ -658,8 +658,11 @@ snprint_path_serial (struct strbuf *buff, const struct path * pp) static int snprint_path_mpp (struct strbuf *buff, const struct path * pp) { - if (!pp->mpp) + if (!pp->mpp) { + if (pp->add_when_online) + return append_strbuf_str(buff, "[offline]"); return append_strbuf_str(buff, "[orphan]"); + } if (!pp->mpp->alias) return append_strbuf_str(buff, "[unknown]"); return snprint_str(buff, pp->mpp->alias); diff --git a/libmultipath/structs.h b/libmultipath/structs.h index 28de9a7f..39d1c71c 100644 --- a/libmultipath/structs.h +++ b/libmultipath/structs.h @@ -413,6 +413,7 @@ struct path { int eh_deadline; enum check_path_states is_checked; bool can_use_env_uid; + bool add_when_online; unsigned int checker_timeout; /* configlet pointers */ vector hwe; diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c index f6407e12..663c9053 100644 --- a/libmultipath/structs_vec.c +++ b/libmultipath/structs_vec.c @@ -389,6 +389,9 @@ static void orphan_paths(vector pathvec, struct multipath *mpp, const char *reas free_path(pp); } else orphan_path(pp, reason); + } else if (pp->add_when_online && + strncmp(mpp->wwid, pp->wwid, WWID_SIZE) == 0) { + pp->add_when_online = false; } } } @@ -595,6 +598,8 @@ void sync_paths(struct multipath *mpp, vector pathvec) found = 0; vector_foreach_slot(mpp->pg, pgp, j) { if (find_slot(pgp->paths, (void *)pp) != -1) { + if (pp->add_when_online) + pp->add_when_online = false; found = 1; break; } diff --git a/multipathd/main.c b/multipathd/main.c index 7aaae773..9aa5a2fa 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -644,11 +644,45 @@ pr_register_active_paths(struct multipath *mpp) } } +static void +save_offline_paths(const struct multipath *mpp, vector offline_paths) +{ + unsigned int i, j; + struct path *pp; + struct pathgroup *pgp; + + vector_foreach_slot (mpp->pg, pgp, i) + vector_foreach_slot (pgp->paths, pp, j) + if (pp->initialized == INIT_OK && + pp->sysfs_state == PATH_DOWN) + /* ignore failures storing the paths. */ + store_path(offline_paths, pp); +} + +static void +handle_orphaned_offline_paths(vector offline_paths) +{ + unsigned int i; + struct path *pp; + + vector_foreach_slot (offline_paths, pp, i) + if (pp->mpp == NULL) + pp->add_when_online = true; +} + +static void +cleanup_reset_vec(struct vector_s **v) +{ + vector_reset(*v); +} + static int update_map (struct multipath *mpp, struct vectors *vecs, int new_map) { int retries = 3; char *params __attribute__((cleanup(cleanup_charp))) = NULL; + struct vector_s offline_paths_vec = { .allocated = 0 }; + vector offline_paths __attribute__((cleanup(cleanup_reset_vec))) = &offline_paths_vec; retry: condlog(4, "%s: updating new map", mpp->alias); @@ -685,6 +719,9 @@ fail: return 1; } + if (new_map && retries < 0) + save_offline_paths(mpp, offline_paths); + if (setup_multipath(vecs, mpp)) return 1; @@ -695,6 +732,9 @@ fail: if (mpp->prflag == PRFLAG_SET) pr_register_active_paths(mpp); + if (VECTOR_SIZE(offline_paths) != 0) + handle_orphaned_offline_paths(offline_paths); + if (retries < 0) condlog(0, "%s: failed reload in new map update", mpp->alias); return 0; @@ -2793,7 +2833,8 @@ check_uninitialized_path(struct path * pp, unsigned int ticks) struct config *conf; if (pp->initialized != INIT_NEW && pp->initialized != INIT_FAILED && - pp->initialized != INIT_MISSING_UDEV) + pp->initialized != INIT_MISSING_UDEV && + !(pp->initialized == INIT_OK && pp->add_when_online)) return CHECK_PATH_SKIPPED; if (pp->tick) @@ -2849,7 +2890,8 @@ update_uninitialized_path(struct vectors * vecs, struct path * pp) struct config *conf; if (pp->initialized != INIT_NEW && pp->initialized != INIT_FAILED && - pp->initialized != INIT_MISSING_UDEV) + pp->initialized != INIT_MISSING_UDEV && + !(pp->initialized == INIT_OK && pp->add_when_online)) return CHECK_PATH_SKIPPED; newstate = get_new_state(pp); @@ -2875,6 +2917,19 @@ update_uninitialized_path(struct vectors * vecs, struct path * pp) free_path(pp); return CHECK_PATH_REMOVED; } + } else if (pp->initialized == INIT_OK && pp->add_when_online && + (newstate == PATH_UP || newstate == PATH_GHOST)) { + pp->initialized = INIT_OK; + if (pp->recheck_wwid == RECHECK_WWID_ON && + check_path_wwid_change(pp)) { + condlog(0, "%s: path wwid change detected. Removing", + pp->dev); + return handle_path_wwid_change(pp, vecs)? + CHECK_PATH_REMOVED : + CHECK_PATH_SKIPPED; + } + ev_add_path(pp, vecs, 1); + pp->tick = 1; } return CHECK_PATH_CHECKED; } diff --git a/multipathd/multipathd.8.in b/multipathd/multipathd.8.in index 43f87bf8..a91acff1 100644 --- a/multipathd/multipathd.8.in +++ b/multipathd/multipathd.8.in @@ -595,8 +595,9 @@ The device serial number. The device marginal state, either \fImarginal\fR or \fInormal\fR. .TP .B %m -The multipath device that this device is a path of, or \fI[orphan]\fR if -it is not part of any multipath device. +The multipath device that this device is a path of, or \fI[offline]\fR +if this device could not be added to a device because is is offline or +\fI[orphan]\fR if it is not part of any multipath device. .TP .B %N The host World Wide Node Name (WWNN) of the device, if any. From patchwork Mon Mar 31 23:17:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 14034208 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E583421CC52 for ; Mon, 31 Mar 2025 23:17:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743463060; cv=none; b=j8P64DAr4X0wxKO9BhlDJ+jqMGtnXv2USGVZAcwo6Nq+N06UCBAvQwPG9hWKjEQeauF1PBzddzNIbE9T5bssfu5mkM07s0kmRgEXvBKWZ0bJl33h/ogTXChQW68lnMopkZ9io9LjoGLVuCwnRFJTA/83C/x9sR9qKGsgXgleTUY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743463060; c=relaxed/simple; bh=xeGDg51Yf5vQbprLgdGGiHETJ9ZrcRWEwx7RQrpUJ0c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:content-type; b=LAm7VLG0FMpkHNG6x3R6N33yB2FlyQCgt8gyK8EQ0MaX1v/vXYiynZAkBi2xpe8IPJ51iwzooD2e4l3/eCBcd+Ak96NmyNqosHxFWOIb69n5lJyHS5H1PgOrdsCBAUdgRmEvJRhuM0j2Oqm9FVx3mXlzXwYRYoY7lpHT2hSUQvU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=VMWEIizV; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VMWEIizV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743463057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O1htVGb8uS4QJtDX8GWu9QzTtowuWcqMdcbkjNI8E3g=; b=VMWEIizVW21+gwVezeZ5yQycIq33izYevbpdlV2PF9u5L22B/eGsrhXMtoceak0ai+OEvE rzkQtLxpWMbxObn51GLnmTcVtdDuwVaaGjjdPSmcmzDlyePh+A+GWPu92XZzouNdQXeIme Ffjqb8p6aWYYdr4bvk6apFNTVGRvhM8= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-358-7bsKraZaO1eJuRbzcq1ZxA-1; Mon, 31 Mar 2025 19:17:34 -0400 X-MC-Unique: 7bsKraZaO1eJuRbzcq1ZxA-1 X-Mimecast-MFC-AGG-ID: 7bsKraZaO1eJuRbzcq1ZxA_1743463053 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5577C1954B3B; Mon, 31 Mar 2025 23:17:33 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (unknown [10.6.23.247]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1265C1808867; Mon, 31 Mar 2025 23:17:32 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (localhost [127.0.0.1]) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.18.1/8.17.1) with ESMTPS id 52VNHVt72857679 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 31 Mar 2025 19:17:31 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.18.1/8.18.1/Submit) id 52VNHVBN2857678; Mon, 31 Mar 2025 19:17:31 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Martin Wilck Subject: [PATCH v2 3/3] multipathd: don't update paths in INIT_MISSING_UDEV Date: Mon, 31 Mar 2025 19:17:30 -0400 Message-ID: <20250331231730.2857655-4-bmarzins@redhat.com> In-Reply-To: <20250331231730.2857655-1-bmarzins@redhat.com> References: <20250331231730.2857655-1-bmarzins@redhat.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 7pOqwhMxGGZvPKGq5bTLwejinlmciuKl50e6rRUUNnc_1743463053 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true There is nothing for update_uninitialized_path() to do for paths in the INIT_MISSING_UDEV state. In fact, there shouldn't be any paths in this state when update_uninitialized_path() is called, since they will have switched to a different state in check_uninitialized_path(). Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- multipathd/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/multipathd/main.c b/multipathd/main.c index 9aa5a2fa..40ca83c7 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -2890,7 +2890,6 @@ update_uninitialized_path(struct vectors * vecs, struct path * pp) struct config *conf; if (pp->initialized != INIT_NEW && pp->initialized != INIT_FAILED && - pp->initialized != INIT_MISSING_UDEV && !(pp->initialized == INIT_OK && pp->add_when_online)) return CHECK_PATH_SKIPPED;