Make I/O priority option generic for non-Linux environment [1/2]
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Tue, 19 Jul 2016 16:33:43 +0000 (01:33 +0900)
committerJens Axboe <axboe@fb.com>
Tue, 19 Jul 2016 21:45:49 +0000 (15:45 -0600)
commit1767bd34cdc1a7607a8460b8173d08d7954adf99
treec4a4be06099a24fea7667bd7a2f78d580627dadb
parenta306497afd5ae9dfa52d0423073ed73333ded475
Make I/O priority option generic for non-Linux environment [1/2]

There is a kernel that supports I/O priority with a syscall similar
to Linux (e.g. DragonFlyBSD's ioprio_set(2) which apparently seems
to have been inspired by ioprio_set(2) in Linux kernel), however
min/max value of the priority may differ, so use OS specific macros
instead of hardcoded values that are designed to work on Linux.

This commit adds IOPRIO_MIN|MAX_PRIO and IOPRIO_MIN|MAX_PRIO_CLASS
to Linux (incl Android), but no functional changes.

Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
options.c
os/os-android.h
os/os-linux.h