HomeFreeBSD

Check scheduler for "noop" before setting "noop"

Description

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

Details

Provenance
Garrett Fields <ghfields@gmail.com>Authored on Oct 10 2018, 3:46 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Oct 10 2018, 3:46 PM
Parents
rG2ef0f8c3298e: Print "(repairing)" in zpool status again
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG5b3bfd86a4ac: Check scheduler for "noop" before setting "noop" (authored by Garrett Fields <ghfields@gmail.com>).Oct 10 2018, 3:46 PM