• L
    md: Fix skipping recovery for read-only arrays. · 61e4947c
    Lukasz Dorau 提交于
    Since:
            commit 7ceb17e8
            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: NPawel Baldysiak <pawel.baldysiak@intel.com>
    Signed-off-by: NLukasz Dorau <lukasz.dorau@intel.com>
    Signed-off-by: NNeilBrown <neilb@suse.de>
    61e4947c
raid10.c 131.1 KB