From patchwork Fri Apr 14 08:00:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 9680753 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 C860860386 for ; Fri, 14 Apr 2017 08:01:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAB162835B for ; Fri, 14 Apr 2017 08:01:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF9A6285B6; Fri, 14 Apr 2017 08:01:16 +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 481842835B for ; Fri, 14 Apr 2017 08:01:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752265AbdDNIBO (ORCPT ); Fri, 14 Apr 2017 04:01:14 -0400 Received: from mail-pg0-f42.google.com ([74.125.83.42]:33532 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752046AbdDNIBI (ORCPT ); Fri, 14 Apr 2017 04:01:08 -0400 Received: by mail-pg0-f42.google.com with SMTP id x125so41109445pgb.0 for ; Fri, 14 Apr 2017 01:01:08 -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=RdLy6+9FCiXvPGZgbqQFSTiIEh3CfBYlGVoOpqDZqHSRtEw0nzTY8GYJ7fJQZFq8FH 6vXGu96wTy+jUaqhgy6AWdPDlZQmFLJyBSyErHGdWdKFPHKg6NyMy6sKb3ymK/TN/Wmr m1JQo3WVOqmFAVSZcA9S5i7bKYT79BgauWWJkRoTzvFxEcme42JEy1YIp3jMx5HWfx5p /q6XEyRykp45XSJhk7rKpe5Q1rRrI1YUH3IDFPul1LoC+Kpa2lZyME7YH+YbYvR0Y/xE oZS2Sk1WwaBPocuRPLsiwFR00kP/GhakdrODY4svyjN7ip4AZsDaCcOTk5w627zfmGEm 8PTQ== 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=A3KizSTvymvpJ86PPAQSEzy/7OwWPKfv4cQQT7vLtwF+5uCh7Rtdbzrn55gLANrkOx vmX8yR3jbmY3onEU3k/rD6bJtrhXdn8+bFko8sZ75BwImoXbScmYPXxiUW/WFzD6IyoL BVvZ+KXvirFJfZ42O4BwISl603YRSFRLs+9xLui2BFDD12pOwmHPY5Sz8dlaMPAAVYt3 rX8umGxHpW3lQhgegQaK71JqdjIU+K0W/kszvFOqwJK4CHgcg5kRr1PmwFqrOpl0L3J/ V9AEXZzA7/M9TGp39IKUqd0Y5Fax10SmtObKkP6fJ2Rq/QxaBVdJRKI3VDcvHKpv7BzL bpCQ== X-Gm-Message-State: AN3rC/4SCI6Sy8j6zF9wpdwJWeRvG0hNZ8GEVNVn9d3VkyqfTuEp3ods 3gog3S1eFq5uAfuR X-Received: by 10.84.218.203 with SMTP id g11mr7062583plm.6.1492156868186; Fri, 14 Apr 2017 01:01:08 -0700 (PDT) Received: from vader.thefacebook.com ([2620:10d:c090:180::b306]) by smtp.gmail.com with ESMTPSA id s21sm1913250pgg.65.2017.04.14.01.01.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 01:01:07 -0700 (PDT) From: Omar Sandoval To: Jens Axboe , linux-block@vger.kernel.org Cc: kernel-team@fb.com Subject: [PATCH v4 3/5] blk-mq: export helpers Date: Fri, 14 Apr 2017 01:00:00 -0700 Message-Id: <45c2de5dc43bfefddbefaab32f203bf6795ffe9d.1492156558.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,