]> git.baikalelectronics.ru Git - kernel.git/commit
block: bfq: fix bfq_set_next_ioprio_data()
authorDamien Le Moal <damien.lemoal@wdc.com>
Wed, 11 Aug 2021 03:36:57 +0000 (12:36 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 18 Aug 2021 13:21:11 +0000 (07:21 -0600)
commitb685fd6e1e9a4579460fc283e134c1b0d1dde075
tree5709232a1ad77b6c95c9e38fe888f0209baff1a5
parenta72f90dbd2e35757535799a7a43f5bd84c3f46a3
block: bfq: fix bfq_set_next_ioprio_data()

For a request that has a priority level equal to or larger than
IOPRIO_BE_NR, bfq_set_next_ioprio_data() prints a critical warning but
defaults to setting the request new_ioprio field to IOPRIO_BE_NR. This
is not consistent with the warning and the allowed values for priority
levels. Fix this by setting the request new_ioprio field to
IOPRIO_BE_NR - 1, the lowest priority level allowed.

Cc: <stable@vger.kernel.org>
Fixes: 35bf7cdf2089 ("block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler")
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20210811033702.368488-2-damien.lemoal@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-iosched.c