Re: [PATCH 06/23] md/md-bitmap: add a new sysfs api bitmap_type

From: Yu Kuai
Date: Sun May 25 2025 - 21:14:14 EST


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.

And if it really needs this, can this be gotten by superblock?

Theoretically, I can, however, the bitmap superblock is read by
bitmap_ops->create method, and we need to set the bitmap_ops
first. And changing the framwork will be much complex.

Thanks,
Kuai