From patchwork Fri Sep 1 11:36:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 9933953 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 8E2B460350 for ; Fri, 1 Sep 2017 11:38:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77D19285CC for ; Fri, 1 Sep 2017 11:38:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B40C2862D; Fri, 1 Sep 2017 11:38:02 +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,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 DEC03285CC for ; Fri, 1 Sep 2017 11:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751827AbdIALiB (ORCPT ); Fri, 1 Sep 2017 07:38:01 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:23872 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751746AbdIALiA (ORCPT ); Fri, 1 Sep 2017 07:38:00 -0400 X-IronPort-AV: E=Sophos;i="5.41,457,1498492800"; d="scan'208";a="47890907" Received: from sjappemgw12.hgst.com (HELO sjappemgw11.hgst.com) ([199.255.44.66]) by ob1.hgst.iphmx.com with ESMTP; 01 Sep 2017 19:36:35 +0800 Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by sjappemgw11.hgst.com with ESMTP; 01 Sep 2017 04:36:34 -0700 From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" , linux-block@vger.kernel.org, Jens Axboe Cc: Christoph Hellwig , Bart Van Assche Subject: [PATCH 2/8] block: Fix declaration of blk-mq scheduler functions Date: Fri, 1 Sep 2017 20:36:25 +0900 Message-Id: <20170901113631.12323-3-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170901113631.12323-1-damien.lemoal@wdc.com> References: <20170901113631.12323-1-damien.lemoal@wdc.com> 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 The functions blk_mq_sched_free_hctx_data(), blk_mq_sched_try_merge(), blk_mq_sched_try_insert_merge() and blk_mq_sched_request_inserted() are all exported symbols but declared only internally in block/blk-mq-sched.h. Move their declaration to include/linux/blk-mq.h to make them available to block external scheduler modules. Signed-off-by: Damien Le Moal --- block/blk-mq-sched.h | 7 ------- include/linux/blk-mq.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/block/blk-mq-sched.h b/block/blk-mq-sched.h index 9267d0b7c197..3b725f8fbebe 100644 --- a/block/blk-mq-sched.h +++ b/block/blk-mq-sched.h @@ -4,16 +4,9 @@ #include "blk-mq.h" #include "blk-mq-tag.h" -void blk_mq_sched_free_hctx_data(struct request_queue *q, - void (*exit)(struct blk_mq_hw_ctx *)); - void blk_mq_sched_assign_ioc(struct request *rq, struct bio *bio); -void blk_mq_sched_request_inserted(struct request *rq); -bool blk_mq_sched_try_merge(struct request_queue *q, struct bio *bio, - struct request **merged_request); bool __blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio); -bool blk_mq_sched_try_insert_merge(struct request_queue *q, struct request *rq); void blk_mq_sched_restart(struct blk_mq_hw_ctx *hctx); void blk_mq_sched_insert_request(struct request *rq, bool at_head, diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index a369174a9679..128742552549 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -284,6 +284,16 @@ void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues); void blk_mq_quiesce_queue_nowait(struct request_queue *q); /* + * Scheduler helper functions. + */ +void blk_mq_sched_free_hctx_data(struct request_queue *q, + void (*exit)(struct blk_mq_hw_ctx *)); +bool blk_mq_sched_try_merge(struct request_queue *q, struct bio *bio, + struct request **merged_request); +bool blk_mq_sched_try_insert_merge(struct request_queue *q, struct request *rq); +void blk_mq_sched_request_inserted(struct request *rq); + +/* * Driver command data is immediately after the request. So subtract request * size to get back to the original request, add request size to get the PDU. */