On Sun, Mar 24, 2024 at 10:12:59PM +0100, Martin Wilck wrote: > This combination of a GOTO and a simple rule can be combined > into a single rule. > > Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> Reviewed-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx> > --- > multipath/11-dm-mpath.rules.in | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/multipath/11-dm-mpath.rules.in b/multipath/11-dm-mpath.rules.in > index 8833e08..2285853 100644 > --- a/multipath/11-dm-mpath.rules.in > +++ b/multipath/11-dm-mpath.rules.in > @@ -56,14 +56,10 @@ PROGRAM=="@BINDIR@/multipath -U -v1 %k", GOTO="paths_ok" > ENV{MPATH_DEVICE_READY}="0", GOTO="mpath_action" > LABEL="paths_ok" > > -# Don't mark a device ready on a PATH_FAILED event. even if > -# DM_NR_VALID_PATHS is greater than 0. Just keep the existing > -# value > -ENV{DM_ACTION}=="PATH_FAILED", GOTO="mpath_action" > - > -# This event is either a PATH_REINSTATED or a table reload where > -# there are active paths. Mark the device ready > -ENV{MPATH_DEVICE_READY}="1" > +# For PATH_FAILED events, keep the existing value of MPATH_DEVICE_READY. > +# If it's not PATH_FAILED, this event is either a PATH_REINSTATED or a > +# table reload where there are active paths. Mark the device ready. > +ENV{DM_ACTION}!="PATH_FAILED", ENV{MPATH_DEVICE_READY}="1" > > LABEL="mpath_action" > > -- > 2.43.2