]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "md: allow a partially recovered device to be hot-added to an array."
authorNeilBrown <neilb@suse.com>
Sat, 31 Oct 2015 00:00:56 +0000 (11:00 +1100)
committerNeilBrown <neilb@suse.com>
Sat, 31 Oct 2015 00:00:56 +0000 (11:00 +1100)
commit022771ee9d76776d3da50ff948442e03812935e0
tree8d3ebdd4404f8c922a436e02adfa0fdf8aad716a
parent499123bf45319abb1b855d5b34639c65148c9c40
Revert "md: allow a partially recovered device to be hot-added to an array."

This reverts commit 2db236e417b0507a47da9ba13eafa4da1ca6b5b2.

This commit is poorly justified, I can find not discusison in email,
and it clearly causes a problem.

If a device which is being recovered fails and is subsequently
re-added to an array, there could easily have been changes to the
array *before* the point where the recovery was up to.  So the
recovery must start again from the beginning.

If a spare is being recovered and fails, then when it is re-added we
really should do a bitmap-based recovery up to the recovery-offset,
and then a full recovery from there.  Before this reversion, we only
did the "full recovery from there" which is not corect.  After this
reversion with will do a full recovery from the start, which is safer
but not ideal.

It will be left to a future patch to arrange the two different styles
of recovery.

Reported-and-tested-by: Nate Dailey <nate.dailey@stratus.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Cc: stable@vger.kernel.org (3.14+)
Fixes: 2db236e417b0 ("md: allow a partially recovered device to be hot-added to an array.")
drivers/md/md.c