linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block: Use helper function blk_mq_sched_needs_restart()
@ 2020-09-05  9:42 Miaohe Lin
  0 siblings, 0 replies; 2+ messages in thread
From: Miaohe Lin @ 2020-09-05  9:42 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-kernel, linmiaohe

Use helper function blk_mq_sched_needs_restart() to check if hardware queue
needs restart.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 block/blk-mq-sched.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index d2790e5b06d1..dc837fd26e17 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -65,7 +65,7 @@ void blk_mq_sched_assign_ioc(struct request *rq)
  */
 void blk_mq_sched_mark_restart_hctx(struct blk_mq_hw_ctx *hctx)
 {
-	if (test_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state))
+	if (blk_mq_sched_needs_restart(hctx))
 		return;
 
 	set_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state);
@@ -74,7 +74,7 @@ EXPORT_SYMBOL_GPL(blk_mq_sched_mark_restart_hctx);
 
 void blk_mq_sched_restart(struct blk_mq_hw_ctx *hctx)
 {
-	if (!test_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state))
+	if (!blk_mq_sched_needs_restart(hctx))
 		return;
 	clear_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state);
 
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] block: Use helper function blk_mq_sched_needs_restart()
@ 2020-09-24 13:13 linmiaohe
  0 siblings, 0 replies; 2+ messages in thread
From: linmiaohe @ 2020-09-24 13:13 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-kernel

Friendly ping :)
>
> Use helper function blk_mq_sched_needs_restart() to check if hardware queue needs restart.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>  block/blk-mq-sched.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-24 13:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-05  9:42 [PATCH] block: Use helper function blk_mq_sched_needs_restart() Miaohe Lin
2020-09-24 13:13 linmiaohe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).