From: Coly Li <colyli@suse.de>
To: linux-raid@vger.kernel.org
Cc: Coly Li <colyli@suse.de>, George Gkioulis <ggkioulis@suse.com>,
Jes Sorensen <jsorensen@fb.com>
Subject: [PATCH v2] Monitor: print message before quit for no array to monitor
Date: Thu, 2 Sep 2021 10:36:44 +0800 [thread overview]
Message-ID: <20210902023644.509-1-colyli@suse.de> (raw)
If there is no array device to monitor, Monitor() will stop monitoring
at line 261 from the following code block,
257 if (!new_found) {
258 if (oneshot)
259 break;
260 else if (!anyredundant) {
261 break;
262 }
This change was introduced by commit 007087d0898a ("Monitor: stop
notifing about containers"). Before this commit, Monitor() will continue
and won't quit even there is no array to monitor.
It is fine to quit without any array device to monitor, but users may
wonder whether there is something wrong with mdadm program or their
configuration to make mdadm quit monitoring.
This patch adds a simple error message to indicate Monitor() quits for
array device to monitor, which makes users have hint to understand why
mdadm stops monitoring.
Reported-by: George Gkioulis <ggkioulis@suse.com>
Signed-off-by: Coly Li <colyli@suse.de>
Cc: Jes Sorensen <jsorensen@fb.com>
---
Changelog:
v2: add CC to Jes, and fix typo.
v1: the original version.
Monitor.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/Monitor.c b/Monitor.c
index f541229..5f399c4 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -258,6 +258,7 @@ int Monitor(struct mddev_dev *devlist,
if (oneshot)
break;
else if (!anyredundant) {
+ pr_err("Stop for no array to monitor\n");
break;
}
else {
--
2.31.1
next reply other threads:[~2021-09-02 2:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 2:36 Coly Li [this message]
2021-09-02 7:08 ` [PATCH v2] Monitor: print message before quit for no array to monitor Tkaczyk, Mariusz
2021-09-02 7:26 ` Coly Li
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=20210902023644.509-1-colyli@suse.de \
--to=colyli@suse.de \
--cc=ggkioulis@suse.com \
--cc=jsorensen@fb.com \
--cc=linux-raid@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.