From: Peter Rajnoha <prajnoha@redhat.com>
To: Martin Wilck <martin.wilck@suse.com>,
Benjamin Marzinski <bmarzins@redhat.com>
Cc: Zdenek Kabelac <zkabelac@redhat.com>,
David Teigland <teigland@redhat.com>,
linux-lvm@lists.linux.dev, dm-devel@lists.linux.dev,
Heming Zhao <heming.zhao@suse.com>
Subject: Re: About DM_UDEV_DISABLE_OTHER_RULES_FLAG and DM_NOSCAN
Date: Mon, 19 Feb 2024 09:36:45 +0100 [thread overview]
Message-ID: <9d50edb0-baa4-4a01-a2f0-136dfdb79937@redhat.com> (raw)
In-Reply-To: <b38d9ae7b49ec1569b25c5f5a55afbc47df4b09d.camel@suse.com>
On 2/16/24 15:29, Martin Wilck wrote:
> On Thu, 2024-02-15 at 17:45 -0500, Benjamin Marzinski wrote:
>> On Mon, Feb 12, 2024 at 03:16:27PM +0100, Martin Wilck wrote:
>>> On Mon, 2024-02-12 at 13:32 +0100, Peter Rajnoha wrote:
>>>
>>>>
>>>> What do you think about keeping a single
>>>> DM_UDEV_DISABLE_OTHER_RULES_FLAG for this, just having a
>>>> different
>>>> value, say "2" to denote the B case? Otherwise, we need 2
>>>> distinct
>>>> variables (which is harder for others to accept I bet).
>>>
>>> Yes, that could work, if the save / restore is implemented cleanly.
>>
>> What if we never read DM_UDEV_DISABLE_OTHER_RULES_FLAG from the
>> database. Instead how about, if DM_UDEV_DISABLE_OTHER_RULES_FLAG is
>> set
>> by "dmsetup udevflags", we save it as something like
>> DM_IGNORE_DEVICE.
>> Otherwise, if it's a spurious event, we read DM_IGNORE_DEVICE from
>> the
>> database. After "dm_flags_done", if DM_IGNORE_DEVICE is set, we set
>> DM_UDEV_DISABLE_OTHER_RULES_FLAG. This leaves the other rules free to
>> mess with DM_UDEV_DISABLE_OTHER_RULES_FLAG all they want.
>
> That sounds good and aligns with what I'd thought by myself. But we
> should use a less suggestive name. DM_IGNORE_DEVICE would again make
> users think that they should consume this variable, like DM_NOSCAN.
>
Yup, that looks reasonable and clean.
Though, the DM_UDEV_DISABLE_OTHER_RULES_FLAG is only one flag from the
whole set. To avoid handling only a single selected flag in a special
way and to avoid issues raising from that, we might as well apply that
logic to all the other flags decoded by `dmsetup udevflags`.
--
Peter
prev parent reply other threads:[~2024-02-19 8:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 21:58 About DM_UDEV_DISABLE_OTHER_RULES_FLAG and DM_NOSCAN Martin Wilck
2024-02-12 9:51 ` Peter Rajnoha
2024-02-12 11:09 ` Martin Wilck
2024-02-12 12:32 ` Peter Rajnoha
2024-02-12 14:16 ` Martin Wilck
2024-02-15 22:45 ` Benjamin Marzinski
2024-02-16 14:29 ` Martin Wilck
2024-02-19 8:36 ` Peter Rajnoha [this message]
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=9d50edb0-baa4-4a01-a2f0-136dfdb79937@redhat.com \
--to=prajnoha@redhat.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=heming.zhao@suse.com \
--cc=linux-lvm@lists.linux.dev \
--cc=martin.wilck@suse.com \
--cc=teigland@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 read-only IMAP folder(s) and NNTP newsgroup(s).