diff options
author | NeilBrown <neilb@suse.de> | 2009-06-02 06:35:44 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-06-02 06:35:44 +0200 |
commit | ddc7201f965ce3192b8a96f65609fe8279148c2e (patch) | |
tree | 4fa150e55e7c90b8c790524da4767119c7bd9cd9 | |
parent | Monitor: don't get confused if utime is never set. (diff) | |
download | mdadm-ddc7201f965ce3192b8a96f65609fe8279148c2e.tar.xz mdadm-ddc7201f965ce3192b8a96f65609fe8279148c2e.zip |
Monitor: reduce default poll interval if mdstat is pollable.
Since 2.6.16, mdstat responds to select/poll.
So in that case, increase the default poll interval to about 15
minutes.
This ensures that the background load is insignificant.
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | mdadm.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1373,6 +1373,13 @@ int main(int argc, char *argv[]) rv = 1; break; } + if (delay == 0) { + if (get_linux_version() > 20616) + /* mdstat responds to poll */ + delay = 1000; + else + delay = 60; + } rv= Monitor(devlist, mailaddr, program, delay?delay:60, daemonise, scan, oneshot, dosyslog, test, pidfile); |