From: Damien Le Moal <damien.lemoal@wdc.com> To: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org, Paolo Valente <paolo.valente@linaro.org>, linux-f2fs-devel@lists.sourceforge.net, Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <yuchao0@huawei.com> Subject: [PATCH v3 1/4] block: bfq: fix bfq_set_next_ioprio_data() Date: Fri, 6 Aug 2021 20:18:54 +0900 [thread overview] Message-ID: <20210806111857.488705-2-damien.lemoal@wdc.com> (raw) In-Reply-To: <20210806111857.488705-1-damien.lemoal@wdc.com> 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: aee69d78dec0 ("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> --- block/bfq-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 727955918563..1f38d75524ae 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -5293,7 +5293,7 @@ bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic) if (bfqq->new_ioprio >= IOPRIO_BE_NR) { pr_crit("bfq_set_next_ioprio_data: new_ioprio %d\n", bfqq->new_ioprio); - bfqq->new_ioprio = IOPRIO_BE_NR; + bfqq->new_ioprio = IOPRIO_BE_NR - 1; } bfqq->entity.new_weight = bfq_ioprio_to_weight(bfqq->new_ioprio); -- 2.31.1
WARNING: multiple messages have this Message-ID (diff)
From: Damien Le Moal <damien.lemoal@wdc.com> To: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org, Paolo Valente <paolo.valente@linaro.org>, linux-f2fs-devel@lists.sourceforge.net, Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <yuchao0@huawei.com> Subject: [f2fs-dev] [PATCH v3 1/4] block: bfq: fix bfq_set_next_ioprio_data() Date: Fri, 6 Aug 2021 20:18:54 +0900 [thread overview] Message-ID: <20210806111857.488705-2-damien.lemoal@wdc.com> (raw) In-Reply-To: <20210806111857.488705-1-damien.lemoal@wdc.com> 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: aee69d78dec0 ("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> --- block/bfq-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 727955918563..1f38d75524ae 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -5293,7 +5293,7 @@ bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic) if (bfqq->new_ioprio >= IOPRIO_BE_NR) { pr_crit("bfq_set_next_ioprio_data: new_ioprio %d\n", bfqq->new_ioprio); - bfqq->new_ioprio = IOPRIO_BE_NR; + bfqq->new_ioprio = IOPRIO_BE_NR - 1; } bfqq->entity.new_weight = bfq_ioprio_to_weight(bfqq->new_ioprio); -- 2.31.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2021-08-06 11:19 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-06 11:18 [PATCH v3 0/4] IO priority fixes and improvements Damien Le Moal 2021-08-06 11:18 ` [f2fs-dev] " Damien Le Moal 2021-08-06 11:18 ` Damien Le Moal [this message] 2021-08-06 11:18 ` [f2fs-dev] [PATCH v3 1/4] block: bfq: fix bfq_set_next_ioprio_data() Damien Le Moal 2021-08-06 11:18 ` [PATCH v3 2/4] block: fix ioprio interface Damien Le Moal 2021-08-06 11:18 ` [f2fs-dev] " Damien Le Moal 2021-08-07 16:18 ` Jens Axboe 2021-08-07 16:18 ` [f2fs-dev] " Jens Axboe 2021-08-08 6:29 ` Damien Le Moal 2021-08-08 6:29 ` [f2fs-dev] " Damien Le Moal via Linux-f2fs-devel 2021-08-06 11:18 ` [PATCH v3 3/4] block: rename IOPRIO_BE_NR Damien Le Moal 2021-08-06 11:18 ` [f2fs-dev] " Damien Le Moal 2021-08-06 11:38 ` Hannes Reinecke 2021-08-06 11:38 ` [f2fs-dev] " Hannes Reinecke 2021-08-07 16:16 ` Jens Axboe 2021-08-07 16:16 ` [f2fs-dev] " Jens Axboe 2021-08-08 6:29 ` Damien Le Moal 2021-08-08 6:29 ` [f2fs-dev] " Damien Le Moal via Linux-f2fs-devel 2021-08-09 7:45 ` Christoph Hellwig 2021-08-09 7:45 ` [f2fs-dev] " Christoph Hellwig 2021-08-06 11:18 ` [PATCH v3 4/4] block: fix default IO priority handling Damien Le Moal 2021-08-06 11:18 ` [f2fs-dev] " Damien Le Moal 2021-08-07 16:19 ` Jens Axboe 2021-08-07 16:19 ` [f2fs-dev] " Jens Axboe 2021-08-08 6:31 ` Damien Le Moal 2021-08-08 6:31 ` [f2fs-dev] " Damien Le Moal via Linux-f2fs-devel
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210806111857.488705-2-damien.lemoal@wdc.com \ --to=damien.lemoal@wdc.com \ --cc=axboe@kernel.dk \ --cc=jaegeuk@kernel.org \ --cc=linux-block@vger.kernel.org \ --cc=linux-f2fs-devel@lists.sourceforge.net \ --cc=paolo.valente@linaro.org \ --cc=yuchao0@huawei.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.