Re: [PATCH 01/11] 11-dm-mpath.rules: don't set MPATH_DEVICE_READY=0 for suspended devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2024-03-26 at 17:52 -0400, Benjamin Marzinski wrote:
> On Sun, Mar 24, 2024 at 10:12:51PM +0100, Martin Wilck wrote:
> > MPATH_DEVICE_READY is an internal property, not to be consumed by
> > later rules. It means that there are no usable paths. Being
> > suspended
> > is a different, independent property of a map.
> > 
> > Don't set MPATH_DEVICE_READY=0 for suspended devices.
> > 
> > Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
> > ---
> >  multipath/11-dm-mpath.rules.in | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/multipath/11-dm-mpath.rules.in b/multipath/11-dm-
> > mpath.rules.in
> > index d9585ab..3f23108 100644
> > --- a/multipath/11-dm-mpath.rules.in
> > +++ b/multipath/11-dm-mpath.rules.in
> > @@ -100,7 +100,7 @@ ENV{MPATH_DEVICE_READY}=="0", \
> >  # we have to postpone the activation until the next event.
> >  ENV{MPATH_DEVICE_READY}=="0", GOTO="dont_activate"
> >  ENV{.MPATH_DEVICE_READY_OLD}!="0", GOTO="dont_activate"
> > -ENV{DM_SUSPENDED}=="1", ENV{MPATH_DEVICE_READY}="0",
> > GOTO="dont_activate"
> > +ENV{DM_SUSPENDED}=="1", GOTO="dont_activate"
> 
> I need to clarify this one.  I thought that the point of setting
> ENV{MPATH_DEVICE_READY} to "0" here was that
> ENV{.MPATH_DEVICE_READY_OLD} must be "0" and ENV{MPATH_DEVICE_READY}
> must be "1" here, so we want to set DM_ACTIVATE. Unfortunately, the
> device is suspended, so we want to postpone the activation till the
> next
> event, like the command above this codeblock says.  To do that, we
> set
> ENV{MPATH_DEVICE_READY} back to "0", so that on the next event,
> ENV{.MPATH_DEVICE_READY_OLD} will be "0".
> 
> Is that not necessary for some reason? Perhaps because we're going to
> get an actual DM generated event when we resume, so DM_ACTIVATE will
> already be set when we get the next event where DM_SUSPENDED != "1".
> If that's the case we should probably change the comment over this
> block. 

You are right. We must set  ENV{MPATH_DEVICE_READY}="0" here to
remember the state until the next event is received.

Thanks for catching this.

Martin






[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux