Re: [RFC PATCH 0/2] multipath: change default devnode blacklist

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

 



Hi Ben,

On Thu, 2020-06-04 at 19:30 -0500, Benjamin Marzinski wrote:
> I recently got a request to add the Oracle ASM filer driver devices
> to
> multipath's builtin devnode blacklist.  However, instead of having to
> do
> always this for each device type individually, I decided to make
> multipath blacklist all non scsi, nvme, and dasd devnodes by default.
> This is what the multipath udev rules already do. If people don't
> like
> this solution, the alternative is to add another line to the default
> devnode blacklist like "^(asm/|oracleafd/|ofsctl)".

Thanks, this looks ok. But I'd like to propose an alternative idea:
Extend the RE syntax in our config file to allow negated regular 
expressions. Like this:

blacklist {
    devnode "!(^(sd[a-z]|dasd[a-z]|nvme[0-9]))"
}

The "!(${RE})" construct would mean "everything that does not match ${RE}".
This logic would only be applied to an entire regex.
If a user needs a RE matching with "!(" and ending with ")", she can escape 
the exclamation mark "\!(like this)".

AFAICS this could be implemented quite easily (by adding a "bool negate" field
in struct blentry and some simple parser logic), and could be applied to other 
REs in the config file as well. We could print this with "multipath -t", and 
we wouldn't need to document an exception.

It's also pretty much backwards-compatible, I don't think many people use
regexes starting with "!(" for multipath these days.

Regards,
Martin

-- 
Dr. Martin Wilck <mwilck@xxxxxxxx>, Tel. +49 (0)911 74053 2107
SUSE  Software Solutions Germany GmbH
HRB 36809, AG Nürnberg GF: Felix
Imendörffer



--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel





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

  Powered by Linux