mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
Check scheduler for "noop" before setting "noop"
Originally code only checked for presence of "/sys/block/$i/queue/ scheduler". "sh: write error: Invalid argument" was produced when trying to set "noop" on certain devices (eg. virtio) when it isn't a listed option. This modification continues to check for the presence of "/sys/block/$i/queue/scheduler" and also checks that it contains "noop" as an option before setting "noop". Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Signed-off-by: Garrett Fields <ghfields@gmail.com> Closes #8004
This commit is contained in:
parent
2ef0f8c329
commit
5b3bfd86a4
@ -900,7 +900,7 @@ mountroot()
|
||||
}' |
|
||||
while read i
|
||||
do
|
||||
if [ -e "/sys/block/$i/queue/scheduler" ]
|
||||
if grep -sq noop /sys/block/$i/queue/scheduler
|
||||
then
|
||||
echo noop > "/sys/block/$i/queue/scheduler"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user