Monitor: don't get confused if utime is never set.

externally managed arrays do not (currently) cause utime in
GET_ARRAY_INFO to be updated.  So if it is zero, just assume the
current time.
This will cause GET_DISK_INFO to be called more often, but as we do
the scan only every 60 seconds normally, a few extra syscalls isn't
going to make a big difference.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2009-06-02 14:24:58 +10:00
parent e0fe762a63
commit 4736b5dc77
1 changed files with 4 additions and 0 deletions

View File

@ -284,6 +284,10 @@ int Monitor(mddev_dev_t devlist,
mse = mse2;
}
if (array.utime == 0)
/* external arrays don't update utime */
array.utime = time(0);
if (st->utime == array.utime &&
st->failed == array.failed_disks &&
st->working == array.working_disks &&