From: Blazej Kucman <blazej.kucman@intel.com>
To: linux-raid@vger.kernel.org
Cc: jes@trained-monkey.org, colyli@suse.de
Subject: [PATCH V2 1/2] Monitor: block if monitor modes are combined.
Date: Mon, 19 Dec 2022 11:21:57 +0100 [thread overview]
Message-ID: <20221219102158.10180-2-blazej.kucman@intel.com> (raw)
In-Reply-To: <20221219102158.10180-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>
---
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 10:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 10:21 [PATCH V2 0/2] Changes in Monitor Blazej Kucman
2022-12-19 10:21 ` Blazej Kucman [this message]
2022-12-19 10:21 ` [PATCH V2 2/2] Update mdadm Monitor manual Blazej Kucman
2022-12-28 14:57 ` [PATCH V2 0/2] Changes in Monitor Jes Sorensen
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=20221219102158.10180-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 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.