summaryrefslogtreecommitdiffstats
path: root/Monitor.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-11-22 10:58:06 +0100
committerNeilBrown <neilb@suse.de>2010-11-22 10:58:06 +0100
commitb1717f0afce1c294b6f03d12b5510175282770c8 (patch)
treef11863d2090f869c9a312fcad21902779e578d25 /Monitor.c
parentmdadm: added --no-sharing option for Monitor mode (diff)
downloadmdadm-b1717f0afce1c294b6f03d12b5510175282770c8.tar.xz
mdadm-b1717f0afce1c294b6f03d12b5510175282770c8.zip
Monitor: avoid skipping checks on external arrays
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>
Diffstat (limited to 'Monitor.c')
-rw-r--r--Monitor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Monitor.c b/Monitor.c
index 2f43b125..45c91cc6 100644
--- 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 &&