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>
This commit is contained in:
parent
4736b5dc77
commit
ddc7201f96
7
mdadm.c
7
mdadm.c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue