mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] md: suppress spurious superblock update error message for dm-raid
@ 2026-02-10 13:38 Chen Cheng
  2026-02-26  5:35 ` Yu Kuai
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Cheng @ 2026-02-10 13:38 UTC (permalink / raw)
  To: linux-raid; +Cc: linux-kernel, pmenzel, tj.iam.tj, Chen Cheng

dm-raid has external metadata management (mddev->external = 1) and
no persistent superblock (mddev->persistent = 0). For these arrays,
there's no superblock to update, so the error message is spurious.

The error appears as:
[  123.456789] md_update_sb: can't update sb for read-only array md0

Link: https://lore.kernel.org/all/20260128082430.96788-1-tj.iam.tj@proton.me/
Fixes: 6a5cb53aaa1d ("md: don't ignore read-only array in md_update_sb()")
Signed-off-by: Chen Cheng <chencheng@fnnas.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
 drivers/md/md.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 6d73f6e196a..e30b658641e 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2790,7 +2790,9 @@ void md_update_sb(struct mddev *mddev, int force_change)
 	if (!md_is_rdwr(mddev)) {
 		if (force_change)
 			set_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags);
-		pr_err("%s: can't update sb for read-only array %s\n", __func__, mdname(mddev));
+		if (!mddev_is_dm(mddev))
+			pr_err_ratelimited("%s: can't update sb for read-only array %s\n",
+					   __func__, mdname(mddev));
 		return;
 	}
 
-- 
2.51.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] md: suppress spurious superblock update error message for dm-raid
  2026-02-10 13:38 [PATCH] md: suppress spurious superblock update error message for dm-raid Chen Cheng
@ 2026-02-26  5:35 ` Yu Kuai
  0 siblings, 0 replies; 2+ messages in thread
From: Yu Kuai @ 2026-02-26  5:35 UTC (permalink / raw)
  To: Chen Cheng, linux-raid, yukuai; +Cc: linux-kernel, pmenzel, tj.iam.tj

Hi,

在 2026/2/10 21:38, Chen Cheng 写道:
> dm-raid has external metadata management (mddev->external = 1) and
> no persistent superblock (mddev->persistent = 0). For these arrays,
> there's no superblock to update, so the error message is spurious.
>
> The error appears as:
> [  123.456789] md_update_sb: can't update sb for read-only array md0
>
> Link: https://lore.kernel.org/all/20260128082430.96788-1-tj.iam.tj@proton.me/
> Fixes: 6a5cb53aaa1d ("md: don't ignore read-only array in md_update_sb()")
> Signed-off-by: Chen Cheng <chencheng@fnnas.com>
> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>

The Link and Fixes tag is incorrect, applied with following commit message:

     md: suppress spurious superblock update error message for dm-raid

     dm-raid has external metadata management (mddev->external = 1) and
     no persistent superblock (mddev->persistent = 0). For these arrays,
     there's no superblock to update, so the error message is spurious.

     The error appears as:
     md_update_sb: can't update sb for read-only array md0

     Fixes: 8c9e376b9d1a ("md: warn about updating super block failure")
     Reported-by: Tj <tj.iam.tj@proton.me>
     Closes: https://lore.kernel.org/all/20260128082430.96788-1-tj.iam.tj@proton.me/
     Signed-off-by: Chen Cheng <chencheng@fnnas.com>
     Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
     Link: https://lore.kernel.org/linux-raid/20260210133847.269986-1-chencheng@fnnas.com
     Signed-off-by: Yu Kuai <yukuai@fnnas.com>

> ---
>   drivers/md/md.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 6d73f6e196a..e30b658641e 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -2790,7 +2790,9 @@ void md_update_sb(struct mddev *mddev, int force_change)
>   	if (!md_is_rdwr(mddev)) {
>   		if (force_change)
>   			set_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags);
> -		pr_err("%s: can't update sb for read-only array %s\n", __func__, mdname(mddev));
> +		if (!mddev_is_dm(mddev))
> +			pr_err_ratelimited("%s: can't update sb for read-only array %s\n",
> +					   __func__, mdname(mddev));
>   		return;
>   	}
>   

-- 
Thansk,
Kuai

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-26  5:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-10 13:38 [PATCH] md: suppress spurious superblock update error message for dm-raid Chen Cheng
2026-02-26  5:35 ` Yu Kuai

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®