From: Li Nan <linan666@huaweicloud.com>
To: Yu Kuai <yukuai@fnnas.com>, song@kernel.org, linux-raid@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, filippo@debian.org, colyli@fnnas.com
Subject: Re: [PATCH v2 01/11] md: merge mddev has_superblock into mddev_flags
Date: Fri, 26 Dec 2025 11:04:32 +0800 [thread overview]
Message-ID: <223a9fac-243d-9ba5-e7da-03999f0a1c75@huaweicloud.com> (raw)
In-Reply-To: <20251124063203.1692144-2-yukuai@fnnas.com>
在 2025/11/24 14:31, Yu Kuai 写道:
> There is not need to use a separate field in struct mddev, there are no
> functional changes.
>
> Signed-off-by: Yu Kuai <yukuai@fnnas.com>
> ---
> drivers/md/md.c | 6 +++---
> drivers/md/md.h | 3 ++-
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 7b5c5967568f..b49fdee11a03 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -6462,7 +6462,7 @@ int md_run(struct mddev *mddev)
> * the only valid external interface is through the md
> * device.
> */
> - mddev->has_superblocks = false;
> + clear_bit(MD_HAS_SUPERBLOCK, &mddev->flags);
> rdev_for_each(rdev, mddev) {
> if (test_bit(Faulty, &rdev->flags))
> continue;
> @@ -6475,7 +6475,7 @@ int md_run(struct mddev *mddev)
> }
>
> if (rdev->sb_page)
> - mddev->has_superblocks = true;
> + set_bit(MD_HAS_SUPERBLOCK, &mddev->flags);
>
> /* perform some consistency tests on the device.
> * We don't want the data to overlap the metadata,
> @@ -9085,7 +9085,7 @@ void md_write_start(struct mddev *mddev, struct bio *bi)
> rcu_read_unlock();
> if (did_change)
> sysfs_notify_dirent_safe(mddev->sysfs_state);
> - if (!mddev->has_superblocks)
> + if (!test_bit(MD_HAS_SUPERBLOCK, &mddev->flags))
> return;
> wait_event(mddev->sb_wait,
> !test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags));
> diff --git a/drivers/md/md.h b/drivers/md/md.h
> index 6985f2829bbd..b4c9aa600edd 100644
> --- a/drivers/md/md.h
> +++ b/drivers/md/md.h
> @@ -340,6 +340,7 @@ struct md_cluster_operations;
> * array is ready yet.
> * @MD_BROKEN: This is used to stop writes and mark array as failed.
> * @MD_DELETED: This device is being deleted
> + * @MD_HAS_SUPERBLOCK: There is persistence sb in member disks.
> *
> * change UNSUPPORTED_MDDEV_FLAGS for each array type if new flag is added
> */
> @@ -356,6 +357,7 @@ enum mddev_flags {
> MD_BROKEN,
> MD_DO_DELETE,
> MD_DELETED,
> + MD_HAS_SUPERBLOCK,
> };
>
> enum mddev_sb_flags {
> @@ -623,7 +625,6 @@ struct mddev {
> /* The sequence number for sync thread */
> atomic_t sync_seq;
>
> - bool has_superblocks:1;
> bool fail_last_dev:1;
> bool serialize_policy:1;
> };
LGTM
Reviewed-by: Li Nan <linan122@huawei.com>
--
Thanks,
Nan
next prev parent reply other threads:[~2025-12-26 3:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-24 6:31 [PATCH v2 00/11] md: align bio to io_opt and fix abnormal io_opt Yu Kuai
2025-11-24 6:31 ` [PATCH v2 01/11] md: merge mddev has_superblock into mddev_flags Yu Kuai
2025-12-26 3:04 ` Li Nan [this message]
2025-11-24 6:31 ` [PATCH v2 02/11] md: merge mddev faillast_dev " Yu Kuai
2025-12-26 3:46 ` Li Nan
2025-11-24 6:31 ` [PATCH v2 03/11] md: merge mddev serialize_policy " Yu Kuai
2025-12-26 6:33 ` Li Nan
2025-11-24 6:31 ` [PATCH v2 04/11] md/raid5: use mempool to allocate stripe_request_ctx Yu Kuai
2025-12-26 8:33 ` Li Nan
2026-01-03 11:12 ` Yu Kuai
2025-12-30 9:38 ` Li Nan
2026-01-03 11:13 ` Yu Kuai
2025-11-24 6:31 ` [PATCH v2 05/11] md/raid5: make sure max_sectors is not less than io_opt Yu Kuai
2025-11-24 6:31 ` [PATCH v2 06/11] md: support to align bio to limits Yu Kuai
2025-11-27 0:51 ` kernel test robot
2025-11-30 2:38 ` Yu Kuai
2025-11-27 7:05 ` kernel test robot
2025-11-24 6:31 ` [PATCH v2 07/11] md: add a helper md_config_align_limits() Yu Kuai
2025-11-24 6:32 ` [PATCH v2 08/11] md/raid5: align bio to io_opt Yu Kuai
2025-11-24 6:32 ` [PATCH v2 09/11] md/raid10: " Yu Kuai
2025-11-24 6:32 ` [PATCH v2 10/11] md/raid0: " Yu Kuai
2025-11-24 6:32 ` [PATCH v2 11/11] md: fix abnormal io_opt from member disks 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=223a9fac-243d-9ba5-e7da-03999f0a1c75@huaweicloud.com \
--to=linan666@huaweicloud.com \
--cc=colyli@fnnas.com \
--cc=filippo@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=song@kernel.org \
--cc=yukuai@fnnas.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®