summaryrefslogtreecommitdiffstats
path: root/mdadm.c
diff options
context:
space:
mode:
authoroshchirs <oleksandr.shchirskyi@intel.com>2021-07-30 11:16:00 +0200
committerJes Sorensen <jsorensen@fb.com>2021-08-02 16:24:20 +0200
commit0663137c77bc848b2927075c077b545fceeb4dae (patch)
tree096e70e328bc0d2e5b7309a19b80d9c3275e7dac /mdadm.c
parenttests: Avoid passing chunk size when creating RAID 1 (diff)
downloadmdadm-0663137c77bc848b2927075c077b545fceeb4dae.tar.xz
mdadm-0663137c77bc848b2927075c077b545fceeb4dae.zip
Add monitor delay parameter to mdadm.conf
Add possibility to configure delay for mdadm in monitoring mode using mdadm.conf. --delay command line argument takes precedence over config file. Signed-off-by: Oleksandr Shchirskyi <oleksandr.shchirskyi@intel.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mdadm.c b/mdadm.c
index dcc26ba8..073b7241 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -1659,10 +1659,8 @@ int main(int argc, char *argv[])
break;
}
if (c.delay == 0) {
- if (get_linux_version() > 2006016)
- /* mdstat responds to poll */
- c.delay = 1000;
- else
+ c.delay = conf_get_monitor_delay();
+ if (!c.delay)
c.delay = 60;
}
rv = Monitor(devlist, mailaddr, program,