diff options
author | Blazej Kucman <blazej.kucman@intel.com> | 2022-12-19 11:21:57 +0100 |
---|---|---|
committer | Jes Sorensen <jes@trained-monkey.org> | 2022-12-28 09:56:17 -0500 |
commit | f40ac0e7e6043361ad12e9db97c07e56c3977cf6 (patch) | |
tree | 839a8301b63ad2bfaa877cdc7f90cd02afdaa1e9 | |
parent | 3698867194f27fdd7824b8bdd172d619a2c087cc (diff) | |
download | mdadm-test-f40ac0e7e6043361ad12e9db97c07e56c3977cf6.tar.gz |
Monitor: block if monitor modes are combined.
Block monitoring start if --scan mode and MD devices list are combined.
Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
-rw-r--r-- | Monitor.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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(); |