Thread (6 messages) 6 messages, 2 authors, 2022-12-19

Re: [PATCH 1/2] Monitor: block if monitor modes are combined.

From: Coly Li <hidden>
Date: 2022-12-19 16:08:07

2022年12月19日 17:58,Blazej Kucman [off-list ref] 写道:

Block monitoring start if --scan mode and MD devices list are combined.

Signed-off-by: Blazej Kucman <redacted>
Change-Id: Ic2b90662dbd297e8e2c8e88194155d65110ef517
I guess Change-ID is unnecessary for mdadm upstream?

Otherwise, it is fine to me,

Acked-by: Coly Li <colyli@suse.de <mailto:colyli@suse.de>>

Thanks.

Coly Li

quoted hunk ↗ jump to hunk
---
Monitor.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Monitor.c b/Monitor.c
index 7d7dc4d2..119e17d8 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -123,7 +123,7 @@ int Monitor(struct mddev_dev *devlist,
*  and if we can get_disk_info and find a name
*  Then we hot-remove and hot-add to the other array
*
- * If devlist is NULL, then we can monitor everything because --scan
+ * If devlist is NULL, then we can monitor everything if --scan
* was given.  We get an initial list from config file and add anything
* that appears in /proc/mdstat
*/
@@ -136,6 +136,11 @@ int Monitor(struct mddev_dev *devlist,
struct mddev_ident *mdlist;
int delay_for_event = c->delay;

+ if (devlist && c->scan) {
+ pr_err("Devices list and --scan option cannot be combined - not monitoring.\n");
+ return 1;
+ }
+
if (!mailaddr)
mailaddr = conf_get_mailaddr();

-- 
2.35.3
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help