]> git.baikalelectronics.ru Git - kernel.git/commit
md: sync sync_completed has correct value as recovery finishes.
authorNeilBrown <neilb@suse.com>
Fri, 24 Jul 2015 03:27:08 +0000 (13:27 +1000)
committerNeilBrown <neilb@suse.com>
Mon, 31 Aug 2015 17:38:17 +0000 (19:38 +0200)
commit4c417188b176b0618a01597caf9448801556f8d0
treed712ddbdc3bfcbc710f6823076691e96f197baf7
parent75f1c301ee79a8d00e167f5c174d43de3f7e4d02
md: sync sync_completed has correct value as recovery finishes.

There can be a small window between the moment that recovery
actually writes the last block and the time when various sysfs
and /proc/mdstat attributes report that it has finished.
During this time, 'sync_completed' can have the wrong value.
This can confuse monitoring software.

So:
 - don't set curr_resync_completed beyond the end of the devices,
 - set it correctly when resync/recovery has completed.

Signed-off-by: NeilBrown <neilb@suse.com>
drivers/md/md.c