linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Joe Thornber <thornber@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] lvm filter regex format
Date: Mon, 18 Dec 2017 17:49:15 +0000	[thread overview]
Message-ID: <20171218174915.snuf5ctm4ud5naye@reti> (raw)
In-Reply-To: <CAM2wQBvP-h9GSTYLk_69rYVL=WEsPyvL0KsH+gqBBPJ_10J75A@mail.gmail.com>

On Mon, Dec 18, 2017 at 05:16:14PM +0000, Thanos Makatos wrote:
> I'm trying to be very specific in the global_filter of lvm.conf and
> ignore devices under /dev/mapper of the format
> '^/dev/mapper/[a-z0-9]{14}$', however the repetition count '{14}' does
> not seem to be honored?
> 
> Currently I have to repeat '[a-z0-9]' fourteen times, which works but
> it's a bit ugly.
> 
> Does the filter use some standarized regex format?

It's a custom engine that I wrote which matches all the regexs in the
filters at the same time (so is pretty fast).  Looking at the header here:

   https://github.com/jthornber/lvm2-ejt/blob/master/libdm/regex/parse_rx.h

It seems to support just catenation, |, *, +, ?, [<charset>], ^ and $

Out of interest why are you using the length of the device name as a discriminator?

- Joe

  reply	other threads:[~2017-12-18 17:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-18 17:16 [linux-lvm] lvm filter regex format Thanos Makatos
2017-12-18 17:49 ` Joe Thornber [this message]
2017-12-19  9:36   ` Thanos Makatos
     [not found] <72381975.739900.1513623186634.ref@mail.yahoo.com>
2017-12-18 18:53 ` matthew patton
2017-12-18 22:43   ` Zdenek Kabelac
2017-12-19  8:51   ` Joe Thornber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171218174915.snuf5ctm4ud5naye@reti \
    --to=thornber@redhat.com \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).