mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
md: switch personalities to use md_submodule_head
Remove the global list 'pers_list', and switch to use md_submodule_head, which is managed by xarry. Prepare to unify registration and unregistration for all sub modules. Link: https://lore.kernel.org/linux-raid/20250215092225.2427977-5-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai <yukuai3@huawei.com>
This commit is contained in:
@@ -811,9 +811,13 @@ static void raid0_quiesce(struct mddev *mddev, int quiesce)
|
||||
|
||||
static struct md_personality raid0_personality=
|
||||
{
|
||||
.name = "raid0",
|
||||
.level = 0,
|
||||
.owner = THIS_MODULE,
|
||||
.head = {
|
||||
.type = MD_PERSONALITY,
|
||||
.id = ID_RAID0,
|
||||
.name = "raid0",
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
|
||||
.make_request = raid0_make_request,
|
||||
.run = raid0_run,
|
||||
.free = raid0_free,
|
||||
@@ -824,14 +828,14 @@ static struct md_personality raid0_personality=
|
||||
.error_handler = raid0_error,
|
||||
};
|
||||
|
||||
static int __init raid0_init (void)
|
||||
static int __init raid0_init(void)
|
||||
{
|
||||
return register_md_personality (&raid0_personality);
|
||||
return register_md_submodule(&raid0_personality.head);
|
||||
}
|
||||
|
||||
static void raid0_exit (void)
|
||||
static void __exit raid0_exit(void)
|
||||
{
|
||||
unregister_md_personality (&raid0_personality);
|
||||
unregister_md_submodule(&raid0_personality.head);
|
||||
}
|
||||
|
||||
module_init(raid0_init);
|
||||
|
||||
Reference in New Issue
Block a user