From patchwork Sun Nov 3 22:43:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 13860665 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26198165F1A for ; Sun, 3 Nov 2024 22:44:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730673846; cv=none; b=cDTguMWngPuEXdA/amlIjw9I1klj8HlX1qFOFY3H/Pf09EYradkC81A/vixhnS66ehIJyEyASjrmWJMAwST7VVrSKNDyLHZotYPupJ7IB1/pcmS2jzfkvDNQSQ0VVypNlDqJ6n0TFCVs2hThiMFOXa0zC7mJ2bwGcvrIqJw4pcQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730673846; c=relaxed/simple; bh=y4U9iPrzRx1fmNaDXtpeyk4HL4jw69wuQNInyAWw+Yg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MRT3iUNpe5szW2JgX5yACS2OzclcyCEPrmygBUmuAOHneT+8ELtq5e9Md+SA/w09roODx7hPToa74tMHpWpzmJntWha8MO7wQ5slCAJlM/Ez6447VW37bVxVvy4MAdZRWSxeF7wyl7GqMykOmT/AjYr0rBxw0RlYTdedHlvK1J8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Jk51UpuF; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Jk51UpuF" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a9a6acac4c3so604993366b.0 for ; Sun, 03 Nov 2024 14:44:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1730673842; x=1731278642; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1Fo6mER/MrdLTL8ecoNmszLXLw94Lvyub5gjrXUN81Y=; b=Jk51UpuFi8Gk9pPqjNx4vXe3cNDQcBO+OvjyCgmZs13eBolhhQMeMjK1NE6B9Pu4eS qzYBg9642lTtwPlHVxIlhVKR7Yz6VMzu+m6Dnpsi8cLCutZZaSihxZV5ToWMJq9zRykJ +TYAilXv2W6c+pWdV24jYgP+jQo6fFFqsU2QTa/jrKMX0en2qneZ5c6gmEKXJfU2cz2+ zoUhBbGLoSHrgF9yyxMK7TRNaJslL13m3w0K8jLFg3/sMEHwGIUPKDBHPmHvmg4MCsA9 gcaMw8VSUMOqLyLycFcSpn/XtJ+LUP24caGcHKCKyMqIHxcJqtTORWKoyTkVgkclEH+w /+IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730673842; x=1731278642; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1Fo6mER/MrdLTL8ecoNmszLXLw94Lvyub5gjrXUN81Y=; b=LTqQXtZ5xU/aDjQICJvfWdJfaNtfowCtGkxKH6Pa2M+OqNU78eeDmBszidU1LWgWE/ klz0mywrbhBWZrsy2QK3fY6Sc9oEKuJod/YTFo+Fnn1BaUvUsXgh5BjeKprw0hXjvhN0 cZ8Tx9AVv3PAdWtnqEmHGPSAGAVcUFUGCqyT2wlggRS51/uW/kn0ba5nYY89Vyk+bAAR NdBGyKg+81x2Ocae4zIsmY1XozhwIiKKgrQc/gaNmPbjv5o1birDARPxRy4XiVoj8dqo U01/IPtyMWfORRQyWs+Lkpft9glBDwgPYQtxB4oeg97k7f4/7M2xr2fQS/oD4Yl6pkFj 9u/Q== X-Forwarded-Encrypted: i=1; AJvYcCUozY7h3aE9tirkGhNQ/0mPIfwtLUEwWe0Zd5vlW4MDPRs6R0qGWg+bITAFkPz1Dsz7J3ZGQiBpDQ==@lists.linux.dev X-Gm-Message-State: AOJu0Yx/j91ofY3d3v6q2BZUWdyh6ubel/cN0OuvHyZDgmSPGJ8w+PBj r2GDkvQozIvsK5hjguEifjs33+pt1RttEkeAEdqI3ZDNdxzE/3Bk8DYgwtTHJAk= X-Google-Smtp-Source: AGHT+IHaVS2T5amM9t7PU/puBbXGrlmY35sCa7r9gTcNtejs/CFRYjb79pcl8NNNmVDLIB7Ovga4tQ== X-Received: by 2002:a17:907:7216:b0:a99:ef65:58d0 with SMTP id a640c23a62f3a-a9de6440cbbmr3080416766b.65.1730673842144; Sun, 03 Nov 2024 14:44:02 -0800 (PST) Received: from localhost (p200300de37464600ac00037825cc9f2c.dip0.t-ipconnect.de. [2003:de:3746:4600:ac00:378:25cc:9f2c]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-a9e565df8d8sm473972866b.131.2024.11.03.14.44.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Nov 2024 14:44:01 -0800 (PST) From: Martin Wilck X-Google-Original-From: Martin Wilck To: Christophe Varoqui , Benjamin Marzinski Cc: Martin Wilck , dm-devel@lists.linux.dev Subject: [PATCH v2 1/5] 11-dm-mpath.rules.in: import DM_COLDPLUG_SUSPENDED only once Date: Sun, 3 Nov 2024 23:43:45 +0100 Message-ID: <20241103224349.42582-2-mwilck@suse.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103224349.42582-1-mwilck@suse.com> References: <20241103224349.42582-1-mwilck@suse.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 We import DM_COLDPLUG_SUSPENDED in all code flows below mpath_coldplug_end. Clarify this in the code. Signed-off-by: Martin Wilck --- multipath/11-dm-mpath.rules.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multipath/11-dm-mpath.rules.in b/multipath/11-dm-mpath.rules.in index 30647b9..6783826 100644 --- a/multipath/11-dm-mpath.rules.in +++ b/multipath/11-dm-mpath.rules.in @@ -24,12 +24,13 @@ ENV{DM_UDEV_RULES_VSN}=="1|2", ENV{.DM_SUSPENDED}!="1", ENV{DISK_RO}!="1", \ ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="", GOTO="scan_import" LABEL="mpath_coldplug_end" +IMPORT{db}="DM_COLDPLUG_SUSPENDED" + # If this uevent didn't come from dm, don't try to update the # device state # Note that .MPATH_DEVICE_READY_OLD=="" here. Thus we won't activate the # device below at mpath_is_ready, which is correct. ENV{DM_COOKIE}!="?*", ENV{DM_ACTION}!="PATH_*", \ - IMPORT{db}="DM_COLDPLUG_SUSPENDED", \ GOTO="check_mpath_ready" ENV{.MPATH_DEVICE_READY_OLD}="$env{MPATH_DEVICE_READY}" @@ -67,7 +68,6 @@ LABEL="check_mpath_unchanged" # A previous coldplug event occurred while the device was suspended. # Activation might have been partially skipped. Activate the device now, # i.e. disable the MPATH_UNCHANGED logic and set DM_ACTIVATION=1. -IMPORT{db}="DM_COLDPLUG_SUSPENDED" ENV{DM_COLDPLUG_SUSPENDED}=="1", ENV{.DM_SUSPENDED}!="1", \ ENV{DM_ACTIVATION}="1", ENV{MPATH_UNCHANGED}="0", \ PROGRAM="@SYSDIR_BIN@/logger -t 11-dm-mpath.rules -p daemon.notice \"Forcing activation of previously suspended device\"", \ From patchwork Sun Nov 3 22:43:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 13860666 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20EE6C2FB for ; Sun, 3 Nov 2024 22:44:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730673848; cv=none; b=sv1eeXZMZqC48vUkIYYCjIYVkh4WSGj0SeX8FS++LFDgbVDLU4qiGwjA05x1BOiyqwtwDZFuFm1T7cLxDI1b/TC23b5eDL67hxtqN3ZLu/XvymR5cYlcux2uq0mKZkazzcGQQoo60jZk31vKwNCeL78ptKa37fEwe6fX8jW8l5g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730673848; c=relaxed/simple; bh=CZAssxSjpM2GC0gMgeX98EciswnZgtt3y1xEBcaEJxI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AFQwQLHjyrJjwp/gg9wWxosMz696Vu3yI7Hfb+GbUGWG9vC7yw57ZaeaGaB4Cw/Uyx+pWZ6tXks7UNL9ldmqHausZ9yI3Nl1JvsT6SLeEh3EF3yYKjKaji+dSnIkI68vmLPReStZRRHve+6nFfOlW7VFZW93IuzkVZWbGjpFIW0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=fae0n+KU; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="fae0n+KU" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a9a156513a1so632052066b.0 for ; Sun, 03 Nov 2024 14:44:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1730673843; x=1731278643; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2DacYKzLolIBI+9tOo5qeyNYiB38EUO8vuHt/ehdxbA=; b=fae0n+KUqjzRTqIZafT1YuBNA/gsGRwSBsFJdNshrZqr+/4TuhdJaQ7NZAjPThgXJq Yoy5Xmo7OAhlNEuSjHBxM6SVgCr7Ph2BxDKsQkIPaDiPmkLDpCnaQUrliRnn74HXvZhD XSR/W4HB35GjMNP7sJnHPmTcjs/FIBpQbDYbN2qAQ3K2kbf1XbIYUV+/AfEKgm8LvpYM WQyqLFi4PIyijFmjdeAN72VMDlXvHIhcdUvQJIl0xBfJsNNP37yNz/p2Ih/wfVz6odFT /57nYSwOoXmHTUpKj0kfV+coHI/Em362DVrW/dqtSa9Xiht79sBhGnoGeUtkRUEeMfjf 7mLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730673843; x=1731278643; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2DacYKzLolIBI+9tOo5qeyNYiB38EUO8vuHt/ehdxbA=; b=LtsQkN9jRxRG/aVEvcKzJCjXYJGPzpr5JgwCQs+PoY00KRma8L8JDz6paa01qSEHHr CRQpeU2ecCrqFntgzfyCli3ncrVfrr400wJowdb0pbAgM0NQ7CVfAYE6nT3KGH/29Zeb 3EFTO780wa5QEX1z5J1zCWb82yzEVrZkFxlBfif8fw2SJlvbdPM1k2TsBi4yjRB2r1Nj w++1Y/nd1hduVhzUTPG3RNU9++9EMtsJnb4ZIyCLZDMbv38ypF9h6L0SzNeovp5VjlHS WC9GATqc7LWvgmlhE7Ub2Ot83VZUq4A6MaAP3arrr06iaGHSkpXNU31cWeeD/IOltNPe Uq+g== X-Forwarded-Encrypted: i=1; AJvYcCVeQoTJo393yW2NdzFALvuC83wfiMrrA63is2pce2VtwZKDLTOP4dB2Ro43ZT4Z/l4K7vCJbhzItg==@lists.linux.dev X-Gm-Message-State: AOJu0YzP9JjmaQotdhEBA4AqkzTasK1SsPAdC1D0uL1BdUgaMEq9zjli FTAl712SlVSPkc+FOZy7QGpxRPWah4g5Z5vZqdCUPcAOPbIKUv5IjJ6FnY/0Abs= X-Google-Smtp-Source: AGHT+IHn1G/yfQ5DqSE5JZe7rd4vFrGs3dk+WsRkP04mgyipGC6jKbJ10LpyUBDV72gYrh4CswT0lQ== X-Received: by 2002:a17:906:6a19:b0:a99:eb94:3e37 with SMTP id a640c23a62f3a-a9de632ffbamr2632563466b.58.1730673843086; Sun, 03 Nov 2024 14:44:03 -0800 (PST) Received: from localhost (p200300de37464600ac00037825cc9f2c.dip0.t-ipconnect.de. [2003:de:3746:4600:ac00:378:25cc:9f2c]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-a9e564c4f73sm473440366b.62.2024.11.03.14.44.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Nov 2024 14:44:02 -0800 (PST) From: Martin Wilck X-Google-Original-From: Martin Wilck To: Christophe Varoqui , Benjamin Marzinski Cc: Martin Wilck , dm-devel@lists.linux.dev Subject: [PATCH v2 2/5] 11-dm-mpath.rules.in: handle inactive suspended devices correctly Date: Sun, 3 Nov 2024 23:43:46 +0100 Message-ID: <20241103224349.42582-3-mwilck@suse.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103224349.42582-1-mwilck@suse.com> References: <20241103224349.42582-1-mwilck@suse.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Since b22c273 ("11-dm-mpath.rules: Don't force activation while device is suspended"), we've handled the case where a device is suspended while an uevent is processed (e.g. because multipathd is reloading the map again at the same time). But we were missing the case where The device had never been initialized before. If .MPATH_DEVICE_READY_OLD was empty, we'd jump to scan_import without setting MPATH_DEVICE_READY to 0. This can cause a device not to be fully activated at boot time, because in follow-up uevents we'd assume that the device had already been set up. Treat the case in which an uevent is processed for a previously not fully set-up, suspended device like other situations where we set MPATH_DEVICE_READY to 0. Fixes: b22c273 ("11-dm-mpath.rules: Don't force activation while device is suspended") --- multipath/11-dm-mpath.rules.in | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/multipath/11-dm-mpath.rules.in b/multipath/11-dm-mpath.rules.in index 6783826..20f8c6a 100644 --- a/multipath/11-dm-mpath.rules.in +++ b/multipath/11-dm-mpath.rules.in @@ -35,6 +35,13 @@ ENV{DM_COOKIE}!="?*", ENV{DM_ACTION}!="PATH_*", \ ENV{.MPATH_DEVICE_READY_OLD}="$env{MPATH_DEVICE_READY}" +# If the device wasn't ready previously and is currently suspended, +# we have to postpone the activation until the next event. +# In this case, we have to set MPATH_DEVICE_READY=0; otherwise, the +# MPATH_UNCHANGED logic will cause later rules to skipped in the next event. +ENV{.MPATH_DEVICE_READY_OLD}!="1", ENV{.DM_SUSPENDED}=="1", \ + ENV{MPATH_DEVICE_READY}="0", GOTO="check_mpath_unchanged" + # multipath sets DM_SUBSYSTEM_UDEV_FLAG2 when it reloads a # table with no active devices. If this happens, mark the # device not ready @@ -106,14 +113,10 @@ GOTO="scan_import" LABEL="mpath_is_ready" # If the device comes back online, set DM_ACTIVATION so that -# upper layers do a rescan. If the device is currently suspended, -# we have to postpone the activation until the next event. -# In this case, we have to set MPATH_DEVICE_READY=0; otherwise, the -# MPATH_UNCHANGED logic will cause later rules to skipped in the next event. -ENV{.MPATH_DEVICE_READY_OLD}!="0", GOTO="scan_import" -ENV{.DM_SUSPENDED}=="1", ENV{MPATH_DEVICE_READY}="0", GOTO="scan_import" - -ENV{DM_ACTIVATION}="1", ENV{MPATH_UNCHANGED}="0" +# upper layers will do a rescan. Don't do this if .MPATH_DEVICE_READY_OLD +# is just empty (see comment above the DM_COOKIE test above). +ENV{.MPATH_DEVICE_READY_OLD}=="0", \ + ENV{DM_ACTIVATION}="1", ENV{MPATH_UNCHANGED}="0" # The code to check multipath state ends here. We need to set # properties and symlinks regardless whether the map is usable or From patchwork Sun Nov 3 22:43:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 13860667 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D0A118BC2F for ; Sun, 3 Nov 2024 22:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730673848; cv=none; b=Nd34ZjCb7hbwFq527Ql2JmPEhcwcrr75bskCaHX3UtGPSqoo+4Ggm5EnQgHrK5K6BeDtki8Vc2zFj971xEkoJXfk2p5kTGoT75YwROTJqtyXihxEDOsTNeFRKCpBavmcmY1h6EKQGBdS6mnliaUneGaFt44uqylmkCI1jryvIT4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730673848; c=relaxed/simple; bh=NlxzbDUJ7h4re1FQBK6KOnNcEl2PIZ8Pe8AFnYwfBFA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FXCcz3w+9GFLkrM0WFCpn+GqaQQWOU/dfBi3q+b1PMjipfj5nDIUDzoUXv+x06U6w9Ac8OiOJ4adujCWZNivdAb99NWo7e96JaP32qzBfL1NhONs3kSgHhza9h9WSPqUddJikAHVfe2lJkD8TZzBZrrwKf1F2WqCRPVHMeWZJls= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=ZDXo0cMY; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="ZDXo0cMY" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5cec93719ccso1805059a12.2 for ; Sun, 03 Nov 2024 14:44:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1730673845; x=1731278645; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MFda3Nv7nkjalH7wJLPTGB48A68kdy2UdMn+L3x+ICY=; b=ZDXo0cMYYvXgyPFTXFrDJmor0htUCK16stc/1rCmYsJ8P0seQjmep2HewGiPAKHaea RLpuoRKGvvCT0Y04Hbw4+MMogZko/UL2IS8k3WGe3c2Yg9HsnBCGPSBtQX3I2wzutzIs iH87PXikL+PC2DSL91dkbpc7241xA51fyWqn1jfd7aPxMLZSuqkuZ5HSQk72ENIJXuX4 MOOZ5UxbuVHyyiGw+8DkRzOtBac8E8BEYC6tU+XA6Qu5cSAa+8xZuB/9i9HOuvtmXqWB dCBfOl4r6wGnAOj9fqwNd/zQz6MFPcTvZqDaLKm5nCNsuBv5eG6hD8Ey7f1ZTfxLwvFC varQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730673845; x=1731278645; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MFda3Nv7nkjalH7wJLPTGB48A68kdy2UdMn+L3x+ICY=; b=Qdu8vw8sqQADkXnERGzm/ehx0fYk9VXHItK0Qp9jCBGGlQ4IaZy7DADDNqKbGbzcP5 V9Pmk3RF+eXVaF2tD2OuLw9QFaWzTX7aXM4tRbv6Lq9Y/YzfoktrkEvVpy1SeCSS0lSv y1ou5oM7sdtzQHpa5X1Km6sFPfxs8hxylGVsUoDEH+f+cff7tYb6GL+mNtyzQv9rT+Dy S3MWd+2HS6KfHKhJE066cYTk7Qk9Ja7nJoPalDb+UVfAdI/Z/asWdjwBDeOpseRzvSdn AeTUYRX9fwWysM3AYY8yp2WrCQjon2YBKiCxHrB5lrFB2Uu+QwBnujr2BZ0H4MNoV7i9 Peew== X-Forwarded-Encrypted: i=1; AJvYcCWM7Xfay3PXR2IWFWkbHB4Irhg4Qs0REPUi+AkYny7KShX8VJSfqz7QX7RO38Y82Xan3iTyPxC6Hw==@lists.linux.dev X-Gm-Message-State: AOJu0Yywi9l+VnabKpKwvaHedtVBeY0sWJFBLnPS9ZDWIKpXNgEBWs+g cWLwlXIoKZFVU3Z4XlBBdF9bdwpcueQCqyNuNkbU64svW9UUhh97nrGM7rgPfZE= X-Google-Smtp-Source: AGHT+IEvjgJWCAr5gcAeG/Zg2fMU+pPOU0acc2PUYvIlPAJs57hdYT8FZAon9mdDMzHXcJQLoO4POA== X-Received: by 2002:a17:907:31c3:b0:a99:65c6:7f34 with SMTP id a640c23a62f3a-a9e3a57380emr1814102366b.7.1730673844326; Sun, 03 Nov 2024 14:44:04 -0800 (PST) Received: from localhost (p200300de37464600ac00037825cc9f2c.dip0.t-ipconnect.de. [2003:de:3746:4600:ac00:378:25cc:9f2c]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-a9e5668466dsm472392466b.211.2024.11.03.14.44.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Nov 2024 14:44:03 -0800 (PST) From: Martin Wilck X-Google-Original-From: Martin Wilck To: Christophe Varoqui , Benjamin Marzinski Cc: Martin Wilck , dm-devel@lists.linux.dev Subject: [PATCH v2 3/5] 11-dm-mpath.rules.in: clarify DM_ACTIVATION logic Date: Sun, 3 Nov 2024 23:43:47 +0100 Message-ID: <20241103224349.42582-4-mwilck@suse.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103224349.42582-1-mwilck@suse.com> References: <20241103224349.42582-1-mwilck@suse.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Our code is always setting MPATH_UNCHANGED and DM_ACTIVATION in pairs. While DM_ACTIVATION is a global DM property, MPATH_UNCHANGED is owned by us. Just set MPATH_UNCHANGED, and adapt DM_ACTIVATION when necessary just in one place. Signed-off-by: Martin Wilck --- multipath/11-dm-mpath.rules.in | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/multipath/11-dm-mpath.rules.in b/multipath/11-dm-mpath.rules.in index 20f8c6a..a2655cb 100644 --- a/multipath/11-dm-mpath.rules.in +++ b/multipath/11-dm-mpath.rules.in @@ -74,25 +74,25 @@ LABEL="check_mpath_unchanged" # A previous coldplug event occurred while the device was suspended. # Activation might have been partially skipped. Activate the device now, -# i.e. disable the MPATH_UNCHANGED logic and set DM_ACTIVATION=1. +# i.e. disable the MPATH_UNCHANGED logic. ENV{DM_COLDPLUG_SUSPENDED}=="1", ENV{.DM_SUSPENDED}!="1", \ - ENV{DM_ACTIVATION}="1", ENV{MPATH_UNCHANGED}="0", \ + ENV{MPATH_UNCHANGED}="0", \ PROGRAM="@SYSDIR_BIN@/logger -t 11-dm-mpath.rules -p daemon.notice \"Forcing activation of previously suspended device\"", \ GOTO="check_mpath_ready" # DM_SUBSYSTEM_UDEV_FLAG0 is the "RELOAD" flag for multipath subsystem. -# Drop the DM_ACTIVATION flag here as mpath reloads tables if any of its +# Set the MPATH_UNCHANGED flag here as mpath reloads tables if any of its # paths are lost/recovered. For any stack above the mpath device, this is not # something that should be reacted upon since it would be useless extra work. # It's exactly mpath's job to provide *seamless* device access to any of the # paths that are available underneath. ENV{DM_SUBSYSTEM_UDEV_FLAG0}=="1", \ - ENV{DM_ACTIVATION}="0", ENV{MPATH_UNCHANGED}="1" + ENV{MPATH_UNCHANGED}="1" -# For path failed or reinstated events, unset DM_ACTIVATION. +# For path failed or reinstated events, set MPATH_UNCHANGED. # This is similar to the DM_SUBSYSTEM_UDEV_FLAG0 case above. ENV{DM_ACTION}=="PATH_FAILED|PATH_REINSTATED", \ - ENV{DM_ACTIVATION}="0", ENV{MPATH_UNCHANGED}="1" + ENV{MPATH_UNCHANGED}="1" LABEL="check_mpath_ready" @@ -112,11 +112,10 @@ GOTO="scan_import" LABEL="mpath_is_ready" -# If the device comes back online, set DM_ACTIVATION so that +# If the device comes back online, clear MPATH_UNCHANGED so that # upper layers will do a rescan. Don't do this if .MPATH_DEVICE_READY_OLD # is just empty (see comment above the DM_COOKIE test above). -ENV{.MPATH_DEVICE_READY_OLD}=="0", \ - ENV{DM_ACTIVATION}="1", ENV{MPATH_UNCHANGED}="0" +ENV{.MPATH_DEVICE_READY_OLD}=="0", ENV{MPATH_UNCHANGED}="0" # The code to check multipath state ends here. We need to set # properties and symlinks regardless whether the map is usable or @@ -146,6 +145,10 @@ IMPORT{db}="ID_PART_GPT_AUTO_ROOT" LABEL="import_end" +# If MPATH_UNCHANGED is set, adapt DM_ACTIVATION. +ENV{MPATH_UNCHANGED}=="0", ENV{DM_ACTIVATION}="1" +ENV{MPATH_UNCHANGED}=="1", ENV{DM_ACTIVATION}="0" + # Reset previous DM_COLDPLUG_SUSPENDED if activation happens now ENV{.DM_SUSPENDED}!="1", ENV{DM_ACTIVATION}=="1", ENV{DM_COLDPLUG_SUSPENDED}="" From patchwork Sun Nov 3 22:43:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 13860668 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7BC7B165F1A for ; Sun, 3 Nov 2024 22:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730673849; cv=none; b=o8Q+Fp8sN5zbaYZI3a2Er082SS5C+gfIlE4D52bHcK8lHiWefd9U5tz+djS61mUHtlu/nTMzZnf8PzuYOWhu+Pb8la6jh1jyayffoZGdQcqpRkuFJogpxwX11/utIvyYbT3RtXPE/ubY1hsbeUdRjPsT1ui1S5zQBtKf2h3eWvI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730673849; c=relaxed/simple; bh=mI7Q4/DOyHOnNCuJjYNULsj8tfM+qzNLdpz9DMtZX4E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RuySLX5IX6dw49uyQ+HpSciRiy44YQzGTEG/qMpfGDXJNh53zRkTCD6WHG1/sKXcntvZeST5fYfWz51hC4X+Eme+todEmzcZnNfTBOmgMn/R+J0boKnmbYht/gJRepfP8wM/LHl0wqw3U6o4HJ5ElgySprBAtzBOE/1G8iaE1og= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=SdIs0uma; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="SdIs0uma" Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a9a2209bd7fso648322666b.2 for ; Sun, 03 Nov 2024 14:44:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1730673846; x=1731278646; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=y0eJUXRVH8gXHiSTWpWPkXrCbscVqP9+lj1wXjjtqkY=; b=SdIs0umanSLpiTSemXFIWKc8Z8PNG7sR4qLXKnrr94dLKwoxUxxpBteA+y4QnmmImf 0y+/JyjCejBdZg1cB1EsQLl6dpC85i7lDqvUP9DQNGVBgB2VpAo2l3GN0Pd9NB2sutf0 kaKic4ZThRelH2Z7cOi+WGxRi8mNZNfXo2/Rfnwj0IkW5rtyqgB7Rl4hO/EqnpZN4WWG Re+kdTeuB/eMgYC8dOaNBxhj1fXmxKJbe+78jYkJzCiUn4dxPcQVQTr7phnQaKpJuapm IdZDRwyTxKAa04uRkZdHaWjA6Xhnpx9VMBdOTxBihPNGpSQXW7teYW/qy+t7j1b+l0n8 UZQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730673846; x=1731278646; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y0eJUXRVH8gXHiSTWpWPkXrCbscVqP9+lj1wXjjtqkY=; b=CXu1zAEtp0Q1UbSQpGR+u++9lmiknsEVW2DaGICeRGIZtDNfRdcAsVuKbmk6VUJohf LPRvOk3ouN1+7pxdhxCZAommlVeqhkwi5f0kOESJgoUqYTmZUgTmpg8UPe5rNfx4zgm6 Mlncq+4tuDfiWo3NXXmwKrxdon15m2roMJ7WbIrDzHBXlJoVx3cTWZWhwpDb4nkmu9f6 GIgKmdD+u+drBm7pjWMoREyOVFNtzHd2XKMiE5CiWYzwLxkunjAcw7wGtQZYLd7k9+f8 AHdOvbqmO91Wfb3ajjT2aRtAI/a2kLYwYXLJswyULWSjvX2/b3ZYkcEieN1I0g3NZtZM QCUw== X-Forwarded-Encrypted: i=1; AJvYcCXG8daMSlIa1uNmXn9/wMH3l28PWiCtG/52U9bba2FzJ6FCIlhxBlPNXnEbG2Ttsis7r13WDT1w/g==@lists.linux.dev X-Gm-Message-State: AOJu0YxvPzdgQLMG95T5YGlh1UQNafMYtIuMAgmVPReRFKax53W3desf VM+B0wVwpDx2isycx2cZd9rZEgppqB+aYSQbjMcNhIcUlzfRmwp054WKEiqO9SddE8mKpfjJ8hf e X-Google-Smtp-Source: AGHT+IHnAo2Mr8lzSeERSU5gkeooZ/MBV9fcrIUaINio0adU9ndFZVWKiYd4Ecf8xaEcEKzRrHjevw== X-Received: by 2002:a17:907:7d93:b0:a9a:8a4:e079 with SMTP id a640c23a62f3a-a9de5edea84mr3128437766b.31.1730673845532; Sun, 03 Nov 2024 14:44:05 -0800 (PST) Received: from localhost (p200300de37464600ac00037825cc9f2c.dip0.t-ipconnect.de. [2003:de:3746:4600:ac00:378:25cc:9f2c]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-a9e56494470sm471834366b.2.2024.11.03.14.44.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Nov 2024 14:44:05 -0800 (PST) From: Martin Wilck X-Google-Original-From: Martin Wilck To: Christophe Varoqui , Benjamin Marzinski Cc: Martin Wilck , dm-devel@lists.linux.dev Subject: [PATCH v2 4/5] 11-dm-mpath-rules.in: skip one .DM_NOSCAN check Date: Sun, 3 Nov 2024 23:43:48 +0100 Message-ID: <20241103224349.42582-5-mwilck@suse.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103224349.42582-1-mwilck@suse.com> References: <20241103224349.42582-1-mwilck@suse.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 We set .DM_NOSCAN above where we set DM_UDEV_DISABLE_OTHER_RULES_FLAG, too. If the latter isn't set, .DM_NOSCAN can't be set. Skip the redundant test. Signed-off-by: Martin Wilck --- multipath/11-dm-mpath.rules.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipath/11-dm-mpath.rules.in b/multipath/11-dm-mpath.rules.in index a2655cb..79227be 100644 --- a/multipath/11-dm-mpath.rules.in +++ b/multipath/11-dm-mpath.rules.in @@ -132,7 +132,7 @@ ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!="1", GOTO="import_end" ENV{DM_UDEV_RULES_VSN}!="1|2", GOTO="import_end" # Don't import the properties from db if we will run blkid later. -ENV{.DM_NOSCAN}!="1", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="import_end" +ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="import_end" IMPORT{db}="ID_FS_TYPE" IMPORT{db}="ID_FS_USAGE" From patchwork Sun Nov 3 22:43:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Wilck X-Patchwork-Id: 13860669 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6642A18C32C for ; Sun, 3 Nov 2024 22:44:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730673850; cv=none; b=UEyaiNpcfad5/+TJruaMMDBg1D1ITrhhpgGn0gXllWUr9rRkJRboJ9pQCYoUDQevqWlLyYw0gRtfUeLPySO5E12v28cMkMzaM+xnDZoIWPMKNcxjTfPOR+0eQQl4akpUaF3M/NPKNiyxL6bPlhIomzPZ7mz6VaeCE5UYi3AGJSE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730673850; c=relaxed/simple; bh=XmJOM3nmbilBHSQPDYyziI41V5kBaIerveFfvWSNRGk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jvWzB1ZAb7gWxVl1VVBi9rO22rLtrP7MQ86ci/clJWxYz4Sh55Tl7t8at9lCp0Ek7r4Vg69//i6mmZsT7PwH0V8BVMgvoklQAsu+Cv/gzZsW6wI/QX3VucWncmwdZGPeOBTDyXp5I5cu0bJlC30oyHAul0iYZt906m5guyEur/w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=XR0INfUo; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="XR0INfUo" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a99f646ff1bso471128766b.2 for ; Sun, 03 Nov 2024 14:44:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1730673847; x=1731278647; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7uwlxkyvYzOMdEgSK8PhXxXKls25vwVgjE+wEgTZZ54=; b=XR0INfUoP389lsf/GRqeJ+mMmgXISNv22RqKUq0G9wCSP3GeEhDQMkzRQqoeLZsaOz IqJhEGm8Q3k3jNPW1o2/WuiCIJxT72pzx/SuNh2386FCOb6bV8BDIMzB7s4/JBtn7uEo 3NPBe2h/fQRxHUhglH2qXJuFBIMGINCzUba4T5vTJ8OLWyV1HK9hFEdi/dHRsjluyf4y SuT7aH3tQkZ8daaHpGSZf8ZvWq2RkV4zv7x0mqZATTb41RBk/FN1BAxze6kX0VLBOm87 bwEZYDkZSUYkYWNTDvecn82Agne0FfoDbej2+43nsYRga1XvV33qTYDBXC1UK5X2MXr1 Vx/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730673847; x=1731278647; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7uwlxkyvYzOMdEgSK8PhXxXKls25vwVgjE+wEgTZZ54=; b=MkVuxLlI45WJuJRF8imcwt5tBP1LAiuw026ptl+GgiGK9mei0sJlZz604DrkSQjsBe DUjmk+uIq2r4f82UFbkaw6tBFuy1svC3f+gFiGVS3B4lD96Q8uMRHWKDs34kNbOQC9uN iGEMCpkbReg5QmGT4VNXhagt57EEZaQ8PmnybmUqAFMVrVzCeBroVn5S/lS89R2RANfX xAmFc9r2pPOxbXReF+6EVM/dh9x444qScABcd2zzuGYvnhgjKHom55v0K/Pudok/XaIc HZcnrKjyp9Q2Cu3Bho+RRf+TXuvtybGlNLeqtTHvgFG5tkhjV/q6n3dvoH2P8qQbBpeC 2cBQ== X-Forwarded-Encrypted: i=1; AJvYcCXuIGKkPQE686ypO959dnd520Tlvkv/xI0Vkd1cZlNUJA0OmSZv6N4VcJ1RmccVpsKtT1VkCRtdlQ==@lists.linux.dev X-Gm-Message-State: AOJu0YzgsxHua32nKWq6vPoR5zZhDKBVwMtvnhyOQw0ZgZ1zoYHgxqR6 +8GTM026oRJdFTqvzBsmJRc7b0d1jmHMweW74hpASL7bJC1nJ1jdKRzPFUIAheo= X-Google-Smtp-Source: AGHT+IEZreKfFWDAqXk2Xvf+A/ocvBDBtPPr6oboxzVjdEeeTQGn7nOFOlKnch8yXhBLFgRaw4TU1g== X-Received: by 2002:a17:906:db05:b0:a9a:3fd8:9c95 with SMTP id a640c23a62f3a-a9e3a6c8064mr1761886166b.47.1730673846401; Sun, 03 Nov 2024 14:44:06 -0800 (PST) Received: from localhost (p200300de37464600ac00037825cc9f2c.dip0.t-ipconnect.de. [2003:de:3746:4600:ac00:378:25cc:9f2c]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-a9e564cbc39sm471794266b.86.2024.11.03.14.44.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Nov 2024 14:44:06 -0800 (PST) From: Martin Wilck X-Google-Original-From: Martin Wilck To: Christophe Varoqui , Benjamin Marzinski Cc: Martin Wilck , dm-devel@lists.linux.dev Subject: [PATCH v2 5/5] 11-dm-mpath.rules.in: set .DM_NOSCAN if MPATH_UNCHANGED is set Date: Sun, 3 Nov 2024 23:43:49 +0100 Message-ID: <20241103224349.42582-6-mwilck@suse.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103224349.42582-1-mwilck@suse.com> References: <20241103224349.42582-1-mwilck@suse.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 When multipath reloads a device or fails or restores a path, the udev rules disable LVM scanning, but since .DM_NOSCAN isn't set, blkid is still run on the device. When multipath devices that are set to queue_if_no_path lose all their paths at close to the same time, udev workers can hang trying to run blkid. The blkid results shouldn't change when multipathd is adding, removing, failing or reinstating paths, aside from avoiding hanging udev processes, we're skipping unnecessary work. Hence, set .DM_NOSCAN if MPATH_UNCHANGED is set, to avoid blkid from being called in 13-dm.rules. Suggested-by: Benjamin Marzinski Signed-off-by: Martin Wilck --- multipath/11-dm-mpath.rules.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/multipath/11-dm-mpath.rules.in b/multipath/11-dm-mpath.rules.in index 79227be..a816edb 100644 --- a/multipath/11-dm-mpath.rules.in +++ b/multipath/11-dm-mpath.rules.in @@ -145,9 +145,11 @@ IMPORT{db}="ID_PART_GPT_AUTO_ROOT" LABEL="import_end" -# If MPATH_UNCHANGED is set, adapt DM_ACTIVATION. +# If MPATH_UNCHANGED is set, adapt DM_ACTIVATION and DM_NOSCAN. +# .DM_NOSCAN controls whether blkid will be run in 13-dm-disk.rules; +# we don't want to do that if MPATH_UNCHANGED is 1. ENV{MPATH_UNCHANGED}=="0", ENV{DM_ACTIVATION}="1" -ENV{MPATH_UNCHANGED}=="1", ENV{DM_ACTIVATION}="0" +ENV{MPATH_UNCHANGED}=="1", ENV{DM_ACTIVATION}="0", ENV{.DM_NOSCAN}="1" # Reset previous DM_COLDPLUG_SUSPENDED if activation happens now ENV{.DM_SUSPENDED}!="1", ENV{DM_ACTIVATION}=="1", ENV{DM_COLDPLUG_SUSPENDED}=""