]> git.baikalelectronics.ru Git - kernel.git/commit
md: Fix skipping recovery for read-only arrays.
authorLukasz Dorau <lukasz.dorau@intel.com>
Thu, 24 Oct 2013 01:55:17 +0000 (12:55 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 24 Oct 2013 01:55:17 +0000 (12:55 +1100)
commit8fa4039c9366e25f39273bdd412428352cd2e2eb
tree046af42492e82ad69c397b02dbb51ee0361022fc
parentef6d91a42471d8f2e7660915f5ec34dc3949da83
md: Fix skipping recovery for read-only arrays.

Since:
        commit 8990f8f32d2ba526f3e6d0ce633d5abf290998cf
        md: Allow devices to be re-added to a read-only array.

spares are activated on a read-only array. In case of raid1 and raid10
personalities it causes that not-in-sync devices are marked in-sync
without checking if recovery has been finished.

If a read-only array is degraded and one of its devices is not in-sync
(because the array has been only partially recovered) recovery will be skipped.

This patch adds checking if recovery has been finished before marking a device
in-sync for raid1 and raid10 personalities. In case of raid5 personality
such condition is already present (at raid5.c:6029).

Bug was introduced in 3.10 and causes data corruption.

Cc: stable@vger.kernel.org
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid1.c
drivers/md/raid10.c