From: Yu Kuai <yukuai1@huaweicloud.com>
To: Glass Su <glass.su@suse.com>, Yu Kuai <yukuai1@huaweicloud.com>
Cc: song@kernel.org, linux-raid@vger.kernel.org,
linux-kernel@vger.kernel.org, yi.zhang@huawei.com,
yangerkun@huawei.com, "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH md-6.15 2/7] md: only include md-cluster.h if necessary
Date: Tue, 18 Feb 2025 10:40:55 +0800 [thread overview]
Message-ID: <c8cd970f-8b2a-bb7c-b0ad-4e11fd6bae9d@huaweicloud.com> (raw)
In-Reply-To: <E136E905-430C-40B4-B69A-7FC9B8CF3C47@suse.com>
Hi,
在 2025/02/17 18:20, Glass Su 写道:
>
>
>> On Feb 15, 2025, at 17:22, Yu Kuai <yukuai1@huaweicloud.com> wrote:
>>
>> From: Yu Kuai <yukuai3@huawei.com>
>>
>> md-cluster is only supportted by raid1 and raid10, there is no need to
>> include md-cluster.h for other personalities.
>>
>> Also move APIs that is only used in md-cluster.c from md.h to
>> md-cluster.h.
>>
>> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
>
> Reviewed-by: Su Yue <glass.su@suse.com>
Thanks for the review! Any ideas for the remaining patches?
Kuai
>> ---
>> drivers/md/md-bitmap.c | 2 ++
>> drivers/md/md-cluster.h | 7 +++++++
>> drivers/md/md.h | 7 -------
>> drivers/md/raid1.c | 1 +
>> drivers/md/raid10.c | 1 +
>> 5 files changed, 11 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
>> index 23c09d22fcdb..71aa7dc80e26 100644
>> --- a/drivers/md/md-bitmap.c
>> +++ b/drivers/md/md-bitmap.c
>> @@ -29,8 +29,10 @@
>> #include <linux/buffer_head.h>
>> #include <linux/seq_file.h>
>> #include <trace/events/block.h>
>> +
>> #include "md.h"
>> #include "md-bitmap.h"
>> +#include "md-cluster.h"
>>
>> #define BITMAP_MAJOR_LO 3
>> /* version 4 insists the bitmap is in little-endian order
>> diff --git a/drivers/md/md-cluster.h b/drivers/md/md-cluster.h
>> index 470bf18ffde5..6c7aad00f5da 100644
>> --- a/drivers/md/md-cluster.h
>> +++ b/drivers/md/md-cluster.h
>> @@ -35,4 +35,11 @@ struct md_cluster_operations {
>> void (*update_size)(struct mddev *mddev, sector_t old_dev_sectors);
>> };
>>
>> +extern int register_md_cluster_operations(const struct md_cluster_operations *ops,
>> + struct module *module);
>> +extern int unregister_md_cluster_operations(void);
>> +extern int md_setup_cluster(struct mddev *mddev, int nodes);
>> +extern void md_cluster_stop(struct mddev *mddev);
>> +extern void md_reload_sb(struct mddev *mddev, int raid_disk);
>> +
>> #endif /* _MD_CLUSTER_H */
>> diff --git a/drivers/md/md.h b/drivers/md/md.h
>> index def808064ad8..c9bc70e6d5b4 100644
>> --- a/drivers/md/md.h
>> +++ b/drivers/md/md.h
>> @@ -19,7 +19,6 @@
>> #include <linux/wait.h>
>> #include <linux/workqueue.h>
>> #include <trace/events/block.h>
>> -#include "md-cluster.h"
>>
>> #define MaxSector (~(sector_t)0)
>>
>> @@ -845,11 +844,6 @@ static inline void safe_put_page(struct page *p)
>>
>> extern int register_md_personality(struct md_personality *p);
>> extern int unregister_md_personality(struct md_personality *p);
>> -extern int register_md_cluster_operations(const struct md_cluster_operations *ops,
>> - struct module *module);
>> -extern int unregister_md_cluster_operations(void);
>> -extern int md_setup_cluster(struct mddev *mddev, int nodes);
>> -extern void md_cluster_stop(struct mddev *mddev);
>> extern struct md_thread *md_register_thread(
>> void (*run)(struct md_thread *thread),
>> struct mddev *mddev,
>> @@ -906,7 +900,6 @@ extern void md_idle_sync_thread(struct mddev *mddev);
>> extern void md_frozen_sync_thread(struct mddev *mddev);
>> extern void md_unfrozen_sync_thread(struct mddev *mddev);
>>
>> -extern void md_reload_sb(struct mddev *mddev, int raid_disk);
>> extern void md_update_sb(struct mddev *mddev, int force);
>> extern void mddev_create_serial_pool(struct mddev *mddev, struct md_rdev *rdev);
>> extern void mddev_destroy_serial_pool(struct mddev *mddev,
>> diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
>> index 9d57a88dbd26..e55db07e43d4 100644
>> --- a/drivers/md/raid1.c
>> +++ b/drivers/md/raid1.c
>> @@ -36,6 +36,7 @@
>> #include "md.h"
>> #include "raid1.h"
>> #include "md-bitmap.h"
>> +#include "md-cluster.h"
>>
>> #define UNSUPPORTED_MDDEV_FLAGS \
>> ((1L << MD_HAS_JOURNAL) | \
>> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
>> index efe93b979167..3df39b2399b2 100644
>> --- a/drivers/md/raid10.c
>> +++ b/drivers/md/raid10.c
>> @@ -24,6 +24,7 @@
>> #include "raid10.h"
>> #include "raid0.h"
>> #include "md-bitmap.h"
>> +#include "md-cluster.h"
>>
>> /*
>> * RAID10 provides a combination of RAID0 and RAID1 functionality.
>> --
>> 2.39.2
>>
>>
>
> .
>
next prev parent reply other threads:[~2025-02-18 2:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-15 9:22 [PATCH 0/7 md-6.15] md: introduce md_submodle_head Yu Kuai
2025-02-15 9:22 ` [PATCH md-6.15 1/7] md: merge common code into find_pers() Yu Kuai
2025-02-17 10:16 ` Glass Su
2025-02-15 9:22 ` [PATCH md-6.15 2/7] md: only include md-cluster.h if necessary Yu Kuai
2025-02-17 10:20 ` Glass Su
2025-02-18 2:40 ` Yu Kuai [this message]
2025-02-18 3:40 ` Su Yue
2025-02-15 9:22 ` [PATCH md-6.15 3/7] md: introduce struct md_submodule_head and APIs Yu Kuai
2025-02-15 9:22 ` [PATCH md-6.15 4/7] md: switch personalities to use md_submodule_head Yu Kuai
2025-02-15 9:22 ` [PATCH md-6.15 5/7] md/md-cluster: cleanup md_cluster_ops reference Yu Kuai
2025-02-17 10:28 ` Glass Su
2025-02-15 9:22 ` [PATCH md-6.15 6/7] md: don't export md_cluster_ops Yu Kuai
2025-02-18 3:36 ` Su Yue
2025-02-15 9:22 ` [PATCH md-6.15 7/7] md: switch md-cluster to use md_submodle_head Yu Kuai
2025-02-18 3:37 ` Su Yue
2025-03-05 1:34 ` [PATCH 0/7 md-6.15] md: introduce md_submodle_head Yu Kuai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c8cd970f-8b2a-bb7c-b0ad-4e11fd6bae9d@huaweicloud.com \
--to=yukuai1@huaweicloud.com \
--cc=glass.su@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=song@kernel.org \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai3@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®