From patchwork Thu Sep 7 16:16:30 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: 9942503 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 086A86038C for ; Thu, 7 Sep 2017 16:17:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D56512868D for ; Thu, 7 Sep 2017 16:17:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9614286F2; Thu, 7 Sep 2017 16:17:48 +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 92CF52868D for ; Thu, 7 Sep 2017 16:17:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932097AbdIGQRr (ORCPT ); Thu, 7 Sep 2017 12:17:47 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:20811 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932095AbdIGQRq (ORCPT ); Thu, 7 Sep 2017 12:17:46 -0400 X-IronPort-AV: E=Sophos;i="5.42,359,1500912000"; d="scan'208";a="145339980" Received: from sjappemgw12.hgst.com (HELO sjappemgw11.hgst.com) ([199.255.44.66]) by ob1.hgst.iphmx.com with ESMTP; 08 Sep 2017 00:21:41 +0800 Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by sjappemgw11.hgst.com with ESMTP; 07 Sep 2017 09:16:43 -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 V2 02/12] block: Fix declaration of blk-mq scheduler functions Date: Fri, 8 Sep 2017 01:16:30 +0900 Message-Id: <20170907161640.30465-3-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170907161640.30465-1-damien.lemoal@wdc.com> References: <20170907161640.30465-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 are declared only internally in block/blk-mq-sched.h. Move these declarations to the new file include/linux/blk-mq-sched.h to make them available to block scheduler modules implemented outside of the block directory. Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn --- block/blk-mq-sched.h | 11 +++-------- include/linux/blk-mq-sched.h | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 include/linux/blk-mq-sched.h diff --git a/block/blk-mq-sched.h b/block/blk-mq-sched.h index 9267d0b7c197..f48f3c8edcb3 100644 --- a/block/blk-mq-sched.h +++ b/block/blk-mq-sched.h @@ -1,19 +1,14 @@ -#ifndef BLK_MQ_SCHED_H -#define BLK_MQ_SCHED_H +#ifndef INT_BLK_MQ_SCHED_H +#define INT_BLK_MQ_SCHED_H #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 *)); +#include 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-sched.h b/include/linux/blk-mq-sched.h new file mode 100644 index 000000000000..8ae1992e02c6 --- /dev/null +++ b/include/linux/blk-mq-sched.h @@ -0,0 +1,14 @@ +#ifndef BLK_MQ_SCHED_H +#define BLK_MQ_SCHED_H + +/* + * Scheduler helper functions. + */ +void blk_mq_sched_free_hctx_data(struct request_queue *q, + void (*exit)(struct blk_mq_hw_ctx *)); +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_try_insert_merge(struct request_queue *q, struct request *rq); + +#endif