Skip to content

Commit 6ed2785

Browse files
yuwatakeszybz
authored andcommitted
udev: decrease devlink priority for encrypted partitions
Decrease devlink priority for encrypted partitions, and make the priority for decrypted DM devices relatively higher. This is for the case that an encrypted partition and its decrypted DM device have the same label. (cherry picked from commit c4521fc)
1 parent 4bb0d3c commit 6ed2785

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

rules.d/60-persistent-storage.rules.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ LABEL="persistent_storage_blkid_probe_end"
140140
# See issue #28468.
141141
ENV{ID_FS_TYPE}=="iso9660", ENV{DEVTYPE}=="disk", OPTIONS+="link_priority=-10"
142142

143+
# Decrease devlink priority for encrypted partitions, and make the priority for
144+
# decrypted DM devices relatively higher. This is for the case that an encrypted
145+
# partition and its decrypted DM device have the same label.
146+
ENV{ID_FS_USAGE}=="crypto", OPTIONS+="link_priority=-10"
147+
143148
# by-label/by-uuid links (filesystem metadata)
144149
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
145150
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"

0 commit comments

Comments
 (0)