diff mbox series

[blktests] zbd/012: avoid fio stop by I/O scheduler set failure

Message ID 20250226062015.1620612-1-shinichiro.kawasaki@wdc.com (mailing list archive)
State New
Headers show
Series [blktests] zbd/012: avoid fio stop by I/O scheduler set failure | expand

Commit Message

Shinichiro Kawasaki Feb. 26, 2025, 6:20 a.m. UTC
The test case zbd/012 fails occasionally due to a sudden fio stop. At
the fio stop, fio outputs the following error message:

 fio: unable to set io scheduler to none
 fio: pid=119786, err=22/file:backend.c:1485, func=iosched_switch, error=Invalid argument

The test case specifies --scheduler=none option to the fio command. At
the workload start, fio sets I/O scheduler of the test target device to
"none" by writing to the sysfs "queue/scheduler" attribute. Subsequently,
fio verifies this action by reading the attribute, expecting to find the
string "[none]". However, it instead finds "[mq-deadline]", leading to
the error.

The test case runs another process to switch the I/O scheduler of the
test target device between "none" and "mq-deadline" every 0.1 seconds.
When the switch to "mq-deadline" occurs in the interim between the sysfs
attribute write and read by fio, fio encounters the "[mq-deadline]"
value, resulting in the error.

To avoid the failure, drop the --scheduler=none option from the fio
command in the test case zbd/012. I confirmed that the test case still
can recreate the hang with this fix, using the kernel v6.12.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 tests/zbd/012 | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/zbd/012 b/tests/zbd/012
index 42ca351..2a93d59 100755
--- a/tests/zbd/012
+++ b/tests/zbd/012
@@ -59,7 +59,6 @@  test() {
 				--filename="${zdev}"
 				--iodepth="${qd}"
 				--ioengine="${ioengine}"
-				--ioscheduler=none
 				--name="requeuing-and-queue-freezing-${qd}"
 				--runtime=$((${TIMEOUT:-30}/5))
 				--rw=randwrite