linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Heming Zhao <heming.zhao@suse.com>
To: Zdenek Kabelac <zkabelac@redhat.com>,
	LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] confused with lvm2 filter rules
Date: Mon, 10 Jun 2019 02:43:08 +0000	[thread overview]
Message-ID: <448f9dc9-98c0-df99-d527-189bd2aa7a30@suse.com> (raw)
In-Reply-To: <d94cb5bd-b327-89e7-ceba-1f53060d060e@redhat.com>

Hello Zdenek,

I totally got your point. Let's close this session.
Thank you for you reply.

Regards,
zhm

On 6/6/19 9:51 PM, Zdenek Kabelac wrote:
> Dne 06. 06. 19 v 15:30 Heming Zhao napsal(a):
>> Hello,
>>
>> the filter is:
>> filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|",
>> "r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ]
>>
>> if filter doesn't contain "a/.*/":
>> - pvcreate, vgcreate & vgextend use regex filter to reject the disk.
>> (correct logic)
>> �> if filter contains "a/.*/":
>> - regex fileter pass the disk under pvcreate/vgcreate, create 
>> successfully.
>> - regex filter reject the disk under vgextend. (wrong. should create
>> successfuly)
>> - vgextend should do the same action as pvcreate/vgcreate.
> 
> Hi
> 
> As has been said -�� when you put� a|.*| as the last rule - it's doing 
> something different then you may think. So please do NOT test with such 
> filter (I've been even planning to add 'WARNING:' message when lvm2 
> would spot such filter....)
> 
>> log as below (with filter contain: "a/.*/"):
> 
> Not really interesting trace - the filter works correctly for this case.
> 
> The best advice is - DO NOT USE IT set this way.
> 
> Code is correct and there is no bug - it's just non-trivial to 
> understand what just filter is doing. Behavior cannot be changed without 
> causing regression for other users that set filters correctly.
> 
> So do you have any buggy trace for correctly set filter ?
> 
> Regards
> 
> Zdenek
> 

  reply	other threads:[~2019-06-10  2:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03 13:03 [linux-lvm] confused with lvm2 filter rules Heming Zhao
2019-06-05  2:41 ` Heming Zhao
2019-06-05 10:20 ` Zdenek Kabelac
2019-06-06  6:42   ` Heming Zhao
2019-06-06  8:16   ` Heming Zhao
2019-06-06  8:43     ` Zdenek Kabelac
2019-06-06 13:30       ` Heming Zhao
2019-06-06 13:51         ` Zdenek Kabelac
2019-06-10  2:43           ` Heming Zhao [this message]
     [not found]             ` <60982841-fabc-71d9-b8b1-6d98b87ba738@suse.com>
2019-06-25  7:56               ` Martin Wilck
2019-06-25  8:56                 ` Zdenek Kabelac
2019-06-25  9:13                   ` Heming Zhao
2019-06-26  6:49                     ` Heming Zhao

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=448f9dc9-98c0-df99-d527-189bd2aa7a30@suse.com \
    --to=heming.zhao@suse.com \
    --cc=linux-lvm@redhat.com \
    --cc=zkabelac@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).