From: sashiko-bot@kernel.org
To: "Abd-Alrhman Masalkhi" <abd.masalkhi@gmail.com>
Cc: linux-raid@vger.kernel.org, yukuai@fygo.io
Subject: Re: [PATCH 1/2] md: make mddev lookup and ioctl helpers non-static
Date: Mon, 28 Sep 2026 20:26:43 +0000 [thread overview]
Message-ID: <20260928202643.84D281F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260928201224.3602262-2-abd.masalkhi@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] md: generic update_array_info() and set_disk_faulty() lack subsystem prefix
--
commit 471cd6c3e9c36553c5976e00c65220dac80b2aea
Author: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
md: make mddev lookup and ioctl helpers non-static
This commit exposes several internal md array lookup and ioctl helper functions
by removing their static declarations. This change is intended to allow a new md
misc control device to reuse these helpers without opening the md block device.
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 680b34a63cb3d..b5027d65c6d8d 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
[ ... ]
> @@ -8101,7 +8101,7 @@ static void put_cluster_ops(struct mddev *mddev)
> * Any differences that cannot be handled will cause an error.
> * Normally, only one change can be managed at a time.
> */
> -static int update_array_info(struct mddev *mddev, mdu_array_info_t *info)
> +int update_array_info(struct mddev *mddev, mdu_array_info_t *info)
[Severity: Low]
By removing the static keyword, update_array_info() is now added to the global
kernel namespace. Since this name is quite generic, should it be given an "md_"
prefix to avoid potential symbol collisions with other subsystems?
> {
> int rv = 0;
> int cnt = 0;
[ ... ]
> @@ -8227,7 +8227,7 @@ static int update_array_info(struct mddev *mddev, mdu_array_info_t *info)
> return rv;
> }
>
> -static int set_disk_faulty(struct mddev *mddev, dev_t dev)
> +int set_disk_faulty(struct mddev *mddev, dev_t dev)
[Severity: Low]
Similar to update_array_info(), set_disk_faulty() is now globally visible.
Would it be safer to rename this to md_set_disk_faulty() to prevent namespace
pollution and potential collisions?
> {
> struct md_rdev *rdev;
> int err = 0;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260928201224.3602262-1-abd.masalkhi@gmail.com?part=1
next prev parent reply other threads:[~2026-09-28 20:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 20:12 [PATCH 0/2] md: add a control device for array management Abd-Alrhman Masalkhi
2026-09-28 20:12 ` [PATCH 1/2] md: make mddev lookup and ioctl helpers non-static Abd-Alrhman Masalkhi
2026-09-28 20:26 ` sashiko-bot [this message]
2026-09-28 20:12 ` [PATCH 2/2] md: add a control device for array management Abd-Alrhman Masalkhi
2026-09-28 20:26 ` sashiko-bot
2026-09-29 7:38 ` Abd-Alrhman Masalkhi
2026-09-29 4:49 ` Greg KH
2026-09-29 7:12 ` Abd-Alrhman Masalkhi
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=20260928202643.84D281F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=abd.masalkhi@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=yukuai@fygo.io \
/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