]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Monitor: avoid skipping checks on external arrays
authorNeilBrown <neilb@suse.de>
Mon, 22 Nov 2010 09:58:06 +0000 (20:58 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 22 Nov 2010 09:58:06 +0000 (20:58 +1100)
utime is not correct for external metadata so we must
not risk the observed time ever matching the old time.

Reported-by: Anna Czarnowska <anna.czarnowska@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Monitor.c

index 2f43b125d02918d3d4b97fbad77e088a40895052..45c91cc6953c9585452ba0e162f40090cf4010ea 100644 (file)
--- a/Monitor.c
+++ b/Monitor.c
@@ -320,8 +320,9 @@ int Monitor(struct mddev_dev *devlist,
                        }
                        /* this array is in /proc/mdstat */
                        if (array.utime == 0)
-                               /* external arrays don't update utime */
-                               array.utime = time(0);
+                               /* external arrays don't update utime, so
+                                * just make sure it is always different. */
+                               array.utime = st->utime + 1;;
 
                        if (st->utime == array.utime &&
                            st->failed == array.failed_disks &&