[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b224a35f-b88b-8bb4-f2b6-e3a2cea15fd3@huaweicloud.com>
Date: Mon, 26 May 2025 16:02:29 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Xiao Ni <xni@...hat.com>, Yu Kuai <yukuai1@...weicloud.com>
Cc: hch@....de, colyli@...nel.org, song@...nel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-raid@...r.kernel.org, yi.zhang@...wei.com, yangerkun@...wei.com,
johnny.chenyi@...wei.com, "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH 06/23] md/md-bitmap: add a new sysfs api bitmap_type
Hi,
在 2025/05/26 13:11, Xiao Ni 写道:
> On Mon, May 26, 2025 at 9:14 AM Yu Kuai <yukuai1@...weicloud.com> wrote:
>>
>> Hi,
>>
>> 在 2025/05/26 0:32, Xiao Ni 写道:
>>>> The api will be used by mdadm to set bitmap_ops while creating new array
>>> Hi Kuai
>>>
>>> Maybe you want to say "set bitmap type" here? And can you explain more
>>> here, why does it need this sys file while creating a new array? The
>>> reason I ask is that it doesn't use a sys file when creating an array
>>> with bitmap.
>>
>> I do mean mddev->bitmap_ops here, this is the same as mddev->pers and
>> the md/level api. The mdadm patch will write the new helper before
>> running array.
>
> + if (s->btype == BitmapLockless &&
> + sysfs_set_str(&info, NULL, "bitmap_type", "llbitmap") < 0)
> + goto abort_locked;
>
> The three lines of code are in the Create function. From an intuitive
> perspective, it's used to set bitmap type to llbitmap rather than
> bitmap ops. And in this patch, it adds the bitmap_type sysfs api to
> set mddev->bitmap_id. After adding some debug logs, I understand you.
> It's better to describe here more. Because the sysfs file api is used
> to set bitmap type. Then it can be used to choose the bitmap ops when
> creating array in md_create_bitmap
>
Yes, sorry about the misleading, we're setting mddev->bitmap_id by
sysfs, and mddev->bitmap_ops by mddev->bitmap_id later in kernel(the
next patch).
Thanks,
Kuai
Powered by blists - more mailing lists