mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
block/mq-deadline: Drop unused dd parameters
Commitc807ab520f("block/mq-deadline: Add I/O priority support") left the dd parameter unused in deadline_move_request(). Commitfde02699c2("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> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Tao Cui <cuitao@kylinos.cn> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260812040729.27551-1-hongfu.li@linux.dev Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user