From: Hongfu Li <hongfu.li@linux.dev>
To: 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: [PATCH v2] block/mq-deadline: Drop unused dd parameters
Date: Wed, 12 Aug 2026 12:07:29 +0800 [thread overview]
Message-ID: <20260812040729.27551-1-hongfu.li@linux.dev> (raw)
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);
}
--
2.54.0
reply other threads:[~2026-08-12 4:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260812040729.27551-1-hongfu.li@linux.dev \
--to=hongfu.li@linux.dev \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--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 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.