diff mbox series

[06/11] 11-dm-mpath.rules: don't import properties with new 13-dm-disk.rules

Message ID 20240324211301.7200-7-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series multipath udev rules changes for dm rules V3 | expand

Commit Message

Martin Wilck March 24, 2024, 9:12 p.m. UTC
With the late changes to 13-dm-disk.rules, we don't need to import any
blkid-generated properties from the udev database, because they will
be imported later.

Except for ID_FS_TYPE, this actually holds since lvm2 commit 94f77a4 ("udev:
import previous results of blkid when in suspended state"), included in lvm2
2.03.19, but we have no simple way to detect the version of the lvm2 rules.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 multipath/11-dm-mpath.rules.in | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Benjamin Marzinski March 26, 2024, 10:58 p.m. UTC | #1
On Sun, Mar 24, 2024 at 10:12:56PM +0100, Martin Wilck wrote:
> With the late changes to 13-dm-disk.rules, we don't need to import any
> blkid-generated properties from the udev database, because they will
> be imported later.
> 
> Except for ID_FS_TYPE, this actually holds since lvm2 commit 94f77a4 ("udev:
> import previous results of blkid when in suspended state"), included in lvm2
> 2.03.19, but we have no simple way to detect the version of the lvm2 rules.
> 
> Signed-off-by: Martin Wilck <mwilck@suse.com>
> ---
>  multipath/11-dm-mpath.rules.in | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/multipath/11-dm-mpath.rules.in b/multipath/11-dm-mpath.rules.in
> index cf004fd..8f22954 100644
> --- a/multipath/11-dm-mpath.rules.in
> +++ b/multipath/11-dm-mpath.rules.in
> @@ -124,6 +124,10 @@ LABEL="scan_import"
>  # have never been properly set. Don't import them.
>  ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!="1", GOTO="import_end"
>  
> +# DM rules v3 will import missing properties on 13-dm-disk.rules.
> +# No need to do it here.
> +ENV{DM_UDEV_RULES_VSN}=="3", GOTO="import_end"

Again, I'd rather
ENV{DM_UDEV_RULES_VSN}!="1|2"

> +
>  # 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"
>  
> -- 
> 2.43.2
diff mbox series

Patch

diff --git a/multipath/11-dm-mpath.rules.in b/multipath/11-dm-mpath.rules.in
index cf004fd..8f22954 100644
--- a/multipath/11-dm-mpath.rules.in
+++ b/multipath/11-dm-mpath.rules.in
@@ -124,6 +124,10 @@  LABEL="scan_import"
 # have never been properly set. Don't import them.
 ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!="1", GOTO="import_end"
 
+# DM rules v3 will import missing properties on 13-dm-disk.rules.
+# No need to do it here.
+ENV{DM_UDEV_RULES_VSN}=="3", 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"