• NeilBrown's avatar
    md: Fix some bugs in recovery_disabled handling. · d890fa2b
    NeilBrown authored
    In 3.0 we changed the way recovery_disabled was handle so that instead
    of testing against zero, we test an mddev-> value against a conf->
    value.
    Two problems:
      1/ one place in raid1 was missed and still sets to '1'.
      2/ We didn't explicitly set the conf-> value at array creation
         time.
         It defaulted to '0' just like the mddev value does so they
         could appear equal and thus disable recovery.
         This did not affect normal 'md' as it calls bind_rdev_to_array
         which changes the mddev value.  However the dmraid interface
         doesn't call this and so doesn't change ->recovery_disabled; so at
         array start all recovery is incorrectly disabled.
    
    So initialise the 'conf' value to one less that the mddev value, so
    the will only be the same when explicitly set that way.
    Reported-by: default avatarJonathan Brassow <jbrassow@redhat.com>
    Signed-off-by: default avatarNeilBrown  <neilb@suse.de>
    d890fa2b
raid1.c 73.9 KB