• NeilBrown's avatar
    md: Don't use remove_and_add_spares to remove failed devices from a read-only array · a8c42c7f
    NeilBrown authored
    remove_and_add_spares is called in two places where the needs really
    are very different.
    remove_and_add_spares should not be called on an array which is about
    to be reshaped as some extra devices might have been manually added
    and that would remove them.  However if the array is 'read-auto',
    that will currently happen, which is bad.
    
    So in the 'ro != 0' case don't call remove_and_add_spares but simply
    remove the failed devices as the comment suggests is needed.
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    a8c42c7f
md.c 192 KB