device mapper udev rules rework
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest7 patches 2 repliesIn review
- v1 RFC7 patches 22 repliesSuperseded
Changes in v2 from the cover letter
- 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/[email protected]/T/#t
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | 13-dm-disk.rules: import ID_FS_TYPEudev/ | +1 | 0 replies | |
| 2/7 | 10-dm.rules: test DISK_RO after importing propertiesudev/ | +4 | 0 replies | |
| 3/7 | 10-dm-rules: don't restore DM_UDEV_DISABLE_OTHER_RULES_FLAG from dbudev/ | +10 | 0 replies | |
| 4/7 | 11-dm-lvm.rules: don't restore DM_UDEV_DISABLE_OTHER_RULES_FLAG from dbudev/ | +5 | 0 replies | |
| 5/7 | dm udev rules: don't export and save DM_SUSPENDEDudev/ udev/ udev/ | +11 | 0 replies | |
| 6/7 | dm udev rules: don't export and save DM_NOSCANudev/ udev/ | +3 | 0 replies | |
| 7/7 | 10-dm.rules: bump DM_UDEV_RULES_VSN to 3udev/ | +11 | 0 replies |
Reviews trailers per patch
None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Peter Rajnoha |
|---|---|
| Series | R-b |
| 1/7 | |
| 2/7 | |
| 3/7 | |
| 4/7 | |
| 5/7 | |
| 6/7 | |
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/7] device mapper udev rules rework
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/[email protected]/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(-)
Signature · 1 line
2.43.2