[PATCH 38/39] blk-mq: make blk_mq_start_stopped_hw_queues run a queue even if not stopped

From: Christoph Hellwig
Date: Mon Mar 17 2014 - 09:34:20 EST


We need this as a workaround for the scsi midlayer, should be fixed in
a nicer way eventually.
---
block/blk-mq.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 4408c70..4950f8e 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -677,10 +677,8 @@ void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async)
int i;

queue_for_each_hw_ctx(q, hctx, i) {
- if (!test_bit(BLK_MQ_S_STOPPED, &hctx->state))
- continue;
-
- clear_bit(BLK_MQ_S_STOPPED, &hctx->state);
+ if (test_bit(BLK_MQ_S_STOPPED, &hctx->state))
+ clear_bit(BLK_MQ_S_STOPPED, &hctx->state);
blk_mq_run_hw_queue(hctx, async);
}
}
--
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/