File 1005-udev-optionally-disable-the-generation-of-the-partla.patch of Package systemd.27527

From 6ec3bc08b0b5b37844e02c37caa72c15d27f98d6 Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
Date: Tue, 21 Aug 2018 16:21:53 +0200
Subject: [PATCH 1005/1007] udev: optionally disable the generation of the
 'partlabel' symlinks

We already addressed bsc#1089761 to prevent the generation of
"primary" or "logical".

But it wasn't enough: some users could also have used their own
name other than "primary" and "logical" of course...

For them, we introduce "udev.no-partlabel-links" kernel command-line
option to prevent the generation of all by-partlabel symlinks
regardless of the name which was choosen.

This option should be *only* used to address performance issue related
to bsc#1089761 because it will be removed as soon as the udev
performance issue will be addressed.

[fbui: fixes bsc#1089761]
---
 rules.d/60-persistent-storage.rules | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/rules.d/60-persistent-storage.rules b/rules.d/60-persistent-storage.rules
index 450c271678..ffffbf7bcc 100644
--- a/rules.d/60-persistent-storage.rules
+++ b/rules.d/60-persistent-storage.rules
@@ -119,6 +119,8 @@ ENV{DEVTYPE}=="partition", ENV{ID_WWN_WITH_EXTENSION}=="?*", SYMLINK+="disk/by-i
 
 # by-partlabel/by-partuuid links (partition metadata)
 ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}"
-ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", ENV{ID_PART_ENTRY_NAME}!="primary|logical", SYMLINK+="disk/by-partlabel/$env{ID_PART_ENTRY_NAME}"
+
+IMPORT{cmdline}="udev.no-partlabel-links"
+ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", ENV{ID_PART_ENTRY_NAME}!="primary|logical", ENV{udev.no-partlabel-links}!="?*", SYMLINK+="disk/by-partlabel/$env{ID_PART_ENTRY_NAME}"
 
 LABEL="persistent_storage_end"
-- 
2.31.1

openSUSE Build Service is sponsored by