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\"", \