]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Grow: update backup-metadata mtime every time we write it.
authorNeilBrown <neilb@suse.de>
Wed, 21 Oct 2009 23:42:06 +0000 (10:42 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 21 Oct 2009 23:42:06 +0000 (10:42 +1100)
commit9739642288555dae607ee4aa0eec0e9245cecf74
tree10eb2d11c883a2896452119e19ce1aad8d27f2f7
parenteb3929a47f547f3890b2d5d3891941e96d7f73eb
Grow: update backup-metadata mtime every time we write it.

Originally the backup-metadata was only written once at the
start of a raid5 reshape that made the array bigger.  So we only
set the mtime once.

Now that we can be writing metadata continually during an in-place
reshape, we need to update the mtime more often.

Also, allow the metadata mtime to be slightly in advance of the
array mtime.  Normally the difference will be less than a second,
so 10 minutes should be plenty.  This guards against an old backup
file being used to restart an array.  but starting two reshapes in the
10 minutes is sufficiently unlikely, and the possibility of an
accident is already sufficiently small, that 10 minutes is probably
fine.

Thanks to Guy Martin <gmsoft@tuxicoman.be> for discovering and
reporting that .mtime wasn't being updated properly.

Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c