Re: [PATCH 2/6] 11-dm-mpath.rules: don't import properties that are already set
Benjamin Marzinski <[email protected]> Fri, 9 Feb 2024 13:01:42 -0500
| Newsgroups | gmane.linux.lvm.general |
|---|---|
| Message-ID | <ZcZohsUNXd4UHZp0__19145.0789732457$1707501770$gmane$org@bmarzins-01.fast.eng.rdu2.dc.redhat.com> |
On Fri, Feb 09, 2024 at 05:55:09PM +0100, Martin Wilck wrote: > DM_UDEV_DISABLE_OTHER_RULES_FLAG is handled by 10-dm.rules, which imports > it from db if necessary. There is no need to do this again here. > > DM_NOSCAN may be already set from previous rules, e.g. if the device is > suspended. Make sure we don't overwrite it. > > Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]> > --- > multipath/11-dm-mpath.rules.in | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/multipath/11-dm-mpath.rules.in b/multipath/11-dm-mpath.rules.in > index e7be12d..05c4294 100644 > --- a/multipath/11-dm-mpath.rules.in > +++ b/multipath/11-dm-mpath.rules.in > @@ -7,7 +7,13 @@ IMPORT{db}="MPATH_DEVICE_READY" > > # If this uevent didn't come from dm, don't try to update the > # device state > -ENV{DM_COOKIE}!="?*", ENV{DM_ACTION}!="PATH_*", IMPORT{db}="DM_UDEV_DISABLE_OTHER_RULES_FLAG", IMPORT{db}="DM_NOSCAN", GOTO="scan_import" > +ENV{DM_COOKIE}=="?*", GOTO="check_ready" > +ENV{DM_ACTION}=="PATH_*", GOTO="check_ready" > + > +ENV{DM_NOSCAN}!="?*", IMPORT{db}="DM_NOSCAN" > +GOTO="scan_import" > + > +LABEL="check_ready" > > ENV{.MPATH_DEVICE_READY_OLD}="$env{MPATH_DEVICE_READY}" > > -- > 2.43.0