Monitor: print message before quit for no array to monitor
PATCH v3 1/1 Monitor: print message before quit for no array to monitor
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.
---
Changelog:
v3: modify printed message by suggestion from Mariusz.
v2: add CC to Jes, and fix typo.
v1: the original version.
Monitor.c | 1 + 1 file changed, 1 insertion(+)
Monitor.c +1 -0
@@ -258,6 +258,7 @@ int Monitor(struct mddev_dev *devlist,if (oneshot)break ;else if (!anyredundant) { +pr_err ("No array with redundancy detected, stopping\n" );break ; }else {
Signature · 1 line
2.31.1
Hi Jes,
Could you take this one for 4.2? It is posted for a while, which fixes a bug report of mine.
Thanks.
Coly Li
Quoted 46 lines · Coly Li
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 <[email protected]>Suggested-by Mariusz Tkaczyk <[email protected]>Signed-off-by Coly Li <[email protected]>Cc Jes Sorensen <[email protected]>---
Changelog:
v3: modify printed message by suggestion from Mariusz.
v2: add CC to Jes, and fix typo.
v1: the original version.Monitor.c | 1 + 1 file changed, 1 insertion(+)Monitor.c +1
-0@@ -258,6 +258,7 @@ int Monitor(struct mddev_dev *devlist,if (oneshot)break ;else if (!anyredundant) { +pr_err ("No array with redundancy detected, stopping\n" );break ; }else {
Jes Sorensen
AppliedHi Coly,
Didn't see this one as it was only copied to my work email. Sorry.
Applied!
Thanks,
Jes
Quoted 57 lines · Coly Li
Hi Jes,
Could you take this one for 4.2? It is posted for a while, which fixes a bug report of mine.
Thanks.
Coly Li
Quoted 46 lines · Coly Li
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 <[email protected]>Suggested-by Mariusz Tkaczyk <[email protected]>Signed-off-by Coly Li <[email protected]>Cc Jes Sorensen <[email protected]>---
Changelog:
v3: modify printed message by suggestion from Mariusz.
v2: add CC to Jes, and fix typo.
v1: the original version.
Monitor.c| 1 +1 file changed, 1 insertion(+)Monitor.c +1
-0@@ -258,6 +258,7 @@ int Monitor(struct mddev_dev *devlist, if (oneshot) break; else if (!anyredundant) { + pr_err("No array with redundancy detected, stopping\n"); break; } else {
On 12/8/21 10:45 PM, Jes Sorensen wrote:
Hi Jes,
Quoted 3 lines
Hi Coly,
Didn't see this one as it was only copied to my work email. Sorry.
It should be my fault, I didn't notice that [email protected] was the proper email address :-)
Quoted 2 lines
Applied!
Thanks. I will post patches to the trained-monkey.org address in future.
Coly Li
Quoted 8 lines · Coly Li
On 12/8/21 10:45 PM, Jes Sorensen wrote:
Hi Jes,
Quoted 3 lines
Hi Coly,
Didn't see this one as it was only copied to my work email. Sorry.
Quoted 7 lines
It should be my fault, I didn't notice that [email protected] was the proper email address :-)
Quoted 2 lines
Applied!
Thanks. I will post patches to the trained-monkey.org address in future.
Great, thanks!
Anything else we want for 4.2?
Jes
Quoted 11 lines · Jes Sorensen
Quoted 10 lines · Coly Li
On 12/8/21 10:45 PM, Jes Sorensen wrote:
Hi Jes,
Quoted 3 lines
Hi Coly,
Didn't see this one as it was only copied to my work email. Sorry.
It should be my fault, I didn't notice that [email protected] was the proper email address :-)
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Applied!
Thanks. I will post patches to the trained-monkey.org address in future.
Great, thanks!
Anything else we want for 4.2?
No more from my side. Thanks.
Coly Li