From: "Benjamin Marzinski" Subject: [PATCH v4 18/19] libmultipath: Don't blank intialized paths Date: Tue, 9 Oct 2018 18:03:15 -0500 Message-ID: <1539126196-28926-19-git-send-email-bmarzins@redhat.com> References: <1539126196-28926-1-git-send-email-bmarzins@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1539126196-28926-1-git-send-email-bmarzins@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: device-mapper development Cc: Martin Wilck List-Id: dm-devel.ids When pathinfo fails for some likely transient reason, it clears the path wwid, but otherwise returns successfully, to keep the path around but not usable until it gets fully initialized. However, if the path has already been initialized, and pathinfo hits a transient error, it shouldn't clear the wwid. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 301093f..b267f07 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -2004,9 +2004,9 @@ blank: /* * Recoverable error, for example faulty or offline path */ - memset(pp->wwid, 0, WWID_SIZE); pp->chkrstate = pp->state = PATH_DOWN; - pp->initialized = INIT_FAILED; + if (pp->initialized == INIT_FAILED) + memset(pp->wwid, 0, WWID_SIZE); return PATHINFO_OK; } -- 2.7.4