From: Christoph Hellwig <hch@infradead.org>
To: Yu Kuai <yukuai1@huaweicloud.com>
Cc: Tejun Heo <tj@kernel.org>,
axboe@kernel.dk, josef@toxicpanda.com,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
cgroups@vger.kernel.org, yi.zhang@huawei.com,
yangerkun@huawei.com, "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH v2 1/5] blk-cgroup: add a new helper blkg_print_dev_name()
Date: Mon, 7 Oct 2024 22:01:11 -0700 [thread overview]
Message-ID: <ZwS8lwQ_fN2HY93p@infradead.org> (raw)
In-Reply-To: <ce2b9ed1-cf74-1d50-a72a-23733c0d1db0@huaweicloud.com>
On Tue, Oct 08, 2024 at 09:39:05AM +0800, Yu Kuai wrote:
> Hi,
>
> 在 2024/10/01 1:11, Tejun Heo 写道:
> > Hello,
> >
> > On Mon, Sep 30, 2024 at 04:52:58PM +0800, Yu Kuai wrote:
> > > +static inline bool blkg_print_dev_name(struct seq_file *sf,
> > > + struct blkcg_gq *blkg)
> > > +{
> > > + struct gendisk *disk = blkg->q->disk;
> > > +
> > > + if (!disk)
> > > + return false;
> > > +
> > > + seq_printf(sf, "%u:%u", disk->major, disk->first_minor);
> > > + return true;
> > > +}
> > > +
> >
> > I wonder whether we just should add a name field to disk.
> >
>
> Of course we can, however, I'm not sure if this is better, because
> this field is not used in the fast path.
Struct gendisk does have a (disk_)name field aleady.
next prev parent reply other threads:[~2024-10-08 5:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 8:52 [PATCH v2 0/5] blk-cgroup: don't abuse bdi in blk-cgroup Yu Kuai
2024-09-30 8:52 ` [PATCH v2 1/5] blk-cgroup: add a new helper blkg_print_dev_name() Yu Kuai
2024-09-30 17:11 ` Tejun Heo
2024-10-08 1:39 ` Yu Kuai
2024-10-08 5:01 ` Christoph Hellwig [this message]
2024-10-08 6:24 ` Yu Kuai
2024-10-08 6:29 ` Christoph Hellwig
2024-10-31 8:04 ` Yu Kuai
2024-10-31 16:55 ` Tejun Heo
2024-09-30 8:52 ` [PATCH 2/5] blk-iocost: use " Yu Kuai
2024-09-30 8:53 ` [PATCH 3/5] blk-throttle: " Yu Kuai
2024-09-30 8:53 ` [PATCH 4/5] blk-iolatency: " Yu Kuai
2024-09-30 8:53 ` [PATCH 5/5] blk-cgroup: " 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=ZwS8lwQ_fN2HY93p@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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