All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
	linux-scsi@vger.kernel.org, Ming Lei <ming.lei@redhat.com>
Subject: [PATCH V2 01/13] block: declare blkcg_[init|exit]_queue in private header
Date: Sat, 22 Jan 2022 19:10:42 +0800	[thread overview]
Message-ID: <20220122111054.1126146-2-ming.lei@redhat.com> (raw)
In-Reply-To: <20220122111054.1126146-1-ming.lei@redhat.com>

Both two functions are used by block core code only, so move the
declaration into private header of block layer.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 block/blk.h                | 8 ++++++++
 include/linux/blk-cgroup.h | 4 ----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/block/blk.h b/block/blk.h
index 8bd43b3ad33d..7b0f12260ae6 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -406,6 +406,14 @@ extern int blk_iolatency_init(struct request_queue *q);
 static inline int blk_iolatency_init(struct request_queue *q) { return 0; }
 #endif
 
+#ifdef CONFIG_BLK_CGROUP
+int blkcg_init_queue(struct request_queue *q);
+void blkcg_exit_queue(struct request_queue *q);
+#else
+static inline int blkcg_init_queue(struct request_queue *q) { return 0; }
+static inline void blkcg_exit_queue(struct request_queue *q) { }
+#endif
+
 struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp);
 
 #ifdef CONFIG_BLK_DEV_ZONED
diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
index b4de2010fba5..d9dcd18d77f4 100644
--- a/include/linux/blk-cgroup.h
+++ b/include/linux/blk-cgroup.h
@@ -182,8 +182,6 @@ extern bool blkcg_debug_stats;
 
 struct blkcg_gq *blkg_lookup_slowpath(struct blkcg *blkcg,
 				      struct request_queue *q, bool update_hint);
-int blkcg_init_queue(struct request_queue *q);
-void blkcg_exit_queue(struct request_queue *q);
 
 /* Blkio controller policy registration */
 int blkcg_policy_register(struct blkcg_policy *pol);
@@ -637,8 +635,6 @@ static inline void blkcg_schedule_throttle(struct request_queue *q, bool use_mem
 static inline struct blkcg_gq *blkg_lookup(struct blkcg *blkcg, void *key) { return NULL; }
 static inline struct blkcg_gq *blk_queue_root_blkg(struct request_queue *q)
 { return NULL; }
-static inline int blkcg_init_queue(struct request_queue *q) { return 0; }
-static inline void blkcg_exit_queue(struct request_queue *q) { }
 static inline int blkcg_policy_register(struct blkcg_policy *pol) { return 0; }
 static inline void blkcg_policy_unregister(struct blkcg_policy *pol) { }
 static inline int blkcg_activate_policy(struct request_queue *q,
-- 
2.31.1


  reply	other threads:[~2022-01-22 11:11 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-22 11:10 [PATCH V2 00/13] block: don't drain file system I/O on del_gendisk Ming Lei
2022-01-22 11:10 ` Ming Lei [this message]
2022-01-24 12:59   ` [PATCH V2 01/13] block: declare blkcg_[init|exit]_queue in private header Christoph Hellwig
2022-01-22 11:10 ` [PATCH V2 02/13] block: move initialization of q->blkg_list into blkcg_init_queue Ming Lei
2022-01-24 13:00   ` Christoph Hellwig
2022-01-24 18:32   ` Bart Van Assche
2022-01-22 11:10 ` [PATCH V2 03/13] block: move blkcg initialization/destroy into disk allocation/release handler Ming Lei
2022-01-24 13:02   ` Christoph Hellwig
2022-01-22 11:10 ` [PATCH V2 04/13] block/wbt: fix negative inflight counter when remove scsi device Ming Lei
2022-02-17  7:45   ` Christoph Hellwig
2022-02-17 14:53     ` Jens Axboe
2022-01-22 11:10 ` [PATCH V2 05/13] block: only account passthrough IO from userspace Ming Lei
2022-01-24 13:05   ` Christoph Hellwig
2022-01-24 23:09     ` Ming Lei
2022-01-25  6:16       ` Christoph Hellwig
2022-01-25  7:19         ` Christoph Hellwig
2022-01-25  8:35           ` Ming Lei
2022-01-25  9:09           ` Ming Lei
2022-01-26  5:50             ` Christoph Hellwig
2022-01-26  7:21               ` Ming Lei
2022-01-26  8:10                 ` Christoph Hellwig
2022-01-26  8:33                   ` Ming Lei
2022-01-26  8:49                     ` Christoph Hellwig
2022-01-26  9:59                       ` Ming Lei
2022-01-26 16:37                         ` Christoph Hellwig
2022-01-22 11:10 ` [PATCH V2 06/13] block: don't remove hctx debugfs dir from blk_mq_exit_queue Ming Lei
2022-01-24 13:06   ` Christoph Hellwig
2022-01-22 11:10 ` [PATCH V2 07/13] block: move q_usage_counter release into blk_queue_release Ming Lei
2022-01-24 13:09   ` Christoph Hellwig
2022-01-24 19:06   ` Bart Van Assche
2022-01-22 11:10 ` [PATCH V2 08/13] block: export __blk_mq_unfreeze_queue Ming Lei
2022-01-24 13:11   ` Christoph Hellwig
2022-01-22 11:10 ` [PATCH V2 09/13] scsi: force unfreezing queue into atomic mode Ming Lei
2022-01-24 13:15   ` Christoph Hellwig
2022-01-24 23:21     ` Ming Lei
2022-01-25  7:27       ` Christoph Hellwig
2022-01-25  8:54         ` Ming Lei
2022-01-26  8:15           ` Christoph Hellwig
2022-01-22 11:10 ` [PATCH V2 10/13] block: add helper of disk_release_queue for release queue data for disk Ming Lei
2022-01-24 13:16   ` Christoph Hellwig
2022-01-24 23:27     ` Ming Lei
2022-01-25  6:17       ` Christoph Hellwig
2022-01-22 11:10 ` [PATCH V2 11/13] block: move blk_exit_queue into disk_release Ming Lei
2022-01-24 13:22   ` Christoph Hellwig
2022-01-24 23:38     ` Ming Lei
2022-01-22 11:10 ` [PATCH V2 12/13] block: move rq_qos_exit() into disk_release() Ming Lei
2022-01-24 13:28   ` Christoph Hellwig
2022-01-22 11:10 ` [PATCH V2 13/13] block: don't drain file system I/O on del_gendisk Ming Lei
2022-01-24 13:39   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220122111054.1126146-2-ming.lei@redhat.com \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.