• NeilBrown's avatar
    md/raid1: add failfast handling for writes. · 212e7eb7
    NeilBrown authored
    When writing to a fastfail device we use MD_FASTFAIL unless
    it is the only device being written to.
    
    For resync/recovery, assume there was a working device to
    read from so always use REQ_FASTFAIL_DEV.
    
    If a write for resync/recovery fails, we just fail the
    device - there is not much else to do.
    
    If a normal failfast write fails, but the device cannot be
    failed (must be only one left), we queue for write error
    handling.  This will call narrow_write_error() to retry the
    write synchronously and without any FAILFAST flags.
    Signed-off-by: default avatarNeilBrown <neilb@suse.com>
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    212e7eb7
raid1.c 90.1 KB