From patchwork Thu Jun 9 01:22:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 9166101 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B334460467 for ; Thu, 9 Jun 2016 01:22:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A22C720855 for ; Thu, 9 Jun 2016 01:22:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92BB126B4A; Thu, 9 Jun 2016 01:22:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FA8B20855 for ; Thu, 9 Jun 2016 01:22:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161097AbcFIBWa (ORCPT ); Wed, 8 Jun 2016 21:22:30 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:33930 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932336AbcFIBW3 (ORCPT ); Wed, 8 Jun 2016 21:22:29 -0400 Received: by mail-pf0-f179.google.com with SMTP id 62so7859784pfd.1 for ; Wed, 08 Jun 2016 18:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=6CLnxCL12uFvxdygrURKMZcc1aUTapyBCR6Z1SklaYg=; b=Zwqtu98KIlrqQTEU7sFpKi0DJsHluPdYRy+qSlsSB4v+oWlSU705NU1Eu+rWYhJTTl 6Yuel6mZUeYwv3SHE/iBc0SjFbwVw7ijtaShpWw+9l27YPpWMXTR5tqVwC3EesOUX2ka /LtbCp8F+/T6vuB/4yclBjNlPSZVNzaV7q32VN/kXKXx6ctbM3GaWEXYhAVoReqxHfY+ gRPlcm837mO+kHBmgqWu+mOgkK+neRlrhTucFwjIBUJvDiTVL2f2iC0YKQfhWDI4BF5J L1+nhjmcWP7Nd9s0iuye/vKzIXu955lQa2DtylN8Boy+sozVwAW3BBFlqF0vbIISLrsg 5vMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6CLnxCL12uFvxdygrURKMZcc1aUTapyBCR6Z1SklaYg=; b=TmIhv14LOJ1/3WX4229qPaboaVWR65XfWx4snedLKDX6Oh6kxYM3b+8UHU0vTsgAj9 MAQRg80BuXO3fDqaaG4gp31ylmvzBUX0ZqgvLgj3tJwbS3R1JqMupGlfXlRR8S9uJwhQ s8XGvGIFFyRzQ/HmWw/6HyirvOpGhYeITuYFTNad7bjwIQIbOFhQB8jIv1IOtGcehx1l Og33QPBdCfTdt/niOqMMSpYV5zP0o6XKRobSzjuQbX9odsb0EIFZUXWSAR0Mlaehe11q rGrzc/pMdmmTjO+WfGFa+AIk6Viw9vcm3Z9hLYHRRyZhdO+M+psSjlRMHvQu8OtTjqaP FRTA== X-Gm-Message-State: ALyK8tIOq/iPumZblFri1u5C1THtN8bzsO6cg+C2lZ4XfopL+48jOx4G/jwKuRyW7TiYT2j6 X-Received: by 10.98.42.206 with SMTP id q197mr1594585pfq.108.1465435348877; Wed, 08 Jun 2016 18:22:28 -0700 (PDT) Received: from vader.thefacebook.com ([2620:10d:c090:180::1:e659]) by smtp.gmail.com with ESMTPSA id r64sm5154524pfi.54.2016.06.08.18.22.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jun 2016 18:22:28 -0700 (PDT) From: Omar Sandoval To: Jens Axboe Cc: linux-block@vger.kernel.org, kernel-team@fb.com Subject: [PATCH] blk-mq: actually hook up defer list when running requests Date: Wed, 8 Jun 2016 18:22:20 -0700 Message-Id: <9680c9b9108376337b3c4ee1f5c282eaac8440fd.1465435173.git.osandov@fb.com> X-Mailer: git-send-email 2.8.3 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Omar Sandoval 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 --- 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);