public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Yu Kuai <yukuai1@huaweicloud.com>
Cc: axboe@kernel.dk, tj@kernel.org, gregkh@linuxfoundation.org,
	bvanassche@acm.org, hch@infradead.org, josef@toxicpanda.com,
	lizefan.x@bytedance.com, hannes@cmpxchg.org,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	cgroups@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com,
	yangerkun@huawei.com
Subject: Re: [PATCH RFC v2 3/7] block: export some API
Date: Tue, 18 Jun 2024 00:14:16 -0700	[thread overview]
Message-ID: <ZnEzyJW9WAX0Rjsx@infradead.org> (raw)
In-Reply-To: <20240618031751.3470464-4-yukuai1@huaweicloud.com>

On Tue, Jun 18, 2024 at 11:17:47AM +0800, Yu Kuai wrote:
>  bool blkcg_debug_stats = false;
> +EXPORT_SYMBOL_GPL(blkcg_debug_stats);

exporting variables is lways a bad idea.a

>  
>  static DEFINE_RAW_SPINLOCK(blkg_stat_lock);
>  
> @@ -688,6 +689,7 @@ const char *blkg_dev_name(struct blkcg_gq *blkg)
>  		return NULL;
>  	return bdi_dev_name(blkg->q->disk->bdi);
>  }
> +EXPORT_SYMBOL_GPL(blkg_dev_name);

And this helper is just horribly to be honest.  The bdi_dev_name
should not be used anywhere in block code, and something like this
certainly should not be exported even if we have to keep it for
legacy reasons.

>  /**
>   * blkcg_print_blkgs - helper for printing per-blkg data
> @@ -815,6 +817,7 @@ int blkg_conf_open_bdev(struct blkg_conf_ctx *ctx)
>  	ctx->bdev = bdev;
>  	return 0;
>  }
> +EXPORT_SYMBOL_GPL(blkg_conf_open_bdev);

This again is a horrible function papeing over blk-cgroup design
mistakes.  I absolutely should not be exported.


  reply	other threads:[~2024-06-18  7:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18  3:17 [PATCH RFC v2 0/7] blk-iocost: support to build iocost as kernel module Yu Kuai
2024-06-18  3:17 ` [PATCH RFC v2 1/7] blk-cgroup: add a new helper pr_cont_blkg_path() Yu Kuai
2024-06-18  3:17 ` [PATCH RFC v2 2/7] cgroup: export cgroup_parse_float Yu Kuai
2024-06-18  3:17 ` [PATCH RFC v2 3/7] block: export some API Yu Kuai
2024-06-18  7:14   ` Christoph Hellwig [this message]
2024-06-18  7:58     ` Yu Kuai
2024-06-20  6:48       ` Christoph Hellwig
2024-06-18  3:17 ` [PATCH RFC v2 4/7] blk-iocost: factor out helpers to handle params from ioc_qos_write() Yu Kuai
2024-06-18  3:17 ` [PATCH RFC v2 5/7] blk-iocost: parse params before initializing iocost Yu Kuai
2024-06-18  3:17 ` [PATCH RFC v2 6/7] blk-iocost: support to free iocost Yu Kuai
2024-06-18  3:17 ` [PATCH RFC v2 7/7] blk-iocost: support to build iocost as kernel module Yu Kuai
2024-06-18  7:12 ` [PATCH RFC v2 0/7] " Christoph Hellwig
2024-06-18  8:03   ` Yu Kuai

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=ZnEzyJW9WAX0Rjsx@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=cgroups@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=tj@kernel.org \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai1@huaweicloud.com \
    --cc=yukuai3@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox