mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yu Kuai <yukuai1@huaweicloud.com>
To: Christoph Hellwig <hch@infradead.org>, 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: Tue, 8 Oct 2024 14:24:45 +0800	[thread overview]
Message-ID: <8aab9d5d-ed45-dc38-085b-e6ed67d0b3c6@huaweicloud.com> (raw)
In-Reply-To: <ZwS8lwQ_fN2HY93p@infradead.org>

Hi,

在 2024/10/08 13:01, Christoph Hellwig 写道:
> 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.

Yes, but this name is not major and minor(for example, sda instead of
8:0), Tejun was probably talking about major and minor name field.

Thanks,
Kuai

> 
> .
> 


  reply	other threads:[~2024-10-08  6:24 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
2024-10-08  6:24         ` Yu Kuai [this message]
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=8aab9d5d-ed45-dc38-085b-e6ed67d0b3c6@huaweicloud.com \
    --to=yukuai1@huaweicloud.com \
    --cc=axboe@kernel.dk \
    --cc=cgroups@vger.kernel.org \
    --cc=hch@infradead.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=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

all inboxes | Powered by JetHome®