Re: [PATCH 3/6] 11-dm-mpath.rules: use import logic like 13-dm-disk.rules

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

 



On Thu, 2024-02-08 at 19:36 -0500, Benjamin Marzinski wrote:
> On Mon, Feb 05, 2024 at 01:46:35PM +0100, Martin Wilck wrote:
> > We have to import the properties if either DM_NOSCAN or
> > DM_DISABLE_OTHER_RULES_FLAG is set, because blkid will be skipped
> > in both cases. Also, if DM_UDEV_PRIMARY_SOURCE_FLAG is not set,
> > it makes no sense to try and import the properties.
> > 
> > Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
> > ---
> >  multipath/11-dm-mpath.rules | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/multipath/11-dm-mpath.rules b/multipath/11-dm-
> > mpath.rules
> > index 43d227c..8fc4a6f 100644
> > --- a/multipath/11-dm-mpath.rules
> > +++ b/multipath/11-dm-mpath.rules
> > @@ -89,7 +89,8 @@ ENV{MPATH_DEVICE_READY}!="0",
> > ENV{.MPATH_DEVICE_READY_OLD}=="0", \
> >  # not. If symlinks get lost, systemd may auto-unmount file
> > systems.
> >  
> >  LABEL="scan_import"
> > -ENV{DM_NOSCAN}!="1", GOTO="import_end"
> > +ENV{DM_NOSCAN}!="1", ENV{DM_DISABLE_OTHER_RULES_FLAG}!="1", \
> > +	ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}=="1", GOTO="import_end"
> >  IMPORT{db}="ID_FS_TYPE"
> >  IMPORT{db}="ID_FS_USAGE"
> >  IMPORT{db}="ID_FS_UUID_ENC"
> > -- 
> > 2.43.0
> 
> Doesn't this mean that we will always import the properties if
> ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!="1"
> 
> I think you mean
> 
> ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!="1", GOTO="import_end"
> ENV{DM_NOSCAN}!="1", ENV{DM_DISABLE_OTHER_RULES_FLAG}!="1",
> GOTO="import_end"
> 
> right?

Yes :-/
Thanks for pointing it out.

Martin






[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux