Re: [PATCH v2 0/5] md: bitmap grow fixes

"Yu Kuai" <[email protected]>
Newsgroups gmane.linux.raid
Message-ID <[email protected]>
Hi,

在 2026/4/7 18:26, Su Yue 写道:
> Hi, This v2 series is to fixes bugs exposed by mdadm/clustermd-autotest.
> The bugs are not cluster md only but also bitmap related.
>
> The series based on v7.0-rc7 passes tests with mdadm v4.6 without regression.
>
> v2:
>      Add a dummy bitmap operations per Kuai's suggestion.
>
> To Yu Kuai:
> A NULL group can't used for internal_bitmap_group since
> the entries from internal_bitmap_attrs should be under bitmap.
> So instead of sysfs_create_groups(), sysfs_create_group() and sysfs_merge_group()
> are still needed /sigh.

Thanks for the set and sorry for the delay.

TBO, this set is still a bit complex than expected. It's true sysfs_create_groups()
can't be used for the groups with same name. However, there is still another api
sysfs_update_groups() that can be used in this case.

I just finish a local version and confirm following 3 commits should be enough:

1) factor out bitmap sysfs creation from mddev_set_bitmap_ops(), and create sysfs entries
after bitmap is created.
2) split bitmap/location out as the common bitmap groups, and convert bitmap filed groups
to struct attribute_group **groups;
3) add a separate bitmap_ops for none bitmap, location_store() can be similar to
patch 3 in your set, just create/remove additional internal_bitmap_group.

> Su Yue (5):
>    md/md-bitmap: call md_bitmap_create,destroy in location_store
>    md/md-bitmap: add an extra sysfs argument to md_bitmap_create and
>      destroy
>    md/md-bitmap: add dummy bitmap ops for none to fix wrong bitmap offset
>    md: skip ID_BITMAP_NONE when show available bitmap types
>    md/md-bitmap: remove member group from bitmap_operations
>
>   drivers/md/md-bitmap.c   | 121 ++++++++++++++++++++++++++++++++++++---
>   drivers/md/md-bitmap.h   |   3 +-
>   drivers/md/md-llbitmap.c |  13 ++++-
>   drivers/md/md.c          |  55 +++++++++---------
>   drivers/md/md.h          |   2 +
>   5 files changed, 155 insertions(+), 39 deletions(-)
>
-- 
Thansk,
Kuai
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.