All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] blk-mq: actually hook up defer list when running requests
@ 2016-06-09  1:22 Omar Sandoval
  2016-06-09 15:54 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Omar Sandoval @ 2016-06-09  1:22 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, kernel-team

From: Omar Sandoval <osandov@fb.com>

If ->queue_rq() returns BLK_MQ_RQ_QUEUE_OK, we use continue and skip
over the rest of the loop body. However, dptr is assigned later in the
loop body, and the BLK_MQ_RQ_QUEUE_OK case is exactly the case that we'd
want it for.

NVMe isn't actually using BLK_MQ_F_DEFER_ISSUE yet, nor is any other
in-tree driver, but if the code's going to be there, it might as well
work.

Fixes: 74c450521dd8 ("blk-mq: add a 'list' parameter to ->queue_rq()")
Signed-off-by: Omar Sandoval <osandov@fb.com>
---
Let me know if I'm crazy and just misunderstood how this is supposed to
work :) Like I mentioned in the commit description, this doesn't
actually matter since there aren't any drivers using it, but last I saw,
Jens still wanted to get it through eventually
(http://thread.gmane.org/gmane.linux.kernel/1934318).

 block/blk-mq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 29cbc1b5fbdb..6eb9a8068f11 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -784,7 +784,7 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx)
 		switch (ret) {
 		case BLK_MQ_RQ_QUEUE_OK:
 			queued++;
-			continue;
+			break;
 		case BLK_MQ_RQ_QUEUE_BUSY:
 			list_add(&rq->queuelist, &rq_list);
 			__blk_mq_requeue_request(rq);
-- 
2.8.3


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

* Re: [PATCH] blk-mq: actually hook up defer list when running requests
  2016-06-09  1:22 [PATCH] blk-mq: actually hook up defer list when running requests Omar Sandoval
@ 2016-06-09 15:54 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2016-06-09 15:54 UTC (permalink / raw)
  To: Omar Sandoval; +Cc: linux-block, kernel-team

On 06/08/2016 07:22 PM, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
>
> If ->queue_rq() returns BLK_MQ_RQ_QUEUE_OK, we use continue and skip
> over the rest of the loop body. However, dptr is assigned later in the
> loop body, and the BLK_MQ_RQ_QUEUE_OK case is exactly the case that we'd
> want it for.
>
> NVMe isn't actually using BLK_MQ_F_DEFER_ISSUE yet, nor is any other
> in-tree driver, but if the code's going to be there, it might as well
> work.
>
> Fixes: 74c450521dd8 ("blk-mq: add a 'list' parameter to ->queue_rq()")
> Signed-off-by: Omar Sandoval <osandov@fb.com>

Thanks Omar, good catch!

-- 
Jens Axboe


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

end of thread, other threads:[~2016-06-09 15:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-09  1:22 [PATCH] blk-mq: actually hook up defer list when running requests Omar Sandoval
2016-06-09 15:54 ` Jens Axboe

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.