Seperate ioprio value from setting
Newer kernels allow passing a value of '0' for resetting ioprio,
and our check for if (td->ioprio) doesn't allow passing a value of
0 into sys_ioprio_set(). So seperate the setting from the value by
adding a ->ioprio_set bool.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/options.c b/options.c
index e151634..0fc9955 100644
--- a/options.c
+++ b/options.c
@@ -74,6 +74,7 @@
td->ioprio &= mask;
td->ioprio |= *val << IOPRIO_CLASS_SHIFT;
+ td->ioprio_set = 1;
return 0;
}
@@ -89,6 +90,7 @@
if ((td->ioprio >> IOPRIO_CLASS_SHIFT) == 0)
td->ioprio |= IOPRIO_CLASS_BE << IOPRIO_CLASS_SHIFT;
+ td->ioprio_set = 1;
return 0;
}
#endif