]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md: don't clear endpoint for resync when resync is interrupted.
authorNeilBrown <neilb@suse.de>
Fri, 6 Nov 2009 03:59:27 +0000 (14:59 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Dec 2009 18:20:56 +0000 (10:20 -0800)
commit98bc571940095198eec1e4b9af70bf9024b5f539
tree9005885ffe16d59bb281ac1d20f75fae4d41bd49
parent146d0c086cc8b6d580cb08b6e8ad149f91c1e03d
md: don't clear endpoint for resync when resync is interrupted.

commit 24395a85d8efe6eee477ea35c73d045a8dd7a3a1 upstream.

If a 'sync_max' has been set (via sysfs), it is wrong to clear it
until a resync (or reshape or recovery ...) actually reached that
point.
So if a resync is interrupted (e.g. by device failure),
leave 'resync_max' unchanged.

This is particularly important for 'reshape' operations that do not
change the size of the array.  For such operations mdadm needs to
monitor the reshape taking rolling backups of the section being
reshaped.  If resync_max gets cleared, the reshape can get ahead of
mdadm and then the backups that mdadm creates are useless.

This is suitable for 2.6.31.y stable kernels.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/md.c