From patchwork Mon Apr 10 06:51:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 9672019 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 6B5C460244 for ; Mon, 10 Apr 2017 06:52:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D74726490 for ; Mon, 10 Apr 2017 06:52:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 525BC26E3A; Mon, 10 Apr 2017 06:52:22 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI 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 08F8726490 for ; Mon, 10 Apr 2017 06:52:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751588AbdDJGwV (ORCPT ); Mon, 10 Apr 2017 02:52:21 -0400 Received: from mail-pg0-f45.google.com ([74.125.83.45]:33945 "EHLO mail-pg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751864AbdDJGwU (ORCPT ); Mon, 10 Apr 2017 02:52:20 -0400 Received: by mail-pg0-f45.google.com with SMTP id 21so101101359pgg.1 for ; Sun, 09 Apr 2017 23:52:20 -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:in-reply-to:references :in-reply-to:references; bh=KLsq/qS8tU2ind8n7vbKSWmGRKoxyVPgz7G4ZGYwQpQ=; b=o30MVEsVsXW8dCHFiNXmuXIfBfQ/ELGikKXLPQnvrnoDcd2MW3iobIjD3vuNOuCMvd IkJkQCAoptHCmSiuJz7FOFA19FOGrPAyfSaG0CiNmZ3P6iBjWH6+rZ+EWDV0Qa3ABMQb BsU5BfMJtZzEFnHUSJg77WpcfcYsE6VNKtZnDKYX5A9t3p4gj4mi6TzANlTxekpnRvmR gSlYTFP4wU28Soo3EkkY2pcJBCixG2zZjb7oDclfOxu1qqAxYfzEXl8ChyMh9n09ZGkF lGomLFS/jC2FYYPMcTVm1azxVc23jFgAhlMgmSv3+LtFYsC8Du3wOFuRuHHEDe3iqlnz 7Xng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=KLsq/qS8tU2ind8n7vbKSWmGRKoxyVPgz7G4ZGYwQpQ=; b=Bw930k7G5trodyGWdAm9rbgZlIeT7OSAxfaYzuIiHU0eXpcDH60TamwJvnGOpPcOam Op4oQmeTM9VCDyFOwdv7sQwj2C3gxWFsZXxof8NjfV/7jYK6FsfvQgCG0CvansID939/ OpiYZpNdsfOPUbQ4FUxvKMZns3HOKRZ8FiZLfLk3GjgbuCKFek1ehvC75Up8GIRv44yg 2a0y8eVU2yu9yxdR/4D88m2YkGxXkZE9G8F/Oju4cLABe8j7gRzOR4Y+WdZdxfmOTEbg /jz0E0+LigFKrvXTJizDn1FyZE71sr8u/KxBTryzB/t1uhKpzrQ8QBNzrz7+gREZeWhZ 5H3g== X-Gm-Message-State: AFeK/H2Zowzos0aFOlCVSb+jBPSwHs5fxPSThjhpg5M20LdKOKaJd3XaBCBJq+3ap7OLfjbY X-Received: by 10.99.131.195 with SMTP id h186mr53691394pge.57.1491807140256; Sun, 09 Apr 2017 23:52:20 -0700 (PDT) Received: from vader.thefacebook.com ([2620:10d:c090:180::da80]) by smtp.gmail.com with ESMTPSA id b185sm10679391pfa.61.2017.04.09.23.52.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Apr 2017 23:52:19 -0700 (PDT) From: Omar Sandoval To: Jens Axboe , linux-block@vger.kernel.org Cc: kernel-team@fb.com Subject: [PATCH v3 3/5] blk-mq: export helpers Date: Sun, 9 Apr 2017 23:51:11 -0700 Message-Id: <45c2de5dc43bfefddbefaab32f203bf6795ffe9d.1491806249.git.osandov@fb.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: References: In-Reply-To: References: 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 blk_mq_finish_request() is required for schedulers that define their own put_request(). blk_mq_run_hw_queue() is required for schedulers that hold back requests to be run later. Signed-off-by: Omar Sandoval --- block/blk-mq.c | 2 ++ include/linux/blk-mq.h | 1 + 2 files changed, 3 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index e536dacfae4c..7138cd98146e 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -368,6 +368,7 @@ void blk_mq_finish_request(struct request *rq) { blk_mq_finish_hctx_request(blk_mq_map_queue(rq->q, rq->mq_ctx->cpu), rq); } +EXPORT_SYMBOL_GPL(blk_mq_finish_request); void blk_mq_free_request(struct request *rq) { @@ -1183,6 +1184,7 @@ void blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async) { __blk_mq_delay_run_hw_queue(hctx, async, 0); } +EXPORT_SYMBOL(blk_mq_run_hw_queue); void blk_mq_run_hw_queues(struct request_queue *q, bool async) { diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index b90c3d5766cd..d75de612845d 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -238,6 +238,7 @@ void blk_mq_start_hw_queues(struct request_queue *q); void blk_mq_start_stopped_hw_queue(struct blk_mq_hw_ctx *hctx, bool async); void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async); void blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs); +void blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async); void blk_mq_run_hw_queues(struct request_queue *q, bool async); void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs); void blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset,