Linux-LVM Archive mirror
 help / color / mirror / Atom feed
From: Martin Wilck <martin.wilck@suse.com>
To: Peter Rajnoha <prajnoha@redhat.com>,
	Zdenek Kabelac <zkabelac@redhat.com>,
	Benjamin Marzinski <bmarzins@redhat.com>,
	David Teigland <teigland@redhat.com>
Cc: linux-lvm@lists.linux.dev, dm-devel@lists.linux.dev,
	Martin Wilck <mwilck@suse.com>, Hannes Reinecke <hare@suse.de>
Subject: [PATCH v2 0/7] device mapper udev rules rework
Date: Tue,  5 Mar 2024 13:05:43 +0100	[thread overview]
Message-ID: <20240305120550.11617-1-mwilck@suse.com> (raw)

All,

here is a rewrite of the device mapper udev rules, as follow up
to the previous thread "About DM_UDEV_DISABLE_OTHER_RULES_FLAG and
DM_NOSCAN" [1]. While I have taken care to minimize the impact on
other udev rule sets, some changes to both the multipath-tools and
systemd rules will be necessary. Patches for these are in preparation.

In short, the effect of this patch set is as follows:

- As before, DM_UDEV_DISABLE_OTHER_RULES_FLAG is used as general flag to
  indicate to follow-up rules that they should avoid probing the device, and
  should import device properties from the udev db if necessary.  The flag
  does not imply that existing device stacks must be destructed.  -
- DM_UDEV_DISABLE_OTHER_RULES_FLAG represents the combination of multiple
  conditions that may make it impossible to probe the device just now.  As
  such, it isn't restored from the udev db, but determined anew for every
  uevent. For saving the DM_COOKIE variable of the same name in the udev db,
  a new variable DM_COOKIE_DISABLE_OTHER_RULES_FLAG is introduced.
- The properties DM_SUSPENDED and DM_NOSCAN, which have always been considered
  internal to device-mapper and its subsystems, are renamed to .DM_SUSPENDED
  and .DM_NOSCAN, respectively. Thus they aren't saved in the udev db any
  more, and it becomes more obvious that they are not supposed to be used
  by non-dm udev rules.
- ID_FS_TYPE is imported from the db for "spurious" events.
- Properties are imported for DISK_RO="?" events, too.

Changes from v1 ("RFC") patch set:

- Instead of removing the DISK_RO clause entirely, just moved it further down
  (after the property import), and apply it for DISK_RO==0, too.
- Updated comments about device properties at the top of 10-dm.rules.

[1] https://lore.kernel.org/linux-lvm/9d50edb0-baa4-4a01-a2f0-136dfdb79937@redhat.com/T/#t

Martin Wilck (7):
  13-dm-disk.rules: import ID_FS_TYPE
  10-dm.rules: test DISK_RO after importing properties
  10-dm-rules: don't restore DM_UDEV_DISABLE_OTHER_RULES_FLAG from db
  11-dm-lvm.rules: don't restore DM_UDEV_DISABLE_OTHER_RULES_FLAG from
    db
  dm udev rules: don't export and save DM_SUSPENDED
  dm udev rules: don't export and save DM_NOSCAN
  10-dm.rules: bump DM_UDEV_RULES_VSN to 3

 udev/10-dm.rules.in          | 43 +++++++++++++++++++++++++++---------
 udev/11-dm-lvm.rules.in      | 13 +++++------
 udev/12-dm-permissions.rules |  2 +-
 udev/13-dm-disk.rules.in     |  9 ++++----
 4 files changed, 43 insertions(+), 24 deletions(-)

-- 
2.43.2


             reply	other threads:[~2024-03-05 12:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05 12:05 Martin Wilck [this message]
2024-03-05 12:05 ` [PATCH v2 1/7] 13-dm-disk.rules: import ID_FS_TYPE Martin Wilck
2024-03-05 12:05 ` [PATCH v2 2/7] 10-dm.rules: test DISK_RO after importing properties Martin Wilck
2024-03-05 12:05 ` [PATCH v2 3/7] 10-dm-rules: don't restore DM_UDEV_DISABLE_OTHER_RULES_FLAG from db Martin Wilck
2024-03-05 12:05 ` [PATCH v2 4/7] 11-dm-lvm.rules: " Martin Wilck
2024-03-05 12:05 ` [PATCH v2 5/7] dm udev rules: don't export and save DM_SUSPENDED Martin Wilck
2024-03-05 12:05 ` [PATCH v2 6/7] dm udev rules: don't export and save DM_NOSCAN Martin Wilck
2024-03-05 12:05 ` [PATCH v2 7/7] 10-dm.rules: bump DM_UDEV_RULES_VSN to 3 Martin Wilck
2024-03-05 14:42 ` [PATCH v2 0/7] device mapper udev rules rework Peter Rajnoha
2024-03-05 21:17   ` Martin Wilck

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=20240305120550.11617-1-mwilck@suse.com \
    --to=martin.wilck@suse.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=hare@suse.de \
    --cc=linux-lvm@lists.linux.dev \
    --cc=mwilck@suse.com \
    --cc=prajnoha@redhat.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).