[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8aab9d5d-ed45-dc38-085b-e6ed67d0b3c6@huaweicloud.com>
Date: Tue, 8 Oct 2024 14:24:45 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Christoph Hellwig <hch@...radead.org>, Yu Kuai <yukuai1@...weicloud.com>
Cc: Tejun Heo <tj@...nel.org>, axboe@...nel.dk, josef@...icpanda.com,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, yi.zhang@...wei.com, yangerkun@...wei.com,
"yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH v2 1/5] blk-cgroup: add a new helper blkg_print_dev_name()
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
>
> .
>
Powered by blists - more mailing lists