summaryrefslogtreecommitdiffstats
path: root/schedutils/ionice.c
diff options
context:
space:
mode:
authorJakob Unterwurzacher2009-01-17 02:38:32 +0100
committerKarel Zak2009-05-27 23:43:18 +0200
commit5dc9371ce6ab327b627b29771e7bb3d26f363e9e (patch)
treefb125c02760368a08a456291ecc48c64cd94e3d7 /schedutils/ionice.c
parentblkid: add device-mapper snapshot cow device probe (diff)
downloadkernel-qcow2-util-linux-5dc9371ce6ab327b627b29771e7bb3d26f363e9e.tar.gz
kernel-qcow2-util-linux-5dc9371ce6ab327b627b29771e7bb3d26f363e9e.tar.xz
kernel-qcow2-util-linux-5dc9371ce6ab327b627b29771e7bb3d26f363e9e.zip
ionice: Allow setting the none class
Allow users to set the "none" class on processes. Using the none class has the distict advantage that the io priority is inherited from the cpu nice level. Update the man page to reflect the change. Signed-off-by: Jakob Unterwurzacher <jakobunt@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'schedutils/ionice.c')
-rw-r--r--schedutils/ionice.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/schedutils/ionice.c b/schedutils/ionice.c
index 5f1f34894..082b23bab 100644
--- a/schedutils/ionice.c
+++ b/schedutils/ionice.c
@@ -85,7 +85,7 @@ static void usage(int rc)
"\nOptions:\n"
" -n <classdata> class data (0-7, lower being higher prio)\n"
" -c <class> scheduling class\n"
- " 1: realtime, 2: best-effort, 3: idle\n"
+ " 0: none, 1: realtime, 2: best-effort, 3: idle\n"
" -t ignore failures\n"
" -h this help\n\n"));
exit(rc);
@@ -147,7 +147,9 @@ int main(int argc, char *argv[])
switch (ioclass) {
case IOPRIO_CLASS_NONE:
- ioclass = IOPRIO_CLASS_BE;
+ if (set & 1)
+ warnx(_("ignoring given class data for none class"));
+ ioprio = 0;
break;
case IOPRIO_CLASS_RT:
case IOPRIO_CLASS_BE: