From: Blazej Kucman <blazej.kucman@intel.com>
To: linux-raid@vger.kernel.org
Cc: jes@trained-monkey.org, colyli@suse.de
Subject: [PATCH 1/2] Monitor: block if monitor modes are combined.
Date: Mon, 19 Dec 2022 10:58:34 +0100 [thread overview]
Message-ID: <20221219095835.686-2-blazej.kucman@intel.com> (raw)
In-Reply-To: <20221219095835.686-1-blazej.kucman@intel.com>
Block monitoring start if --scan mode and MD devices list are combined.
Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
Change-Id: Ic2b90662dbd297e8e2c8e88194155d65110ef517
---
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
next prev parent reply other threads:[~2022-12-19 9:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 9:58 [PATCH 0/2] Changes in Monitor Blazej Kucman
2022-12-19 9:58 ` Blazej Kucman [this message]
2022-12-19 16:07 ` [PATCH 1/2] Monitor: block if monitor modes are combined Coly Li
2022-12-19 16:38 ` Coly Li
2022-12-19 9:58 ` [PATCH 2/2] Update mdadm Monitor manual Blazej Kucman
2022-12-19 16:42 ` 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=20221219095835.686-2-blazej.kucman@intel.com \
--to=blazej.kucman@intel.com \
--cc=colyli@suse.de \
--cc=jes@trained-monkey.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).