summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/initramfs/scripts/zfs18
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/initramfs/scripts/zfs b/contrib/initramfs/scripts/zfs
index f63a67792..500ae3fc8 100644
--- a/contrib/initramfs/scripts/zfs
+++ b/contrib/initramfs/scripts/zfs
@@ -883,6 +883,24 @@ mountroot()
/bin/sh
fi
+ # Set elevator=noop on the root pool's vdevs' disks. ZFS already
+ # does this for wholedisk vdevs (for all pools), so this is only
+ # important for partitions.
+ "${ZPOOL}" status -L "${ZFS_RPOOL}" 2> /dev/null |
+ awk '/^\t / && !/(mirror|raidz)/ {
+ dev=$1;
+ sub(/[0-9]+$/, "", dev);
+ print dev
+ }' |
+ while read i
+ do
+ if [ -e "/sys/block/$i/queue/scheduler" ]
+ then
+ echo noop > "/sys/block/$i/queue/scheduler"
+ fi
+ done
+
+
# ----------------------------------------------------------------
# P R E P A R E R O O T F I L E S Y S T E M