Commit d2e8e037 authored by Michael Biebl's avatar Michael Biebl
Browse files

Switch back to load the sg module via the kmod builtin

The problem was not that the kmod builtin is faster then modprobe but
rather the incorrect usage of the "=" assignment operator. We need to
use "+=" here, so the sg module is loaded in addition to other scsi
modules, which are loaded via the modalias rule.
Thanks to Tommaso Colombo for the analysis.
parent 4dec1365
systemd (204-13) UNRELEASED; urgency=medium
* Switch back to load the sg module via the kmod builtin. The problem was
not that the kmod builtin is faster then modprobe but rather the incorrect
usage of the "=" assignment operator. We need to use "+=" here, so the sg
module is loaded in addition to other scsi modules, which are loaded via
the modalias rule. Thanks to Tommaso Colombo for the analysis.
-- Michael Biebl <biebl@debian.org> Fri, 27 Jun 2014 22:37:23 +0200
systemd (204-12) unstable; urgency=medium
[ Martin Pitt ]
......
......@@ -5,22 +5,19 @@ Subject: Load sg module from 80-drivers.rules
Taken from the Debian specific rules, this is the remaining difference over the
upstream 80-drivers.rules.
Note: DON'T use the kmod builtin here! It's too fast and then races with sd,
causing the latter to not see SCSI disks. (https://bugs.debian.org/752591)
Bug-Debian: http://bugs.debian.org/657948
---
rules/80-drivers.rules | 1 +
1 file changed, 1 insertion(+)
diff --git a/rules/80-drivers.rules b/rules/80-drivers.rules
index 50523e4..9222fb9 100644
index 50523e4..17ebee3 100644
--- a/rules/80-drivers.rules
+++ b/rules/80-drivers.rules
@@ -9,5 +9,6 @@ SUBSYSTEM=="memstick", RUN{builtin}="kmod load ms_block mspro_block"
SUBSYSTEM=="i2o", RUN{builtin}="kmod load i2o_block"
SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}="kmod load ppdev"
KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}="kmod load sm_ftl"
+SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe -b sg"
+SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN{builtin}+="kmod load sg"
LABEL="drivers_end"
......@@ -24,7 +24,7 @@ On Sat, Jul 20, 2013 at 12:56 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rules/80-drivers.rules b/rules/80-drivers.rules
index 9222fb9..b9ba36d 100644
index 17ebee3..0163ba8 100644
--- a/rules/80-drivers.rules
+++ b/rules/80-drivers.rules
@@ -2,7 +2,7 @@
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment