mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] md: suppress spurious superblock update warning for dm-raid
@ 2026-02-10 12:41 chencheng
  2026-02-10  7:49 ` Paul Menzel
  0 siblings, 1 reply; 2+ messages in thread
From: chencheng @ 2026-02-10 12:41 UTC (permalink / raw)
  To: song, yukuai, linux-raid, linux-kernel; +Cc: chencheng

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

Signed-off-by: chencheng <chencheng@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;
 	}
 
-- 
2.51.0

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

end of thread, other threads:[~2026-02-10  7:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-10 12:41 [PATCH] md: suppress spurious superblock update warning for dm-raid chencheng
2026-02-10  7:49 ` Paul Menzel

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®