summaryrefslogtreecommitdiff
path: root/block/blk-ioprio.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2022-06-23 10:48:30 +0300
committerJens Axboe <axboe@kernel.dk>2022-06-27 15:29:12 +0300
commit4b838d9ee950b37bee624e301bd8e923165b1cf3 (patch)
tree6c6bbd6120095074bc73b0fafe0de664a51e8da8 /block/blk-ioprio.c
parentfc25545e17bd74befe0b8ab2c65ac84936be5066 (diff)
downloadlinux-4b838d9ee950b37bee624e301bd8e923165b1cf3.tar.xz
block: Fix handling of tasks without ioprio in ioprio_get(2)
ioprio_get(2) can be asked to return the best IO priority from several tasks (IOPRIO_WHO_PGRP, IOPRIO_WHO_USER). Currently the call treats tasks without set IO priority as having priority IOPRIO_CLASS_BE/IOPRIO_BE_NORM however this does not really reflect the IO priority the task will get (which depends on task's nice value). Fix the code to use the real IO priority task's IO will use. We have to modify code for ioprio_get(IOPRIO_WHO_PROCESS) to keep returning IOPRIO_CLASS_NONE priority for tasks without set IO priority as a special case to maintain userspace visible API. Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20220623074840.5960-5-jack@suse.cz Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-ioprio.c')
0 files changed, 0 insertions, 0 deletions