From patchwork Thu May 4 07:31:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 9710913 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 0AD3560362 for ; Thu, 4 May 2017 07:31:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1A7F28682 for ; Thu, 4 May 2017 07:31:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E68D828685; Thu, 4 May 2017 07:31:52 +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 8309728682 for ; Thu, 4 May 2017 07:31:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752581AbdEDHbv (ORCPT ); Thu, 4 May 2017 03:31:51 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:36046 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752545AbdEDHbv (ORCPT ); Thu, 4 May 2017 03:31:51 -0400 Received: by mail-pf0-f171.google.com with SMTP id q66so3715770pfi.3 for ; Thu, 04 May 2017 00:31:51 -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=e4lB/SSfc3U/9GSjpqLOPwKB/o2TARIpj1CMXofhstY=; b=wIaaJhdLgm4S4pqm5Z8cmd8t+Pb9TiG62deQj0Lku2Sx0bdUTxQdnhg5qq2NAQ0ULA Nq3SI/nXqvpUSIaku6bwHUC481G8Ms1zfKe8lPvrmyq7GEi/Nq6Q/YPyNaTRVsH355tw CPDMWD97SS6EZimkBgvK921N6Fk36elmvtzXVKLTY9faBMxRN2p42U4MaFltGlH/xv7d U1gAlcv6TOwNfz70wzV7FPpMWM5pKrObRFlNmD5IL8WLCwl9b371/lJ2gzMg8OKPosnv TfkpUn+ipNEUW39UUWGs3F4w+UCDJuK8i4FDc0Ppo9qAnoXJyXVUdOMOagoyjflozlpL hI4A== 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=e4lB/SSfc3U/9GSjpqLOPwKB/o2TARIpj1CMXofhstY=; b=ioxYWFZP/B6rKkdB3KXj240h09QXqvTVrhcn0yYdRwUerZXtzZzyBcVTsr1XMq6dVv v4dZhLkN8XhIXDUKdXtQsTdbPQyLrnVfsdEcwPUQvBA/ZxSN6Zr9IGCRkmzBW1qT/bjS Qv6wbkRGUO7qW/eWO+9lktmK0gwhzmbhauDyie/XPIBJNc4CFOFvmrktxBgD/yZs0RNL PWQyvrf7ra3dZPY5mvRPrliOSdFg2m3E0iJoJE+nQ8MFikuwoU/lMZ1XTIBZdzCMAzf9 zoXUbTfGuAy2YIInrS5Le9A+cmpeti7G7jNsKEXtNHjIMK9SFQghZahL9iTkp0YehGrd NRaw== X-Gm-Message-State: AN3rC/7/E6g1m5fm7q3oWvYMiqE1o41gsN7rD4QCzbbhCsCtEldMxMG7 k4m5IQ2MDjgBtJUI X-Received: by 10.98.196.88 with SMTP id y85mr9088700pff.49.1493883110470; Thu, 04 May 2017 00:31:50 -0700 (PDT) Received: from vader.thefacebook.com ([2620:10d:c090:180::1:1d23]) by smtp.gmail.com with ESMTPSA id q6sm2272168pfq.18.2017.05.04.00.31.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 May 2017 00:31:49 -0700 (PDT) From: Omar Sandoval To: Jens Axboe , linux-block@vger.kernel.org Cc: Bart Van Assche , kernel-team@fb.com Subject: [PATCH v2 08/12] blk-mq: move debugfs declarations to a separate header file Date: Thu, 4 May 2017 00:31:30 -0700 Message-Id: <14d98327e1b274f2d39f7988faf1614a9a06716b.1493882751.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 Preparation for adding more declarations. Signed-off-by: Omar Sandoval Reviewed-by: Hannes Reinecke --- block/blk-core.c | 1 + block/blk-mq-debugfs.c | 1 + block/blk-mq-debugfs.h | 29 +++++++++++++++++++++++++++++ block/blk-mq-sysfs.c | 1 + block/blk-mq.h | 28 ---------------------------- block/blk-sysfs.c | 1 + 6 files changed, 33 insertions(+), 28 deletions(-) create mode 100644 block/blk-mq-debugfs.h diff --git a/block/blk-core.c b/block/blk-core.c index 24886b69690f..acdca6536562 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -40,6 +40,7 @@ #include "blk.h" #include "blk-mq.h" +#include "blk-mq-debugfs.h" #include "blk-mq-sched.h" #include "blk-wbt.h" diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c index 347fbb8e059c..1dc1847b5363 100644 --- a/block/blk-mq-debugfs.c +++ b/block/blk-mq-debugfs.c @@ -21,6 +21,7 @@ #include #include "blk.h" #include "blk-mq.h" +#include "blk-mq-debugfs.h" #include "blk-mq-tag.h" struct blk_mq_debugfs_attr { diff --git a/block/blk-mq-debugfs.h b/block/blk-mq-debugfs.h new file mode 100644 index 000000000000..00b0f71d0ae9 --- /dev/null +++ b/block/blk-mq-debugfs.h @@ -0,0 +1,29 @@ +#ifndef INT_BLK_MQ_DEBUGFS_H +#define INT_BLK_MQ_DEBUGFS_H + +#ifdef CONFIG_BLK_DEBUG_FS +int blk_mq_debugfs_register(struct request_queue *q); +void blk_mq_debugfs_unregister(struct request_queue *q); +int blk_mq_debugfs_register_mq(struct request_queue *q); +void blk_mq_debugfs_unregister_mq(struct request_queue *q); +#else +static inline int blk_mq_debugfs_register(struct request_queue *q) +{ + return 0; +} + +static inline void blk_mq_debugfs_unregister(struct request_queue *q) +{ +} + +static inline int blk_mq_debugfs_register_mq(struct request_queue *q) +{ + return 0; +} + +static inline void blk_mq_debugfs_unregister_mq(struct request_queue *q) +{ +} +#endif + +#endif diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c index ec0afdf765e3..71a237a90d43 100644 --- a/block/blk-mq-sysfs.c +++ b/block/blk-mq-sysfs.c @@ -11,6 +11,7 @@ #include #include "blk-mq.h" +#include "blk-mq-debugfs.h" #include "blk-mq-tag.h" static void blk_mq_sysfs_release(struct kobject *kobj) diff --git a/block/blk-mq.h b/block/blk-mq.h index 2814a14e529c..cc67b48e3551 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h @@ -83,34 +83,6 @@ extern int blk_mq_sysfs_register(struct request_queue *q); extern void blk_mq_sysfs_unregister(struct request_queue *q); extern void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx); -/* - * debugfs helpers - */ -#ifdef CONFIG_BLK_DEBUG_FS -int blk_mq_debugfs_register(struct request_queue *q); -void blk_mq_debugfs_unregister(struct request_queue *q); -int blk_mq_debugfs_register_mq(struct request_queue *q); -void blk_mq_debugfs_unregister_mq(struct request_queue *q); -#else -static inline int blk_mq_debugfs_register(struct request_queue *q) -{ - return 0; -} - -static inline void blk_mq_debugfs_unregister(struct request_queue *q) -{ -} - -static inline int blk_mq_debugfs_register_mq(struct request_queue *q) -{ - return 0; -} - -static inline void blk_mq_debugfs_unregister_mq(struct request_queue *q) -{ -} -#endif - extern void blk_mq_rq_timed_out(struct request *req, bool reserved); void blk_mq_release(struct request_queue *q); diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 3f37813ccbaf..9995355121d7 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -13,6 +13,7 @@ #include "blk.h" #include "blk-mq.h" +#include "blk-mq-debugfs.h" #include "blk-wbt.h" struct queue_sysfs_entry {