Skip to content

Commit 15fe8a9

Browse files
Ming Leiaxboe
authored andcommitted
blk-mq: remove blk_mq_delay_queue()
No driver uses this interface any more, so remove it. Cc: Stefan Haberland <sth@linux.vnet.ibm.com> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent f82ddf1 commit 15fe8a9

File tree

3 files changed

+2
-31
lines changed

3 files changed

+2
-31
lines changed

block/blk-mq-debugfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ static const char *const hctx_state_name[] = {
235235
HCTX_STATE_NAME(STOPPED),
236236
HCTX_STATE_NAME(TAG_ACTIVE),
237237
HCTX_STATE_NAME(SCHED_RESTART),
238-
HCTX_STATE_NAME(START_ON_RUN),
239238
};
240239
#undef HCTX_STATE_NAME
241240

block/blk-mq.c

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,40 +1562,14 @@ static void blk_mq_run_work_fn(struct work_struct *work)
15621562
hctx = container_of(work, struct blk_mq_hw_ctx, run_work.work);
15631563

15641564
/*
1565-
* If we are stopped, don't run the queue. The exception is if
1566-
* BLK_MQ_S_START_ON_RUN is set. For that case, we auto-clear
1567-
* the STOPPED bit and run it.
1565+
* If we are stopped, don't run the queue.
15681566
*/
1569-
if (test_bit(BLK_MQ_S_STOPPED, &hctx->state)) {
1570-
if (!test_bit(BLK_MQ_S_START_ON_RUN, &hctx->state))
1571-
return;
1572-
1573-
clear_bit(BLK_MQ_S_START_ON_RUN, &hctx->state);
1567+
if (test_bit(BLK_MQ_S_STOPPED, &hctx->state))
15741568
clear_bit(BLK_MQ_S_STOPPED, &hctx->state);
1575-
}
15761569

15771570
__blk_mq_run_hw_queue(hctx);
15781571
}
15791572

1580-
1581-
void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs)
1582-
{
1583-
if (WARN_ON_ONCE(!blk_mq_hw_queue_mapped(hctx)))
1584-
return;
1585-
1586-
/*
1587-
* Stop the hw queue, then modify currently delayed work.
1588-
* This should prevent us from running the queue prematurely.
1589-
* Mark the queue as auto-clearing STOPPED when it runs.
1590-
*/
1591-
blk_mq_stop_hw_queue(hctx);
1592-
set_bit(BLK_MQ_S_START_ON_RUN, &hctx->state);
1593-
kblockd_mod_delayed_work_on(blk_mq_hctx_next_cpu(hctx),
1594-
&hctx->run_work,
1595-
msecs_to_jiffies(msecs));
1596-
}
1597-
EXPORT_SYMBOL(blk_mq_delay_queue);
1598-
15991573
static inline void __blk_mq_insert_req_list(struct blk_mq_hw_ctx *hctx,
16001574
struct request *rq,
16011575
bool at_head)

include/linux/blk-mq.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ enum {
183183
BLK_MQ_S_STOPPED = 0,
184184
BLK_MQ_S_TAG_ACTIVE = 1,
185185
BLK_MQ_S_SCHED_RESTART = 2,
186-
BLK_MQ_S_START_ON_RUN = 3,
187186

188187
BLK_MQ_MAX_DEPTH = 10240,
189188

@@ -270,7 +269,6 @@ void blk_mq_unquiesce_queue(struct request_queue *q);
270269
void blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs);
271270
bool blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async);
272271
void blk_mq_run_hw_queues(struct request_queue *q, bool async);
273-
void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs);
274272
void blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset,
275273
busy_tag_iter_fn *fn, void *priv);
276274
void blk_mq_freeze_queue(struct request_queue *q);

0 commit comments

Comments
 (0)