From: Tao Cui <cui.tao@linux.dev>
To: Hongfu Li <hongfu.li@linux.dev>, axboe@kernel.dk, bvanassche@acm.org
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
hongfu.li@linux.dev, Hongfu Li <lihongfu@kylinos.cn>
Subject: Re: [PATCH v2] block/mq-deadline: Drop unused dd parameters
Date: Sat, 15 Aug 2026 01:21:56 +0800 [thread overview]
Message-ID: <0D9DBF17-41D9-40D8-A6A5-1921C1F84BEA@linux.dev> (raw)
In-Reply-To: <20260812040729.27551-1-hongfu.li@linux.dev>
于 2026年8月12日 GMT+08:00 12:07:29,Hongfu Li <hongfu.li@linux.dev> 写道:
>From: Hongfu Li <lihongfu@kylinos.cn>
>
>Commit c807ab520fc3 ("block/mq-deadline: Add I/O priority support")
>left the dd parameter unused in deadline_move_request().
>
>Commit fde02699c242 ("block: mq-deadline: Remove support for zone
>write locking") left dd unused in deadline_fifo_request() and
>deadline_next_request().
>
>Remove these unused function parameters.
>
>Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
>---
>v2:
>- Adjust code formatting.
>- No functional changes.
>---
> block/mq-deadline.c | 25 +++++++++++--------------
> 1 file changed, 11 insertions(+), 14 deletions(-)
>
>diff --git a/block/mq-deadline.c b/block/mq-deadline.c
>index 824bfc17b2c6..5f643c0ce2a8 100644
>--- a/block/mq-deadline.c
>+++ b/block/mq-deadline.c
>@@ -233,9 +233,8 @@ static void dd_merged_requests(struct request_queue *q, struct request *req,
> /*
> * move an entry to dispatch queue
> */
>-static void
>-deadline_move_request(struct deadline_data *dd, struct dd_per_prio *per_prio,
>- struct request *rq)
>+static void deadline_move_request(struct dd_per_prio *per_prio,
>+ struct request *rq)
> {
> /*
> * take it off the sort and fifo list
>@@ -269,9 +268,8 @@ static inline bool deadline_check_fifo(struct dd_per_prio *per_prio,
> * For the specified data direction, return the next request to
> * dispatch using arrival ordered lists.
> */
>-static struct request *
>-deadline_fifo_request(struct deadline_data *dd, struct dd_per_prio *per_prio,
>- enum dd_data_dir data_dir)
>+static struct request *deadline_fifo_request(struct dd_per_prio *per_prio,
>+ enum dd_data_dir data_dir)
> {
> if (list_empty(&per_prio->fifo_list[data_dir]))
> return NULL;
>@@ -283,9 +281,8 @@ deadline_fifo_request(struct deadline_data *dd, struct dd_per_prio *per_prio,
> * For the specified data direction, return the next request to
> * dispatch using sector position sorted lists.
> */
>-static struct request *
>-deadline_next_request(struct deadline_data *dd, struct dd_per_prio *per_prio,
>- enum dd_data_dir data_dir)
>+static struct request *deadline_next_request(struct dd_per_prio *per_prio,
>+ enum dd_data_dir data_dir)
> {
> return deadline_from_pos(per_prio, data_dir,
> per_prio->latest_pos[data_dir]);
>@@ -334,7 +331,7 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd,
> /*
> * batches are currently reads XOR writes
> */
>- rq = deadline_next_request(dd, per_prio, dd->last_dir);
>+ rq = deadline_next_request(per_prio, dd->last_dir);
> if (rq && dd->batching < dd->fifo_batch) {
> /* we have a next request and are still entitled to batch */
> data_dir = rq_data_dir(rq);
>@@ -349,7 +346,7 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd,
> if (!list_empty(&per_prio->fifo_list[DD_READ])) {
> BUG_ON(RB_EMPTY_ROOT(&per_prio->sort_list[DD_READ]));
>
>- if (deadline_fifo_request(dd, per_prio, DD_WRITE) &&
>+ if (deadline_fifo_request(per_prio, DD_WRITE) &&
> (dd->starved++ >= dd->writes_starved))
> goto dispatch_writes;
>
>@@ -379,14 +376,14 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd,
> /*
> * we are not running a batch, find best request for selected data_dir
> */
>- next_rq = deadline_next_request(dd, per_prio, data_dir);
>+ next_rq = deadline_next_request(per_prio, data_dir);
> if (deadline_check_fifo(per_prio, data_dir) || !next_rq) {
> /*
> * A deadline has expired, the last request was in the other
> * direction, or we have run out of higher-sectored requests.
> * Start again from the request with the earliest expiry time.
> */
>- rq = deadline_fifo_request(dd, per_prio, data_dir);
>+ rq = deadline_fifo_request(per_prio, data_dir);
> } else {
> /*
> * The last req was the same dir and we have a next request in
>@@ -409,7 +406,7 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd,
> * rq is the selected appropriate request.
> */
> dd->batching++;
>- deadline_move_request(dd, per_prio, rq);
>+ deadline_move_request(per_prio, rq);
> return dd_start_request(dd, data_dir, rq);
> }
>
Reviewed-by: Tao Cui <cuitao@kylinos.cn>
next prev parent reply other threads:[~2026-08-14 17:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 4:07 Hongfu Li
2026-08-14 6:42 ` Christoph Hellwig
2026-08-14 16:07 ` Bart Van Assche
2026-08-14 17:21 ` Tao Cui [this message]
2026-08-16 0:01 ` Jens Axboe
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=0D9DBF17-41D9-40D8-A6A5-1921C1F84BEA@linux.dev \
--to=cui.tao@linux.dev \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hongfu.li@linux.dev \
--cc=lihongfu@kylinos.cn \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®