diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2015-02-11 15:26:52 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2015-02-13 08:39:07 +0100 |
commit | b87b01cf83947f467f3c46d9831cd67955fc46b9 (patch) | |
tree | 4d746ed265a58ce4652af2520b38d348e2108e55 /rules | |
parent | 0a6f50c0afdfc434b492493bd9efab20cbee8623 (diff) | |
download | systemd-b87b01cf83947f467f3c46d9831cd67955fc46b9.tar.gz systemd-b87b01cf83947f467f3c46d9831cd67955fc46b9.tar.bz2 systemd-b87b01cf83947f467f3c46d9831cd67955fc46b9.zip |
rules: Fix by-path of mmc RPMB partitions and don't blkid them
Linux 3.10+ exposes RPMB (Replay Protected Memory Block) partitions of MMC
devices [1] ; trying to read them with blkid or other unspecific means will
cause kernel buffer I/O errors and timeouts. So don't run blkid on these.
Also ensure that /dev/disk/by-path creates proper symlinks and exposes the
-rpmb partition separately, instead of letting the "normal" partition symlink
point to the rpbm device (this is a race condition).
[1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=090d25fe224c0
https://launchpad.net/bugs/1333140
Diffstat (limited to 'rules')
-rw-r--r-- | rules/60-persistent-storage.rules | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules index 475b151535..08ed1ccf74 100644 --- a/rules/60-persistent-storage.rules +++ b/rules/60-persistent-storage.rules @@ -53,7 +53,8 @@ KERNEL=="mspblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+= # by-path (parent device path) ENV{DEVTYPE}=="disk", DEVPATH!="*/virtual/*", IMPORT{builtin}="path_id" -ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", KERNEL=="mmcblk[0-9]*rpmb", SYMLINK+="disk/by-path/$env{ID_PATH}-rpmb" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", KERNEL!="mmcblk[0-9]*rpmb", SYMLINK+="disk/by-path/$env{ID_PATH}" ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" # skip unpartitioned removable media devices from drivers which do not send "change" events @@ -66,6 +67,9 @@ KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DAT KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \ IMPORT{builtin}="blkid --noraid" +# don't try to read Replay Protected Memory Block partitions +KERNEL=="mmcblk[0-9]*rpmb", GOTO="persistent_storage_end" + # probe filesystem metadata of disks KERNEL!="sr*", IMPORT{builtin}="blkid" |